org.processmining.exporting.petrinet.cpnexport
Class ManagerLayout

java.lang.Object
  extended by org.processmining.exporting.petrinet.cpnexport.ManagerLayout

public class ManagerLayout
extends java.lang.Object

The layout manager maintains the grahical parameters that apply for the generation of CPN simulation models.

Author:
arozinat (a.rozinat@tm.tue.nl)

Field Summary
static int DEFAULT_SCALE_FACTOR
          The default setting for the scale factor
static int DEFAULT_STRETCH_FACTOR
          the default setting for the stretch factor
 
Method Summary
 java.lang.String getCpnValidName(java.lang.String name)
          Returns a cpn valid name.
static ManagerLayout getInstance()
          Retrieves the only instance of this Layout manager (Singleton pattern).
 javax.swing.JPanel getOptionsPanel()
          Creates GUI panel containg the available layout settings, ready to display in some settings dialog.
 int getPlaceFusionOffset_X()
          Offset specifying the displacement of the fusion name tag for the place on the x axis.
 int getPlaceFusionOffset_Y()
          Offset specifying the displacement of the fusion name tag for the place on the y axis.
 int getPlaceInitMarkOffset_X()
          Offset specifying the displacement of the initial marking label for the place on the x axis.
 int getPlaceInitMarkOffset_Y()
          Offset specifying the displacement of the initial marking label for a place on the y axis.
 int getPlacePortOffset_X()
          Offset specifying the displacement of the port type tag for the place on the x axis.
 int getPlacePortOffset_Y()
          Offset specifying the displacement of the port type tag for the place on the y axis.
 int getPlaceTypeOffset_X()
          Offset specifying the displacement of the type label for the place on the x axis.
 int getPlaceTypeOffset_Y()
          Offset specifying the displacement of the type label for a place on the y axis.
 int getScaleFactor()
          Constant factor used to scale the nodes further away from each other.
 int getStretchFactor()
          Constant factor used to scale the nodes further away from each other.
 int getTransitionChannelOffset_X()
          Offset specifying the displacement of the channel specification for a transition on the x axis (not used).
 int getTransitionChannelOffset_Y()
          Offset specifying the displacement of the channel specification for a transition on the y axis (not used).
 int getTransitionCodeOffset_X()
          Offset specifying the displacement of the code specification for a transition on the x axis (that is input, output, action).
 int getTransitionCodeOffset_Y()
          Offset specifying the displacement of the code specification for a transition on the y axis (that is input, output, action).
 int getTransitionConditionOffset_X()
          Offset specifying the displacement of the guard condition label for a transition on the x axis.
 int getTransitionConditionOffset_Y()
          Offset specifying the displacement of the guard condition label for a transition on the y axis.
 int getTransitionSubpageinfoOffset_X()
          Offset specifying the displacement of the subpage tag for a transition on the x axis).
 int getTransitionSubpageinfoOffset_Y()
          Offset specifying the displacement of the subpage tag for a transition on the y axis.
 int getTransitionTimeOffset_X()
          Offset specifying the displacement of the time delay label for a transition on the x axis.
 int getTransitionTimeOffset_Y()
          Offset specifying the displacement of the time delay label for a transition on the y axis.
static java.lang.String negativeEnotationCheck(double number)
          The scientific notation of a double with E and a minus sign can not be directly used in cpn.
 java.lang.String replaceSpecialCharacters(java.lang.String name)
          Replaces every character other than a letter, a number, an apostrophe, or an underscore with an underscore.
 java.lang.String replaceStartNumbers(java.lang.String name)
          Inserts a character at the beginning of the given string if it starts by a number.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_SCALE_FACTOR

public static final int DEFAULT_SCALE_FACTOR
The default setting for the scale factor

See Also:
Constant Field Values

DEFAULT_STRETCH_FACTOR

public static final int DEFAULT_STRETCH_FACTOR
the default setting for the stretch factor

See Also:
Constant Field Values
Method Detail

getPlaceTypeOffset_X

public int getPlaceTypeOffset_X()
Offset specifying the displacement of the type label for the place on the x axis. The reference point is the center position of the place itself and the value is taken from the CPN Tools default position of the type label, if the type is CASE_ID.


getPlaceTypeOffset_Y

public int getPlaceTypeOffset_Y()
Offset specifying the displacement of the type label for a place on the y axis. The reference point is the center position of the place itself and the value is taken from the corresponding CPN Tools default position.


getPlaceInitMarkOffset_X

public int getPlaceInitMarkOffset_X()
Offset specifying the displacement of the initial marking label for the place on the x axis. The reference point is the center position of the place itself and the value is taken from the corresponding CPN Tools default position.


getPlaceInitMarkOffset_Y

public int getPlaceInitMarkOffset_Y()
Offset specifying the displacement of the initial marking label for a place on the y axis. The reference point is the center position of the place itself and the the value is taken from the corresponding CPN Tools default position.


getPlacePortOffset_X

public int getPlacePortOffset_X()
Offset specifying the displacement of the port type tag for the place on the x axis. The reference point is the center position of the place itself and the value is taken from the corresponding CPN Tools default position.


