Package org.jppf.ui.options
Class ComboBoxOption
java.lang.Object
org.jppf.ui.options.AbstractOptionProperties
org.jppf.ui.options.AbstractOptionElement
org.jppf.ui.options.AbstractOption
org.jppf.ui.options.ComboBoxOption
- All Implemented Interfaces:
Serializable,Option,OptionElement,OptionProperties
Option that uses a combo box to select its value.
- Author:
- Laurent Cohen
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected JLabelLabel associated with the combo box.The items in the drop down list.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.Initialize this combo box option with the specified parameters. -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateUI()Create the UI components for this option.Get the combo box used to select one among several items.getItems()Get the list of items in the combo box.getValue()Get the current value for this option.voidsetEnabled(boolean enabled) Enable or disable this option.voidSet the list of items in the combo box.protected voidPropagate the selection changes in the underlying combo box to the listeners to this option.voidSet the current value for this option.Methods inherited from class org.jppf.ui.options.AbstractOption
addValueChangeListener, fireValueChanged, isPersistent, 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
-
Field Details
-
comboLabel
Label associated with the combo box. -
items
The items in the drop down list.
-
-
Constructor Details
-
ComboBoxOption
public ComboBoxOption()Constructor provided as a convenience to facilitate the creation of option elements through reflexion. -
ComboBoxOption
Initialize this combo box option with the specified parameters.- Parameters:
name- this component's name.label- the label displayed with the checkbox.tooltip- the tooltip associated with the combobox.value- the initially selected value of this component.items- the initial list of items in the combo box.
-
-
Method Details
-
createUI
public void createUI()Create the UI components for this option.- Specified by:
createUIin classAbstractOptionProperties
-
getValue
Get the current value for this option.- Specified by:
getValuein interfaceOption- Overrides:
getValuein classAbstractOption- Returns:
- a
Booleaninstance.
-
setValue
Set the current value for this option.- Overrides:
setValuein classAbstractOption- Parameters:
value- aBooleaninstance.
-
setupValueChangeNotifications
protected void setupValueChangeNotifications()Propagate the selection changes in the underlying combo box to the listeners to this option.- 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.
-
getItems
Get the list of items in the combo box.- Returns:
- a list of
Objectinstances.
-
setItems
Set the list of items in the combo box.- Parameters:
items- a list ofObjectinstances.
-
getComboBox
Get the combo box used to select one among several items.- Returns:
- a
JComboBoxinstance.
-