Package org.jppf.ui.options
Class ButtonOption
java.lang.Object
org.jppf.ui.options.AbstractOptionProperties
org.jppf.ui.options.AbstractOptionElement
org.jppf.ui.options.AbstractOption
org.jppf.ui.options.ButtonOption
- All Implemented Interfaces:
Serializable,Option,OptionElement,OptionProperties
Option implementation with a
JButton or JToggleButton as the underlying component.- Author:
- Laurent Cohen
- See Also:
-
Field Summary
Fields inherited from class org.jppf.ui.options.AbstractOption
listeners, persistent, valueFields inherited from class org.jppf.ui.options.AbstractOptionElement
parent, rootFields inherited from class org.jppf.ui.options.AbstractOptionProperties
bordered, componentConstraints, detachable, eventsEnabled, finalizer, horizontalScrollbar, iconPath, initializer, label, layoutConstraints, mouseListener, name, scripts, scrollable, toolTipText, UIComponent, verticalScrollbar -
Constructor Summary
ConstructorsConstructorDescriptionConstructor provided as a convenience to facilitate the creation of option elements through reflexion. -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateUI()Create the UI components for this option.getValue()The value of this option.booleanDetermine whether the value of this option should be saved in the user preferences.booleanisToggle()Determine whether this object is aJToggleButtonor a simpleJButton.voidsetEnabled(boolean enabled) Enable or disable this option.voidsetToggle(boolean toggle) Specify whether this object is aJToggleButtonor a simpleJButton.protected voidConcrete subclasses should implement this method to properly forward changes in the value edited by the underlying UI component/editor.voidSet the value of this option.Methods inherited from class org.jppf.ui.options.AbstractOption
addValueChangeListener, fireValueChanged, layoutComponents, layoutComponents, removeValueChangeListener, setPersistent, toStringMethods inherited from class org.jppf.ui.options.AbstractOptionElement
findAll, findAllWithName, findElement, findFirstWithName, findLastWithName, getChildForName, getParent, getPath, getRoot, getStringPath, setParentMethods inherited from class org.jppf.ui.options.AbstractOptionProperties
createScrollPane, getComponentConstraints, getFinalizer, getIconPath, getInitializer, getLabel, getLayoutConstraints, getMouseListener, getName, getScripts, getToolTipText, getUIComponent, isBordered, isDetachable, isEventsEnabled, isHorizontalScrollbar, isScrollable, isVerticalScrollbar, setBordered, setComponentConstraints, setDetachable, setEditable, setEventsEnabled, setFinalizer, setHorizontalScrollbar, setIconPath, setInitializer, setLabel, setLayoutConstraints, setMouseListener, setName, setScrollable, setToolTipText, setUIComponent, setVerticalScrollbarMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.jppf.ui.options.OptionElement
findAllWithName, findElement, findFirstWithName, findLastWithName, getParent, getPath, getRoot, getStringPathMethods inherited from interface org.jppf.ui.options.OptionProperties
getComponentConstraints, getFinalizer, getIconPath, getInitializer, getLabel, getLayoutConstraints, getMouseListener, getName, getScripts, getToolTipText, getUIComponent, isBordered, isDetachable, isEventsEnabled, isScrollable, setComponentConstraints, setEditable, setEventsEnabled, setLayoutConstraints, setMouseListener
-
Constructor Details
-
ButtonOption
public ButtonOption()Constructor provided as a convenience to facilitate the creation of option elements through reflexion.
-
-
Method Details
-
createUI
public void createUI()Description copied from class:AbstractOptionPropertiesCreate the UI components for this option.- Specified by:
createUIin classAbstractOptionProperties
-
setupValueChangeNotifications
protected void setupValueChangeNotifications()Description copied from class:AbstractOptionConcrete subclasses should implement this method to properly forward changes in the value edited by the underlying UI component/editor.- Specified by:
setupValueChangeNotificationsin classAbstractOption
-
setEnabled
public void setEnabled(boolean enabled) Enable or disable this option.- Parameters:
enabled- true to enable this option, false to disable it.
-
isPersistent
public boolean isPersistent()Description copied from class:AbstractOptionDetermine whether the value of this option should be saved in the user preferences.- Specified by:
isPersistentin interfaceOption- Overrides:
isPersistentin classAbstractOption- Returns:
- true if the value should be saved, false otherwise.
-
isToggle
public boolean isToggle()Determine whether this object is aJToggleButtonor a simpleJButton.- Returns:
trueif this object is a toggle button,falseotherwise.
-
setToggle
public void setToggle(boolean toggle) Specify whether this object is aJToggleButtonor a simpleJButton.- Parameters:
toggle-trueif this object is a toggle button,falseotherwise.
-
getValue
Description copied from class:AbstractOptionThe value of this option.- Specified by:
getValuein interfaceOption- Overrides:
getValuein classAbstractOption- Returns:
- the value as an
Objectinstance.
-
setValue
Description copied from class:AbstractOptionSet the value of this option.- Overrides:
setValuein classAbstractOption- Parameters:
value- the value as anObjectinstance.
-