getPlacePortOffset_Y

public int getPlacePortOffset_Y()
Offset specifying the displacement of the port type tag for the place on the y axis. The reference point is the center position of the place itself and the the value is taken from the corresponding CPN Tools default position.


getPlaceFusionOffset_X

public int getPlaceFusionOffset_X()
Offset specifying the displacement of the fusion name tag for the place on the x axis. The reference point is the center position of the place itself and the value is taken from the corresponding CPN Tools default position.


getPlaceFusionOffset_Y

public int getPlaceFusionOffset_Y()
Offset specifying the displacement of the fusion name tag for the place on the y axis. The reference point is the center position of the place itself and the value is taken from the corresponding CPN Tools default position.


getTransitionConditionOffset_X

public int getTransitionConditionOffset_X()
Offset specifying the displacement of the guard condition label for a transition on the x axis. The reference point is the center position of the transition itself and the value is taken from the corresponding CPN Tools default position.


getTransitionConditionOffset_Y

public int getTransitionConditionOffset_Y()
Offset specifying the displacement of the guard condition label for a transition on the y axis. The reference point is the center position of the transition itself and the value is taken from the corresponding CPN Tools default position.


getTransitionTimeOffset_X

public int getTransitionTimeOffset_X()
Offset specifying the displacement of the time delay label for a transition on the x axis. The reference point is the center position of the transition itself and the value is taken from the corresponding CPN Tools default position.


getTransitionTimeOffset_Y

public int getTransitionTimeOffset_Y()
Offset specifying the displacement of the time delay label for a transition on the y axis. The reference point is the center position of the transition itself and the value is taken from the corresponding CPN Tools default position.


getTransitionCodeOffset_X

public int getTransitionCodeOffset_X()
Offset specifying the displacement of the code specification for a transition on the x axis (that is input, output, action). The reference point is the center position of the transition itself and the value is taken from the corresponding CPN Tools default position.


getTransitionCodeOffset_Y

public int getTransitionCodeOffset_Y()
Offset specifying the displacement of the code specification for a transition on the y axis (that is input, output, action). The reference point is the center position of the transition itself and the value is taken from the corresponding CPN Tools default position.


getTransitionChannelOffset_X

public int getTransitionChannelOffset_X()
Offset specifying the displacement of the channel specification for a transition on the x axis (not used). The reference point is the center position of the transition itself and the value is taken from the corresponding CPN Tools default position.


getTransitionChannelOffset_Y

public int getTransitionChannelOffset_Y()
Offset specifying the displacement of the channel specification for a transition on the y axis (not used). The reference point is the center position of the transition itself and the value is taken from the corresponding CPN Tools default position.


getTransitionSubpageinfoOffset_X

public int getTransitionSubpageinfoOffset_X()
Offset specifying the displacement of the subpage tag for a transition on the x axis). The reference point is the center position of the transition itself and the value is taken from the corresponding CPN Tools default position.


getTransitionSubpageinfoOffset_Y

public int getTransitionSubpageinfoOffset_Y()
Offset specifying the displacement of the subpage tag for a transition on the y axis. The reference point is the center position of the transition itself and the value is taken from the corresponding CPN Tools default position.


getScaleFactor

public int getScaleFactor()
Constant factor used to scale the nodes further away from each other.


getStretchFactor

public int getStretchFactor()
Constant factor used to scale the nodes further away from each other.


getCpnValidName

public java.lang.String getCpnValidName(java.lang.String name)
Returns a cpn valid name.

Parameters:
name - String the original name
Returns:
String a name which only may contain letters, numbers, the _ (underscore) character, the ' (apostrophe) character and which has to start with a letter.

replaceSpecialCharacters

public java.lang.String replaceSpecialCharacters(java.lang.String name)
Replaces every character other than a letter, a number, an apostrophe, or an underscore with an underscore.

Parameters:
name - the string to be replaced
Returns:
the modified string

replaceStartNumbers

public java.lang.String replaceStartNumbers(java.lang.String name)
Inserts a character at the beginning of the given string if it starts by a number.

Parameters:
name - the string to be replaced
Returns:
the modified string

negativeEnotationCheck

public static java.lang.String negativeEnotationCheck(double number)
The scientific notation of a double with E and a minus sign can not be directly used in cpn. The trick in which you read such a double from a string is allowed.

Parameters:
number - double the number for which we want to check whether it contains an E with a minus sign
Returns:
String In case that the number contains an E with a minus sign, a string is returned so that in cpn the value is read from a string. Otherwise, the string representation of the number is returned.

getInstance

public static ManagerLayout getInstance()
Retrieves the only instance of this Layout manager (Singleton pattern). Note that this means that the effect of changing a layout setting will not only last for one export session, but for one whole session of ProM.

Returns:
the global layout manager

getOptionsPanel

public javax.swing.JPanel getOptionsPanel()
Creates GUI panel containg the available layout settings, ready to display in some settings dialog.

Returns:
the graphical panel representing the available layout settings for the CPN Tools export