|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.processmining.framework.util.GuiPropertyListRadio
public class GuiPropertyListRadio
A list of strings property that can be readily displayed as it maintains its own GUI panel.
The property will be graphically represented as a set of radio buttons.
If a description has been provided, it will be displayed as a tool tip.
Changes performed via the GUI will be immedeately propagated to the internally held property value.
Furthermore, a notification target
may be specified
in order to be informed as soon as the value has been changed.
A typical usage scenario looks as follows:
JPanel testPanel = new Panel(); // create parent panel
testPanel.setLayout(new BoxLayout(testPanel, BoxLayout.PAGE_AXIS));
ArrayList
testPanel.add(gender.getPropertyPanel()); // add one property
return testPanel;
getValue
,
getPropertyPanel
Field Summary | |
---|---|
protected java.lang.String |
myDescription
|
protected java.lang.String |
myName
|
protected java.util.List<java.lang.String> |
myPossibleValues
|
protected javax.swing.ButtonGroup |
myRadioButtons
|
protected GuiNotificationTarget |
myTarget
|
protected java.lang.String |
myValue
|
Constructor Summary | |
---|---|
GuiPropertyListRadio(java.lang.String name,
java.util.List<java.lang.String> values)
Creates an enumeration property without a discription and notification. |
|
GuiPropertyListRadio(java.lang.String name,
java.util.List<java.lang.String> values,
GuiNotificationTarget target)
Creates an enumeration property without a discription. |
|
GuiPropertyListRadio(java.lang.String name,
java.lang.String description,
java.util.List<java.lang.String> values)
Creates an enumeration property without notification. |
|
GuiPropertyListRadio(java.lang.String name,
java.lang.String description,
java.util.List<java.lang.String> values,
GuiNotificationTarget target)
Creates an enumeration property. |
Method Summary | |
---|---|
void |
disable(java.lang.String toDisable)
Prevents that this property may be manipulated via the GUI panel. |
void |
enable(java.lang.String toEnable)
Re-activates the possibility to manipulate this property via the GUI panel. |
java.util.List<java.lang.String> |
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. |
java.lang.String |
getValue()
The method to be invoked when the value of this property is to be used. |
boolean |
isEnabled(java.lang.String toCheck)
Check whether one of the radio buttons is enabled or disabled |
void |
mouseClicked(java.awt.event.MouseEvent e)
The method automatically invoked when changing the combobox status. |
void |
mouseEntered(java.awt.event.MouseEvent e)
|
void |
mouseExited(java.awt.event.MouseEvent e)
|
void |
mousePressed(java.awt.event.MouseEvent e)
|
void |
mouseReleased(java.awt.event.MouseEvent e)
|
void |
notifyTarget()
Manually notify the target that the state of the radiolist has been changed. |
void |
setSelected(java.lang.String toSetSelected,
boolean b)
Sets the state of respective radio button. |
void |
stateChanged()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String myName
protected java.lang.String myDescription
protected java.util.List<java.lang.String> myPossibleValues
protected java.lang.String myValue
protected GuiNotificationTarget myTarget
protected javax.swing.ButtonGroup myRadioButtons
Constructor Detail |
---|
public GuiPropertyListRadio(java.lang.String name, java.util.List<java.lang.String> values)
name
- the name of this propertyvalues
- 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 valuepublic GuiPropertyListRadio(java.lang.String name, java.lang.String description, java.util.List<java.lang.String> values)
name
- the name of this propertydescription
- 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 valuepublic GuiPropertyListRadio(java.lang.String name, java.util.List<java.lang.String> values, GuiNotificationTarget target)
name
- the name of this propertyvalues
- 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 valuetarget
- the object to be notified as soon the state of this property changespublic GuiPropertyListRadio(java.lang.String name, java.lang.String description, java.util.List<java.lang.String> values, GuiNotificationTarget target)
name
- the name of this propertydescription
- 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 valuetarget
- the object to be notified as soon the state of this property changesMethod Detail |
---|
public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
e
- the passed action event (not used)public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in interface java.awt.event.MouseListener
public void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered
in interface java.awt.event.MouseListener
public void mouseExited(java.awt.event.MouseEvent e)
mouseExited
in interface java.awt.event.MouseListener
public void stateChanged()
public java.lang.String getValue()
public java.util.List<java.lang.String> getAllValues()
public void disable(java.lang.String toDisable)
the
- name of the radio button to disableenable(String)
public void enable(java.lang.String toEnable)
the
- name of the radio button to enabledisable(String)
public void setSelected(java.lang.String toSetSelected, boolean b)
toSetSelected
- String the name of the radio button to select/deselectb
- boolean true if the radio button is selected, otherwise falsepublic boolean isEnabled(java.lang.String toCheck)
toCheck
- String the name of the radiobutton
public void notifyTarget()
public javax.swing.JPanel getPropertyPanel()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |