Package org.jppf.ui.options
Class TextOption
java.lang.Object
org.jppf.ui.options.AbstractOptionProperties
org.jppf.ui.options.AbstractOptionElement
org.jppf.ui.options.AbstractOption
org.jppf.ui.options.TextOption
- All Implemented Interfaces:
Serializable,Option,OptionElement,OptionProperties
- Direct Known Subclasses:
PasswordOption,PlainTextOption
Text option displayed as a text field.
- Author:
- Laurent Cohen
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected JTextFieldText field containing the option value as text.protected JLabelLabel associated with the text field.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.TextOption(String name, String label, String tooltip, String value) Initialize this text option with the specified parameters. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract JTextFieldCreate the text field that holds the value of this option.voidcreateUI()Create the UI components for this option.getValue()Get the text in the text field.voidsetEnabled(boolean enabled) Enable or disable this option.protected voidAdd a listener to the underlying text document, to receive and propagate change events.Methods inherited from class org.jppf.ui.options.AbstractOption
addValueChangeListener, fireValueChanged, isPersistent, layoutComponents, layoutComponents, removeValueChangeListener, setPersistent, setValue, 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
-
field
Text field containing the option value as text. -
fieldLabel
Label associated with the text field.
-
-
Constructor Details
-
TextOption
public TextOption()Constructor provided as a convenience to facilitate the creation of option elements through reflexion. -
TextOption
Initialize this text option with the specified parameters.- Parameters:
name- this component's name.label- the label displayed with the checkbox.tooltip- the tooltip associated with the checkbox.value- the initial value of this component.
-
-
Method Details
-
createUI
public void createUI()Create the UI components for this option.- Specified by:
createUIin classAbstractOptionProperties
-
createField
Create the text field that holds the value of this option.- Returns:
- a JTextField instance.
-
getValue
Get the text in the text field.- Specified by:
getValuein interfaceOption- Overrides:
getValuein classAbstractOption- Returns:
- a string value.
- See Also:
-
setupValueChangeNotifications
protected void setupValueChangeNotifications()Add a listener to the underlying text document, to receive and propagate change events.- Specified by:
setupValueChangeNotificationsin classAbstractOption- See Also:
-
setEnabled
public void setEnabled(boolean enabled) Enable or disable this option.- Parameters:
enabled- true to enable this option, false to disable it.- See Also:
-