org.processmining.framework.util
Class GuiPropertyStringTextarea
java.lang.Object
org.processmining.framework.util.GuiPropertyStringTextarea
public class GuiPropertyStringTextarea
- extends java.lang.Object
This simple string description property that can be readily displayed as it maintains its own GUI panel.
The property will be graphically represented as a (multiple line) text area that cannot be edited.
It will stretch across the whole width of the enclosing panel, and words will automatically wrapped
at the end of each line.
A typical usage scenario looks as follows:
JPanel testPanel = new Panel(); // create parent panel
testPanel.setLayout(new BoxLayout(testPanel, BoxLayout.PAGE_AXIS));
GuiPropertyStringTextarea name = new GuiPropertyStringTextarea("Test description");
testPanel.add(name.getPropertyPanel()); // add one property
GuiPropertyStringTextarea city = new GuiPropertyStringTextarea("Another test description");
testPanel.add(city.getPropertyPanel()); // add another property
return testPanel;
- See Also:
getValue
,
getPropertyPanel
Constructor Summary |
GuiPropertyStringTextarea(java.lang.String defaultValue)
Creates a string description property with default height value. |
GuiPropertyStringTextarea(java.lang.String defaultValue,
int height)
Creates a string description property with given height value. |
Method Summary |
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
myValue
protected java.lang.String myValue
myHeight
protected int myHeight
myTextArea
protected javax.swing.JTextArea myTextArea
GuiPropertyStringTextarea
public GuiPropertyStringTextarea(java.lang.String defaultValue)
- Creates a string description property with default height value.
- Parameters:
defaultValue
- the default value of this property
GuiPropertyStringTextarea
public GuiPropertyStringTextarea(java.lang.String defaultValue,
int height)
- Creates a string description property with given height value.
- Parameters:
defaultValue
- the default value of this propertytarget
- the object to be notified as soon the state of this property changeswidth
- a custom width may be specified (default value is 100 otherwise)
getValue
public java.lang.String getValue()
- The method to be invoked when the value of this property is
to be used.
- Returns:
- the current value of this property
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