Class AbstractTopologyMouseListener

java.lang.Object
java.awt.event.MouseAdapter
org.jppf.ui.monitoring.node.AbstractTopologyMouseListener
All Implemented Interfaces:
MouseListener, MouseMotionListener, MouseWheelListener, EventListener
Direct Known Subclasses:
JVMHealthTreeTableMouseListener, NodeTreeTableMouseListener

public abstract class AbstractTopologyMouseListener extends MouseAdapter
Mouse listener for the node data panel. Processes right-click events to display popup menus.
Author:
Laurent Cohen
  • Field Details

    • EMPTY_TOPOLOGY_DATA_ARRAY

      protected static final org.jppf.client.monitoring.topology.AbstractTopologyComponent[] EMPTY_TOPOLOGY_DATA_ARRAY
      Constant for an empty TopologyData array.
    • CANCEL_ICON

      protected static final String CANCEL_ICON
      Path to the cancel icon resource.
      See Also:
    • RESTART_ICON

      protected static final String RESTART_ICON
      Path to the restart icon resource.
      See Also:
    • data

      protected org.jppf.client.monitoring.topology.AbstractTopologyComponent[] data
      Array of current corresponding jmx connections.
    • actionHandler

      protected JTreeTableActionHandler actionHandler
      The object that handles toolbar and menu actions.
  • Constructor Details

    • AbstractTopologyMouseListener

      public AbstractTopologyMouseListener(JTreeTableActionHandler actionHandler)
      Initialize this mouse listener.
      Parameters:
      actionHandler - the object that handles toolbar and menu actions.
  • Method Details

    • mousePressed

      public void mousePressed(MouseEvent event)
      Processes right-click events to display popup menus.
      Specified by:
      mousePressed in interface MouseListener
      Overrides:
      mousePressed in class MouseAdapter
      Parameters:
      event - the mouse event to process.
      See Also:
    • createPopupMenu

      protected abstract JPopupMenu createPopupMenu(MouseEvent event)
      Create the popup menu.
      Parameters:
      event - the mouse event to process.
      Returns:
      a JPopupMenu instance.
    • addItem

      protected void addItem(JPopupMenu menu, String actionName, Point location)
      Create a menu item and add it to the specified menu.
      Parameters:
      menu - the popoup menu to add the item to.
      actionName - the name of action associated with the new item.
      location - the location to use for any window create by the action.