Class NodeSelectedController

java.lang.Object
introspector.controller.NodeSelectedController

public class NodeSelectedController extends Object
This controller defines how to act when a new node in the tree is selected.
  • Field Details

    • textArea

      private final JTextArea textArea
      Text area that describes the current node, calling its toString() method
    • labelClass

      private final JLabel labelClass
      Above the textArea, this label shows the runtime type of the object represented by the current node.
    • tree

      private final JTree tree
      The tree view
  • Constructor Details

    • NodeSelectedController

      public NodeSelectedController(JTree tree, JTextArea textArea, JLabel labelClass)
  • Method Details

    • selectedNodeChanged

      public void selectedNodeChanged(TreeSelectionEvent ignoredEvent)
      When the selected node is changed, its description is shown in the text area and its dynamic type in the label.
      Parameters:
      ignoredEvent - the event that characterizes the change.