Class GraphOption
java.lang.Object
org.jppf.ui.options.AbstractOptionProperties
org.jppf.ui.options.AbstractOptionElement
org.jppf.ui.options.AbstractOption
org.jppf.ui.monitoring.node.graph.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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassclassclassListens to resize events to perform a graph layout. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ActionHandlerManages the actions for this graph.protected edu.uci.ics.jung.visualization.GraphZoomScrollPaneThe graph component.protected StringThe graph layout.protected org.jppf.ui.monitoring.node.graph.LayoutFactoryCreates the layout objects based on their name.protected edu.uci.ics.jung.visualization.VisualizationViewer<org.jppf.client.monitoring.topology.AbstractTopologyComponent,Number> The graph visualization component.Fields inherited from class org.jppf.ui.options.AbstractOption
listeners, persistent, valueFields inherited from class org.jppf.ui.options.AbstractOptionElement
parent, rootFields inherited from class org.jppf.ui.options.AbstractOptionProperties
bordered, componentConstraints, detachable, eventsEnabled, finalizer, horizontalScrollbar, iconPath, initializer, label, layoutConstraints, mouseListener, name, scripts, scrollable, toolTipText, UIComponent, verticalScrollbar -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateUI()Create the UI components for this option.Get the object that handles all actions in toolbars or popup menus.Get the object that handles operations modifying the graph.Get the current layout.Get the UI component for this option.edu.uci.ics.jung.visualization.VisualizationViewer<org.jppf.client.monitoring.topology.AbstractTopologyComponent,Number> Get the graph visualization component.voidinit()Initialize the graph refreshing.booleanDetermine whether to automatically layout the graph.booleanvoidpopulate()Redraw the graph.voidsetAutoLayout(boolean autoLayout) Specify whether to automatically layout the graph.voidsetEnabled(boolean enabled) Enable or disable this option.voidSet the current layout.voidsetShowMasterSlaveRelationShip(boolean show) voidInitialize all actions used in the panel.protected voidConcrete subclasses should implement this method to properly forward changes in the value edited by the underlying UI component/editor.Methods inherited from class org.jppf.ui.options.AbstractOption
addValueChangeListener, fireValueChanged, getValue, isPersistent, layoutComponents, layoutComponents, removeValueChangeListener, setPersistent, setValue, toStringMethods inherited from class org.jppf.ui.options.AbstractOptionElement
findAll, findAllWithName, findElement, findFirstWithName, findLastWithName, getChildForName, getParent, getPath, getRoot, getStringPath, setParentMethods inherited from class org.jppf.ui.options.AbstractOptionProperties
createScrollPane, getComponentConstraints, getFinalizer, getIconPath, getInitializer, getLabel, getLayoutConstraints, getMouseListener, getName, getScripts, getToolTipText, isBordered, isDetachable, isEventsEnabled, isHorizontalScrollbar, isScrollable, isVerticalScrollbar, setBordered, setComponentConstraints, setDetachable, setEditable, setEventsEnabled, setFinalizer, setHorizontalScrollbar, setIconPath, setInitializer, setLabel, setLayoutConstraints, setMouseListener, setName, setScrollable, setToolTipText, setUIComponent, setVerticalScrollbarMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.jppf.ui.options.OptionElement
findAllWithName, findElement, findFirstWithName, findLastWithName, getParent, getPath, getRoot, getStringPathMethods inherited from interface org.jppf.ui.options.OptionProperties
getComponentConstraints, getFinalizer, getIconPath, getInitializer, getLabel, getLayoutConstraints, getMouseListener, getName, getScripts, getToolTipText, isBordered, isDetachable, isEventsEnabled, isScrollable, setComponentConstraints, setEditable, setEventsEnabled, setLayoutConstraints, setMouseListener
-
Field Details
-
viewer
protected edu.uci.ics.jung.visualization.VisualizationViewer<org.jppf.client.monitoring.topology.AbstractTopologyComponent,Number> viewerThe graph visualization component. -
graphComponent
protected edu.uci.ics.jung.visualization.GraphZoomScrollPane graphComponentThe graph component. -
layout
The graph layout. -
layoutFactory
protected transient org.jppf.ui.monitoring.node.graph.LayoutFactory layoutFactoryCreates the layout objects based on their name. -
actionHandler
Manages the actions for this graph.
-
-
Constructor Details
-
GraphOption
public GraphOption()Default constructor.
-
-
Method Details
-
createUI
public void createUI()Description copied from class:AbstractOptionPropertiesCreate the UI components for this option.- Specified by:
createUIin classAbstractOptionProperties
-
init
public void init()Initialize the graph refreshing. -
getUIComponent
Description copied from class:AbstractOptionPropertiesGet the UI component for this option.- Specified by:
getUIComponentin interfaceOptionProperties- Overrides:
getUIComponentin classAbstractOptionProperties- Returns:
- a
JComponentinstance.
-
getLayout
Get the current layout.- Returns:
- the layout.
-
setLayout
Set the current layout.- Parameters:
name- the layout name.
-
getActionHandler
Description copied from interface:ActionHolderGet the object that handles all actions in toolbars or popup menus.- Specified by:
getActionHandlerin interfaceActionHolder- Returns:
- a
JTreeTableActionHandlerinstance.
-
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
VisualizationViewerinstance.
-
populate
public void populate()Redraw the graph. -
getGraphHandler
Get the object that handles operations modifying the graph.- Returns:
- a
GraphTopologyHandlerinstance.
-
setEnabled
public void setEnabled(boolean enabled) Description copied from interface:OptionPropertiesEnable or disable this option.- Specified by:
setEnabledin interfaceOptionProperties- Parameters:
enabled- true to enable this option, false to disable it.
-
setupValueChangeNotifications
protected void setupValueChangeNotifications()Description copied from class:AbstractOptionConcrete subclasses should implement this method to properly forward changes in the value edited by the underlying UI component/editor.- Specified by:
setupValueChangeNotificationsin classAbstractOption
-
isAutoLayout
public boolean isAutoLayout()Determine whether to automatically layout the graph.- Returns:
trueif auto-layout is on,falseotherwise.
-
setAutoLayout
public void setAutoLayout(boolean autoLayout) Specify whether to automatically layout the graph.- Parameters:
autoLayout-trueto set auto-layout on,falseotherwise.
-
isShowMasterSlaveRelationShip
public boolean isShowMasterSlaveRelationShip()- Specified by:
isShowMasterSlaveRelationShipin interfaceMasterSlaveRelationShipsHandler- Returns:
- whether to show the master/slave relationships.
-
setShowMasterSlaveRelationShip
public void setShowMasterSlaveRelationShip(boolean show) - Specified by:
setShowMasterSlaveRelationShipin interfaceMasterSlaveRelationShipsHandler- Parameters:
show- whether to show the master/slave relationships.
-