Class ObjTocPane.Entry

java.lang.Object
org.bzdev.swing.ObjTocPane.Entry
Enclosing class:
ObjTocPane

public class ObjTocPane.Entry extends Object
An entry for a table of contents. Instances of this class are passed to action listeners as the source of an ActionEvent. A default entry exists for a missing selection.
  • Method Details

    • toString

      public String toString()
      Return a string representing this object. The title is returned because this will typically be a readable name for the corresponding object.
      Overrides:
      toString in class Object
      Returns:
      the title
    • getTitle

      public String getTitle()
      get the title for this entry. The title is the name that will appear in the component
      Returns:
      the title; null if none.
    • getValue

      public Object getValue()
      Get the value for this entry. The value is the object associated with the selected row.
      Returns:
      the value; null if none.
    • getMouseEvent

      public MouseEvent getMouseEvent()
      Get the mouseEvent that triggered an action listener. Calls to this method are valid only in action listeners.
      Returns:
      the last mouse event for this object; null if there is none.
    • getParent

      public JTree getParent()
      Get the parent of this Entry. The parent will be the ObjTocPane that generated this event. Due to the possible generation of multiple events, some of the values returned by the parent's access methods may change immediately after an action event is processed. One should only trust access methods that such a sequence of events will not change. One can defer execution of some code by using methods from SwingUtilities.
      Returns:
      the JTree that contains this Entry.