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 Details

    • parent

      protected OptionElement parent
      The parent panel for this option element.
    • root

      protected OptionElement 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

      public OptionElement getParent()
      Get the parent panel for this option.
      Specified by:
      getParent in interface OptionElement
      Returns:
      an ElementOption instance.
      See Also:
    • setParent

      public void setParent(OptionElement parent)
      Set the parent panel for this option.
      Parameters:
      parent - an ElementOption instance.
    • getRoot

      public OptionElement getRoot()
      Get the root of the option tree this option belongs to.
      Specified by:
      getRoot in interface OptionElement
      Returns:
      a OptionElement instance.
      See Also:
    • getPath

      public TreePath getPath()
      Get the path of this element in the option tree.
      Specified by:
      getPath in interface OptionElement
      Returns:
      a TreePath whose components are OptionElement instances.
      See Also:
    • getStringPath

      public String getStringPath()
      Get the path of this element in the option tree.
      Specified by:
      getStringPath in interface OptionElement
      Returns:
      a TreePath whose components are OptionElement instances.
      See Also:
    • findElement

      public OptionElement findElement(String path)
      Find the element with the specified path in the options tree. The path can be absolute, in which case it starts with a "e;/&quote, otherwise it is considered relative to the requesting element.
      Specified by:
      findElement in interface OptionElement
      Parameters:
      path - the path of the element to find.
      Returns:
      an OptionElement instance, or null if no element could be found with the specified path.
      See Also:
    • getChildForName

      protected OptionElement getChildForName(String childName)
      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

      public String toString()
      Get a string representation of this element.
      Overrides:
      toString in class Object
      Returns:
      a string providing information about this option element.
      See Also:
    • findAllWithName

      public List<OptionElement> findAllWithName(String name)
      Find all the elements with the specified name in the subtree of which this element is the root.
      Specified by:
      findAllWithName in interface OptionElement
      Parameters:
      name - the name of the elements to find.
      Returns:
      a list of OptionElement instances, or null if no element could be found with the specified name. The resulting list can be empty, but never null.
      See Also:
    • findFirstWithName

      public OptionElement findFirstWithName(String name)
      Find the first element with the specified name in the subtree of which this element is the root.
      Specified by:
      findFirstWithName in interface OptionElement
      Parameters:
      name - the name of the element to find.
      Returns:
      an OptionElement instance, or null if no element could be found with the specified name.
      See Also:
    • findLastWithName

      public OptionElement findLastWithName(String name)
      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:
      findLastWithName in interface OptionElement
      Parameters:
      name - the name of the element to find.
      Returns:
      an OptionElement instance, or null if no element could be found with the specified name.
      See Also:
    • findAll

      protected void findAll(String name, List<OptionElement> list)
      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 of OptionElement instances, to fill with the elements found. could be found with the specified name. The resulting list can be empty, but never null.