Package org.jppf.ui.options
Class JavaOption
java.lang.Object
org.jppf.ui.options.AbstractOptionProperties
org.jppf.ui.options.AbstractOptionElement
org.jppf.ui.options.AbstractOption
org.jppf.ui.options.JavaOption
- All Implemented Interfaces:
Serializable,Option,OptionElement,OptionProperties
An option that displays a UI component created through a Java class.
- Author:
- Laurent Cohen
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAbstract superclass for mouse listeners set on this type of option. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StringThe fully qualified class name of the UI component to instantiate.protected JComponentThe instance of the class that is created.protected StringName of the mouseListener to set on this element.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.Get the fully qualified class name of the UI component to instantiate.Get the instance of the class that is created.Get the class name of the mouseListener to set on this element.voidsetClassName(String className) Set the fully qualified class name of the UI component to instantiate.voidsetEnabled(boolean enabled) Enable or disable this option.voidsetMouseListenerClassName(String mouseListenerClassName) Set the class name of the mouseListener to set on this element.protected voidPropagate the state changes of the underlying component to the listeners to this component.Methods inherited from class org.jppf.ui.options.AbstractOption
addValueChangeListener, fireValueChanged, getValue, 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
-
className
The fully qualified class name of the UI component to instantiate. -
mouseListenerClassName
Name of the mouseListener to set on this element. -
instance
The instance of the class that is created.
-
-
Constructor Details
-
JavaOption
public JavaOption()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()Propagate the state changes of the underlying component to the listeners to this component.- 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:
-
getClassName
Get the fully qualified class name of the UI component to instantiate.- Returns:
- the class name as a string.
-
setClassName
Set the fully qualified class name of the UI component to instantiate.- Parameters:
className- the class name as a string.
-
getMouseListenerClassName
Get the class name of the mouseListener to set on this element.- Returns:
- the class name as a string.
-
setMouseListenerClassName
Set the class name of the mouseListener to set on this element.- Parameters:
mouseListenerClassName- the class name as a string.
-
getInstance
Get the instance of the class that is created.- Returns:
- a
JComponent.
-