org.processmining.framework.util
Class GUIPropertyListEnumerationOfGuiDisplayables

java.lang.Object
  extended by org.processmining.framework.util.GUIPropertyListEnumerationOfGuiDisplayables
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener

public class GUIPropertyListEnumerationOfGuiDisplayables
extends java.lang.Object
implements java.awt.event.ActionListener


Field Summary
protected  javax.swing.JComboBox myComboBox
           
protected  javax.swing.JPanel myContentPanel
           
protected  java.lang.String myDescription
           
protected  java.lang.String myName
           
protected  javax.swing.JPanel myPanel
           
protected  java.util.List<GuiDisplayable> myPossibleValues
           
protected  GuiNotificationTarget myTarget
           
protected  GuiDisplayable myValue
           
protected  int myWidth
           
 
Constructor Summary
GUIPropertyListEnumerationOfGuiDisplayables(java.lang.String name, java.util.List<GuiDisplayable> values)
          Creates an enumeration property without a discription and notification.
GUIPropertyListEnumerationOfGuiDisplayables(java.lang.String name, java.util.List<GuiDisplayable> values, GuiNotificationTarget target)
          Creates an enumeration property without a discription.
GUIPropertyListEnumerationOfGuiDisplayables(java.lang.String name, java.lang.String description, java.util.List<GuiDisplayable> values)
          Creates an enumeration property without notification.
GUIPropertyListEnumerationOfGuiDisplayables(java.lang.String name, java.lang.String description, java.util.List<GuiDisplayable> values, GuiNotificationTarget target)
          Creates an enumeration property.
GUIPropertyListEnumerationOfGuiDisplayables(java.lang.String name, java.lang.String description, java.util.List<GuiDisplayable> values, GuiNotificationTarget target, int width)
          Creates an enumeration property.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          The method automatically invoked when changing the combobox status.
 void addValue(GuiDisplayable value)
          Adds an enumeration value.
 void disable()
          Prevents that this property may be manipulated via the GUI panel.
 void enable()
          Re-activates the possibility to manipulate this property via the GUI panel.
 java.util.List<GuiDisplayable> getAllValues()
          Retrieves all the possible values specified for this property.
 javax.swing.JPanel getPropertyPanel()
          Creates GUI panel containg this property, ready to display in some settings dialog.
 GuiDisplayable getValue()
          The method to be invoked when the value of this property is to be used.
 void notifyTarget()
          Manually notify the target that the state of the radiolist has been changed.
 void removeValue(GuiDisplayable value)
          Removes an enumeration value, if present
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

myName

protected java.lang.String myName

myDescription

protected java.lang.String myDescription

myPossibleValues

protected java.util.List<GuiDisplayable> myPossibleValues

myValue

protected GuiDisplayable myValue

myTarget

protected GuiNotificationTarget myTarget

myComboBox

protected javax.swing.JComboBox myComboBox

myWidth

protected int myWidth

myPanel

protected javax.swing.JPanel myPanel

myContentPanel

protected javax.swing.JPanel myContentPanel
Constructor Detail

GUIPropertyListEnumerationOfGuiDisplayables

public GUIPropertyListEnumerationOfGuiDisplayables(java.lang.String name,
                                                   java.util.List<GuiDisplayable> values)
Creates an enumeration property without a discription and notification.

Parameters:
name - the name of this property
values - the possible values of this property. The objects in this list should either be simple strings or override the toString() method, which is then displayed as the name of this value in the ComboBox. The first value in the list is considered as the default value

GUIPropertyListEnumerationOfGuiDisplayables

public GUIPropertyListEnumerationOfGuiDisplayables(java.lang.String name,
                                                   java.lang.String description,
                                                   java.util.List<GuiDisplayable> values)
Creates an enumeration property without notification.

Parameters:
name - the name of this property
description - of this property (to be displayed as a tool tip)
values - the possible values of this property. The objects in this list should either be simple strings or override the toString() method, which is then displayed as the name of this value in the ComboBox. The first value in the list is considered as the default value

GUIPropertyListEnumerationOfGuiDisplayables

public GUIPropertyListEnumerationOfGuiDisplayables(java.lang.String name,
                                                   java.util.List<GuiDisplayable> values,
                                                   GuiNotificationTarget target)
Creates an enumeration property without a discription.

Parameters:
name - the name of this property
values - the possible values of this property. The objects in this list should either be simple strings or override the toString() method, which is then displayed as the name of this value in the ComboBox. The first value in the list is considered as the default value
target - the object to be notified as soon the state of this property changes

GUIPropertyListEnumerationOfGuiDisplayables

public GUIPropertyListEnumerationOfGuiDisplayables(java.lang.String name,
                                                   java.lang.String description,
                                                   java.util.List<GuiDisplayable> values,
                                                   GuiNotificationTarget target)
Creates an enumeration property.

Parameters:
name - the name of this property
description - of this property (to be displayed as a tool tip)
values - the possible values of this property. The objects in this list should either be simple strings or override the toString() method, which is then displayed as the name of this value in the ComboBox. The first value in the list is considered as the default value
target - the object to be notified as soon the state of this property changes

GUIPropertyListEnumerationOfGuiDisplayables

public GUIPropertyListEnumerationOfGuiDisplayables(java.lang.String name,
                                                   java.lang.String description,
                                                   java.util.List<GuiDisplayable> values,
                                                   GuiNotificationTarget target,
                                                   int width)
Creates an enumeration property.

Parameters:
name - the name of this property
description - of this property (to be displayed as a tool tip)
values - the possible values of this property. The objects in this list should either be simple strings or override the toString() method, which is then displayed as the name of this value in the ComboBox. The first value in the list is considered as the default value
target - the object to be notified as soon the state of this property changes
width - a custom width may be specified (default value is 100 otherwise)
Method Detail

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
The method automatically invoked when changing the combobox status.

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
e - the passed action event (not used)

notifyTarget

public void notifyTarget()
Manually notify the target that the state of the radiolist has been changed.


getValue

public GuiDisplayable getValue()
The method to be invoked when the value of this property is to be used.

Returns:
the current value of this property

getAllValues

public java.util.List<GuiDisplayable> getAllValues()
Retrieves all the possible values specified for this property.

Returns:
all possible values (including the current value)

removeValue

public void removeValue(GuiDisplayable value)
Removes an enumeration value, if present

Parameters:
value - Object the enumeration value to be removed

addValue

public void addValue(GuiDisplayable value)
Adds an enumeration value. If it is already present it will not be added again

Parameters:
value - Object The enumeration value to be added

disable

public void disable()
Prevents that this property may be manipulated via the GUI panel.

See Also:
enable()

enable

public void enable()
Re-activates the possibility to manipulate this property via the GUI panel.

See Also:
disable()

getPropertyPanel

public javax.swing.JPanel getPropertyPanel()
Creates GUI panel containg this property, ready to display in some settings dialog.

Returns:
the graphical panel representing this property