Class GraphOption

All Implemented Interfaces:
Serializable, ActionHolder, MasterSlaveRelationShipsHandler, Option, OptionElement, OptionProperties

public class GraphOption extends AbstractOption implements ActionHolder, MasterSlaveRelationShipsHandler
Displays and updates the graph view of the grid topology.
Author:
Laurent Cohen
See Also:
  • Field Details

    • viewer

      protected edu.uci.ics.jung.visualization.VisualizationViewer<org.jppf.client.monitoring.topology.AbstractTopologyComponent,Number> viewer
      The graph visualization component.
    • graphComponent

      protected edu.uci.ics.jung.visualization.GraphZoomScrollPane graphComponent
      The graph component.
    • layout

      protected transient String layout
      The graph layout.
    • layoutFactory

      protected transient org.jppf.ui.monitoring.node.graph.LayoutFactory layoutFactory
      Creates the layout objects based on their name.
    • actionHandler

      protected transient ActionHandler actionHandler
      Manages the actions for this graph.
  • Constructor Details

    • GraphOption

      public GraphOption()
      Default constructor.
  • Method Details

    • createUI

      public void createUI()
      Description copied from class: AbstractOptionProperties
      Create the UI components for this option.
      Specified by:
      createUI in class AbstractOptionProperties
    • init

      public void init()
      Initialize the graph refreshing.
    • getUIComponent

      public JComponent getUIComponent()
      Description copied from class: AbstractOptionProperties
      Get the UI component for this option.
      Specified by:
      getUIComponent in interface OptionProperties
      Overrides:
      getUIComponent in class AbstractOptionProperties
      Returns:
      a JComponent instance.
    • getLayout

      public String getLayout()
      Get the current layout.
      Returns:
      the layout.
    • setLayout

      public void setLayout(String name)
      Set the current layout.
      Parameters:
      name - the layout name.
    • getActionHandler

      public ActionHandler getActionHandler()
      Description copied from interface: ActionHolder
      Get the object that handles all actions in toolbars or popup menus.
      Specified by:
      getActionHandler in interface ActionHolder
      Returns:
      a JTreeTableActionHandler instance.
    • setupActions

      public void setupActions()
      Initialize all actions used in the panel.
    • getViewer

      public edu.uci.ics.jung.visualization.VisualizationViewer<org.jppf.client.monitoring.topology.AbstractTopologyComponent,Number> getViewer()
      Get the graph visualization component.
      Returns:
      a VisualizationViewer instance.
    • populate

      public void populate()
      Redraw the graph.
    • getGraphHandler

      public GraphTopologyHandler getGraphHandler()
      Get the object that handles operations modifying the graph.
      Returns:
      a GraphTopologyHandler instance.
    • setEnabled

      public void setEnabled(boolean enabled)
      Description copied from interface: OptionProperties
      Enable or disable this option.
      Specified by:
      setEnabled in interface OptionProperties
      Parameters:
      enabled - true to enable this option, false to disable it.
    • setupValueChangeNotifications

      protected void setupValueChangeNotifications()
      Description copied from class: AbstractOption
      Concrete subclasses should implement this method to properly forward changes in the value edited by the underlying UI component/editor.
      Specified by:
      setupValueChangeNotifications in class AbstractOption
    • isAutoLayout

      public boolean isAutoLayout()
      Determine whether to automatically layout the graph.
      Returns:
      true if auto-layout is on, false otherwise.
    • setAutoLayout

      public void setAutoLayout(boolean autoLayout)
      Specify whether to automatically layout the graph.
      Parameters:
      autoLayout - true to set auto-layout on, false otherwise.
    • isShowMasterSlaveRelationShip

      public boolean isShowMasterSlaveRelationShip()
      Specified by:
      isShowMasterSlaveRelationShip in interface MasterSlaveRelationShipsHandler
      Returns:
      whether to show the master/slave relationships.
    • setShowMasterSlaveRelationShip

      public void setShowMasterSlaveRelationShip(boolean show)
      Specified by:
      setShowMasterSlaveRelationShip in interface MasterSlaveRelationShipsHandler
      Parameters:
      show - whether to show the master/slave relationships.