|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jppf.ui.options.AbstractOptionProperties
org.jppf.ui.options.AbstractOptionElement
org.jppf.ui.options.AbstractOption
public abstract class AbstractOption
Default abstract implementation of the Option interface.
| Field Summary | |
|---|---|
protected List<ValueChangeListener> |
listeners
List of listeners that are notified when the value of this option changes. |
protected boolean |
persistent
Determines whether the value of this option should be saved in the user preferences. |
protected Object |
value
The value of this option. |
| Fields inherited from class org.jppf.ui.options.AbstractOptionElement |
|---|
parent, root |
| Fields inherited from class org.jppf.ui.options.AbstractOptionProperties |
|---|
bordered, componentConstraints, eventsEnabled, finalizer, iconPath, initializer, label, layoutConstraints, name, scripts, scrollable, toolTipText, UIComponent |
| Constructor Summary | |
|---|---|
AbstractOption()
Constructor provided as a convenience to facilitate the creation of option elements through reflexion. |
|
| Method Summary | |
|---|---|
void |
addValueChangeListener(ValueChangeListener listener)
Add a value change listener to this option's list of listeners. |
void |
fireValueChanged()
Notify all registered listeners that the value of this option has changed. |
Object |
getValue()
The value of this option. |
boolean |
isPersistent()
Determine whether the value of this option should be saved in the user preferences. |
protected JPanel |
layoutComponents(JComponent comp1,
JComponent comp2)
Layout 2 components according to the specified layout constraints. |
protected JPanel |
layoutComponents(JComponent comp1,
String constraint1,
JComponent comp2,
String constraint2)
Layout 2 components according to the specified layout constraints. |
void |
removeValueChangeListener(ValueChangeListener listener)
Remove a value change listener from this option's list of listeners. |
void |
setPersistent(boolean persistent)
Set whether the value of this option should be saved in the user preferences. |
protected abstract void |
setupValueChangeNotifications()
Concrete subclasses must implement this method, so they can properly forward changes in the value edited by the underlying UI component/editor. |
void |
setValue(Object value)
Set the value of this option. |
| Methods inherited from class org.jppf.ui.options.AbstractOptionElement |
|---|
findAll, findAllWithName, findElement, findFirstWithName, findLastWithName, getChildForName, getParent, getPath, getRoot, getStringPath, setParent, toString |
| Methods inherited from class org.jppf.ui.options.AbstractOptionProperties |
|---|
createUI, getComponentConstraints, getFinalizer, getIconPath, getInitializer, getLabel, getLayoutConstraints, getName, getScripts, getToolTipText, getUIComponent, isBordered, isEventsEnabled, isScrollable, setBordered, setComponentConstraints, setEditable, setEventsEnabled, setFinalizer, setIconPath, setInitializer, setLabel, setLayoutConstraints, setName, setScrollable, setToolTipText, setUIComponent |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.jppf.ui.options.OptionElement |
|---|
findAllWithName, findElement, findFirstWithName, findLastWithName, getParent, getPath, getRoot, getStringPath |
| Methods inherited from interface org.jppf.ui.options.OptionProperties |
|---|
getComponentConstraints, getFinalizer, getIconPath, getInitializer, getLabel, getLayoutConstraints, getName, getScripts, getToolTipText, getUIComponent, isBordered, isEventsEnabled, isScrollable, setComponentConstraints, setEditable, setEnabled, setEventsEnabled, setLayoutConstraints |
| Field Detail |
|---|
protected Object value
protected List<ValueChangeListener> listeners
protected boolean persistent
| Constructor Detail |
|---|
public AbstractOption()
| Method Detail |
|---|
public Object getValue()
getValue in interface OptionObject instance.Option.getValue()public void setValue(Object value)
value - the value as an Object instance.public void addValueChangeListener(ValueChangeListener listener)
listener - the listener to add to the list.public void removeValueChangeListener(ValueChangeListener listener)
listener - the listener to remove from the list.public void fireValueChanged()
protected abstract void setupValueChangeNotifications()
protected JPanel layoutComponents(JComponent comp1,
JComponent comp2)
comp1 - the first component to layout.comp2 - the second component to layout.
JPanel instance, enclosing the 2 components plus the filler.
protected JPanel layoutComponents(JComponent comp1,
String constraint1,
JComponent comp2,
String constraint2)
comp1 - the first component to layout.constraint1 - the layout constraint for the 1st component.comp2 - the second component to layout.constraint2 - the layout constraint for the 2nd component.
JPanel instance, enclosing the 2 components plus the filler.public boolean isPersistent()
isPersistent in interface OptionOption.isPersistent()public void setPersistent(boolean persistent)
persistent - true if the value should be saved, false otherwise.
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||