Class TreeMouseClickController

java.lang.Object
introspector.controller.TreeMouseClickController
All Implemented Interfaces:
MouseListener, EventListener

public class TreeMouseClickController extends Object implements MouseListener
This controller implements different ways of expanding tree views (JTrees).
  • Field Details

    • tree

      private final JTree tree
      The tree view
    • popupMenu

      private final JPopupMenu popupMenu
      The tree view
  • Constructor Details

    • TreeMouseClickController

      public TreeMouseClickController(JTree tree, JPopupMenu popupMenu)
  • Method Details

    • mouseClicked

      public void mouseClicked(MouseEvent event)
      When the mouse is right-clicked, a popup menu is shown
      Specified by:
      mouseClicked in interface MouseListener
      Parameters:
      event - the event that characterizes mouse click.
    • mousePressed

      public void mousePressed(MouseEvent e)
      No action is performed when the mouse is pressed
      Specified by:
      mousePressed in interface MouseListener
      Parameters:
      e - the event to be processed
    • mouseReleased

      public void mouseReleased(MouseEvent e)
      No action is performed when the mouse is released
      Specified by:
      mouseReleased in interface MouseListener
      Parameters:
      e - the event to be processed
    • mouseEntered

      public void mouseEntered(MouseEvent e)
      No action is performed when the mouse is entered
      Specified by:
      mouseEntered in interface MouseListener
      Parameters:
      e - the event to be processed
    • mouseExited

      public void mouseExited(MouseEvent e)
      No action is performed when the mouse exits
      Specified by:
      mouseExited in interface MouseListener
      Parameters:
      e - the event to be processed