Module org.jpo

Class ListNavigator

java.lang.Object
org.jpo.datamodel.NodeNavigator
org.jpo.datamodel.ListNavigator
All Implemented Interfaces:
NodeNavigatorInterface
Direct Known Subclasses:
FlatGroupNavigator

public class ListNavigator extends NodeNavigator
This class implements the NodeNavigator Interface so that all the pictures of a specified List can be browsed sequentially.
  • Constructor Details

  • Method Details

    • getTitle

      public String getTitle()
      Returns the title of the node set
      Returns:
      the Title
    • getNumberOfNodes

      public int getNumberOfNodes()
      Returns the number of pictures in this group. Starts at 1 like all arrays.
      Returns:
      The number of pictures
    • getNode

      public SortableDefaultMutableTreeNode getNode(int index)
      This method returns the node for the indicated position in the group.
      Parameters:
      index - The component index that is to be returned. The number is from 0 to getNumberOfNodes().
      Returns:
      The node for the specified index.
    • add

      public void add(SortableDefaultMutableTreeNode addNode)
      adds a node to the List
      Parameters:
      addNode - a node to add to the allPictures List
    • add

      public void add(Collection<SortableDefaultMutableTreeNode> nodes)
      adds a node to the List
      Parameters:
      nodes - a node to add to the allPictures List
    • removeNode

      public void removeNode(SortableDefaultMutableTreeNode removeNode)
      Removes a node from the List
      Parameters:
      removeNode - a node to add to the allPictures List
    • clear

      public void clear()
      Clears all nodes from the List
    • toString

      public String toString()
      Returns a description of the navigator
      Overrides:
      toString in class Object
      Returns:
      A helpful description