Package org.jppf.ui.options
Class AbstractOptionElement
java.lang.Object
org.jppf.ui.options.AbstractOptionProperties
org.jppf.ui.options.AbstractOptionElement
- All Implemented Interfaces:
Serializable,OptionElement,OptionProperties
- Direct Known Subclasses:
AbstractOption,AbstractOptionContainer
public abstract class AbstractOptionElement
extends AbstractOptionProperties
implements OptionElement
Default abstract implementation of the
OptionElement interface.- Author:
- Laurent Cohen
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected OptionElementThe parent panel for this option element.protected OptionElementThe root of the option tree this option belongs to.Fields 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
ConstructorsModifierConstructorDescriptionprotectedConstructor provided as a convenience to facilitate the creation of option elements through reflexion. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidfindAll(String name, List<OptionElement> list) Find all the elements with the specified name in the subtree of which this element is the root.findAllWithName(String name) Find all the elements with the specified name in the subtree of which this element is the root.findElement(String path) Find the element with the specified path in the options tree.findFirstWithName(String name) Find the first element with the specified name in the subtree of which this element is the root.findLastWithName(String name) Find the last element with the specified name in the subtree of which this element is the root.protected OptionElementgetChildForName(String childName) Find the child element of this option element with the specified name.Get the parent panel for this option.getPath()Get the path of this element in the option tree.getRoot()Get the root of the option tree this option belongs to.Get the path of this element in the option tree.voidsetParent(OptionElement parent) Set the parent panel for this option.toString()Get a string representation of this element.Methods inherited from class org.jppf.ui.options.AbstractOptionProperties
createScrollPane, createUI, 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.OptionProperties
getComponentConstraints, getFinalizer, getIconPath, getInitializer, getLabel, getLayoutConstraints, getMouseListener, getName, getScripts, getToolTipText, getUIComponent, isBordered, isDetachable, isEventsEnabled, isScrollable, setComponentConstraints, setEditable, setEnabled, setEventsEnabled, setLayoutConstraints, setMouseListener
-
Field Details
-
parent
The parent panel for this option element. -
root
The root of the option tree this option belongs to.
-
-
Constructor Details
-
AbstractOptionElement
protected AbstractOptionElement()Constructor provided as a convenience to facilitate the creation of option elements through reflexion.
-
-
Method Details
-
getParent
Get the parent panel for this option.- Specified by:
getParentin interfaceOptionElement- Returns:
- an
ElementOptioninstance. - See Also:
-
setParent
Set the parent panel for this option.- Parameters:
parent- anElementOptioninstance.
-
getRoot
Get the root of the option tree this option belongs to.- Specified by:
getRootin interfaceOptionElement- Returns:
- a
OptionElementinstance. - See Also:
-
getPath
Get the path of this element in the option tree.- Specified by:
getPathin interfaceOptionElement- Returns:
- a
TreePathwhose components areOptionElementinstances. - See Also:
-
getStringPath
Get the path of this element in the option tree.- Specified by:
getStringPathin interfaceOptionElement- Returns:
- a
TreePathwhose components areOptionElementinstances. - See Also:
-
findElement
Find the element with the specified path in the options tree. The path can be absolute, in which case it starts with a "e;/"e, otherwise it is considered relative to the requesting element.- Specified by:
findElementin interfaceOptionElement- Parameters:
path- the path of the element to find.- Returns:
- an
OptionElementinstance, or null if no element could be found with the specified path. - See Also:
-
getChildForName
Find the child element of this option element with the specified name.- Parameters:
childName- the name of the child to find.- Returns:
- the child with the specified name, or null if this element is not an option page, or if no child was found with the given name.
-
toString
Get a string representation of this element. -
findAllWithName
Find all the elements with the specified name in the subtree of which this element is the root.- Specified by:
findAllWithNamein interfaceOptionElement- Parameters:
name- the name of the elements to find.- Returns:
- a list of
OptionElementinstances, or null if no element could be found with the specified name. The resulting list can be empty, but never null. - See Also:
-
findFirstWithName
Find the first element with the specified name in the subtree of which this element is the root.- Specified by:
findFirstWithNamein interfaceOptionElement- Parameters:
name- the name of the element to find.- Returns:
- an
OptionElementinstance, or null if no element could be found with the specified name. - See Also:
-
findLastWithName
Find the last element with the specified name in the subtree of which this element is the root. The notion of last element relates to a depth-first search in the tree.- Specified by:
findLastWithNamein interfaceOptionElement- Parameters:
name- the name of the element to find.- Returns:
- an
OptionElementinstance, or null if no element could be found with the specified name. - See Also:
-
findAll
Find all the elements with the specified name in the subtree of which this element is the root.- Parameters:
name- the name of the elements to find.list- a list ofOptionElementinstances, to fill with the elements found. could be found with the specified name. The resulting list can be empty, but never null.
-