org.processmining.exporting.petrinet.cpnexport.HLImplementation
Class HLDataAttributeValues

java.lang.Object
  extended by org.processmining.exporting.petrinet.cpnexport.HLImplementation.HLDataAttributeValues
All Implemented Interfaces:
java.lang.Cloneable, GuiNotificationTarget

public class HLDataAttributeValues
extends java.lang.Object
implements GuiNotificationTarget, java.lang.Cloneable

Specifies the possible values of a data attribute depending on its type.

Author:
arozinat

Constructor Summary
HLDataAttributeValues()
          Default constructor.
HLDataAttributeValues(Distribution dist, int initialVal)
          Constructor to create a fully-specified numeric data attribute.
HLDataAttributeValues(HighLevelDataAttribute.AttributeType type)
          Constructor to create an empty attribute with the of the specified type.
HLDataAttributeValues(java.util.List<java.lang.String> values)
          Constructor to create a fully-specified nominal data attribute.
 
Method Summary
 java.lang.Object clone()
          Makes a shallow copy of this object
 java.lang.String getInitialValueNominal()
          Retrieves the initial value for the associated data attribute.
 int getInitialValueNumeric()
          Retrieves the initial value for the associated data attribute.
 javax.swing.JPanel getPanel()
          Retrieves a GUI panel representing the values of this data attribute ready to display to the user.
 java.util.List<java.lang.String> getPossibleValuesNominal()
          Retrieves the initial value for the associated data attribute.
 Distribution getPossibleValuesNumeric()
          Retrieves the initial value for the associated data attribute.
 HighLevelDataAttribute.AttributeType getType()
          Retrieves the attribute type for this data attribute.
 void updateGUI()
          This method will be called as soon as the associated GUI property has changed.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HLDataAttributeValues

public HLDataAttributeValues()
Default constructor.


HLDataAttributeValues

public HLDataAttributeValues(HighLevelDataAttribute.AttributeType type)
Constructor to create an empty attribute with the of the specified type.

Parameters:
type - the type of the data attribute

HLDataAttributeValues

public HLDataAttributeValues(Distribution dist,
                             int initialVal)
Constructor to create a fully-specified numeric data attribute.

Parameters:
dist - the distribution of the possible values of this numeric attribute
initialVal - the initial value of this numeric attribute

HLDataAttributeValues

public HLDataAttributeValues(java.util.List<java.lang.String> values)
Constructor to create a fully-specified nominal data attribute.

Parameters:
values - the possible values of this nominal attribute (first value in the list represents the initial value)
Method Detail

getType

public HighLevelDataAttribute.AttributeType getType()
Retrieves the attribute type for this data attribute.

Returns:
the type of this data attribute

getInitialValueNominal

public java.lang.String getInitialValueNominal()
Retrieves the initial value for the associated data attribute.
Note that this value only corresponds to the actual initial value if the attribute type is currently "nominal".

Returns:
the nominal default value

getInitialValueNumeric

public int getInitialValueNumeric()
Retrieves the initial value for the associated data attribute.
Note that this value only corresponds to the actual initial value if the attribute type is currently "numeric".

Returns:
the numeric default value

getPossibleValuesNominal

public java.util.List<java.lang.String> getPossibleValuesNominal()
Retrieves the initial value for the associated data attribute.
Note that this value only corresponds to the actual initial value if the attribute type is currently "nominal".

Returns:
the nominal default value

getPossibleValuesNumeric

public Distribution getPossibleValuesNumeric()
Retrieves the initial value for the associated data attribute.
Note that this value only corresponds to the actual initial value if the attribute type is currently "numeric".

Returns:
the numeric default value

clone

public java.lang.Object clone()
Makes a shallow copy of this object

Overrides:
clone in class java.lang.Object
Returns:
Object the cloned object

updateGUI

public void updateGUI()
Description copied from interface: GuiNotificationTarget
This method will be called as soon as the associated GUI property has changed.
Using this callback technique the reaction to changes of the GUI property becomes possible in a decoupled way.

Specified by:
updateGUI in interface GuiNotificationTarget

getPanel

public javax.swing.JPanel getPanel()
Retrieves a GUI panel representing the values of this data attribute ready to display to the user. Changes are propagated to the internally held parameters.

Returns:
the GUI panel representing the values of this data attribute