org.jppf.ui.monitoring.node
Class NodeDataPanel

java.lang.Object
  extended by org.jppf.ui.options.AbstractOptionProperties
      extended by org.jppf.ui.options.AbstractOptionElement
          extended by org.jppf.ui.options.AbstractOption
              extended by org.jppf.ui.treetable.AbstractTreeTableOption
                  extended by org.jppf.ui.monitoring.node.NodeDataPanel
All Implemented Interfaces:
Serializable, EventListener, ClientListener, ActionHolder, Option, OptionElement, OptionProperties

public class NodeDataPanel
extends AbstractTreeTableOption
implements ClientListener, ActionHolder

Panel displaying the tree of all driver connections and attached nodes.

Author:
Laurent Cohen
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.jppf.ui.treetable.AbstractTreeTableOption
actionHandler, BASE, model, treeTable, treeTableRoot
 
Fields inherited from class org.jppf.ui.options.AbstractOption
listeners, persistent, value
 
Fields inherited from class org.jppf.ui.options.AbstractOptionElement
parent, root
 
Fields inherited from class org.jppf.ui.options.AbstractOptionProperties
bordered, componentConstraints, eventsEnabled, finalizer, iconPath, initializer, label, layoutConstraints, name, scripts, scrollable, toolTipText, UIComponent
 
Constructor Summary
NodeDataPanel()
          Initialize this panel with the specified information.
 
Method Summary
 void connectionFailed(ClientEvent event)
          Notifiy this listener that a driver connection has failed.
 void createUI()
          Create, initialize and layout the GUI components displayed in this panel.
 void driverAdded(JPPFClientConnection connection)
          Called to notify that a driver was added.
 void driverRemoved(String driverName, boolean removeNodesOnly)
          Called to notify that a driver was removed.
 Map<String,JPPFClientConnection> getAllDriverNames()
          Get a mapping of driver names to their corresponding connection.
 NodeRefreshHandler getRefreshHandler()
          Get the object that handles the automatic and manual refresh of the tree.
 void newConnection(ClientEvent event)
          Notifiy this listener that a new driver connection was created.
 void nodeAdded(DefaultMutableTreeNode driverNode, JPPFManagementInfo nodeInfo)
          Called to notify that a node was added to a driver.
 void nodeAdded(String driverName, JPPFManagementInfo nodeInfo)
          Called to notify that a node was added to a driver.
 void nodeDataUpdated(String driverName, String nodeName)
          Called when the state information of a node has changed.
 void nodeRemoved(String driverName, String nodeName)
          Called to notify that a node was removed from a driver.
 void refreshNodeStates()
          Refresh the states of all displayed nodes.
 void refreshStatusBar()
          Refresh the number of active servers and nodes in the status bar.
 void setupActions()
          Initialize all actions used in the panel.
 
Methods inherited from class org.jppf.ui.treetable.AbstractTreeTableOption
getActionHandler, getModel, getTreeTable, getTreeTableRoot, localize, saveTableColumnsWidth, setEnabled, setEventsEnabled, setupTableColumns, setupValueChangeNotifications
 
Methods inherited from class org.jppf.ui.options.AbstractOption
addValueChangeListener, fireValueChanged, getValue, isPersistent, layoutComponents, layoutComponents, removeValueChangeListener, setPersistent, setValue
 
Methods inherited from class org.jppf.ui.options.AbstractOptionElement
findAll, findAllWithName, findElement, findFirstWithName, findLastWithName, getChildForName, getParent, getPath, getRoot, getStringPath, setParent, toString
 
Methods inherited from class org.jppf.ui.options.AbstractOptionProperties
getComponentConstraints, getFinalizer, getIconPath, getInitializer, getLabel, getLayoutConstraints, getName, getScripts, getToolTipText, getUIComponent, isBordered, isEventsEnabled, isScrollable, setBordered, setComponentConstraints, setEditable, setFinalizer, setIconPath, setInitializer, setLabel, setLayoutConstraints, setName, setScrollable, setToolTipText, setUIComponent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jppf.ui.actions.ActionHolder
getActionHandler
 
Methods inherited from interface org.jppf.ui.options.OptionElement
findAllWithName, findElement, findFirstWithName, findLastWithName, getParent, getPath, getRoot, getStringPath
 
Methods inherited from interface org.jppf.ui.options.OptionProperties
getComponentConstraints, getFinalizer, getIconPath, getInitializer, getLabel, getLayoutConstraints, getName, getScripts, getToolTipText, getUIComponent, isBordered, isEventsEnabled, isScrollable, setComponentConstraints, setEditable, setLayoutConstraints
 

Constructor Detail

NodeDataPanel

public NodeDataPanel()
Initialize this panel with the specified information.

Method Detail

createUI

public void createUI()
Create, initialize and layout the GUI components displayed in this panel.

Specified by:
createUI in class AbstractOptionProperties

nodeDataUpdated

public void nodeDataUpdated(String driverName,
                            String nodeName)
Called when the state information of a node has changed.

Parameters:
driverName - the name of the driver to which the node is attached.
nodeName - the name of the node to update.

driverAdded

public void driverAdded(JPPFClientConnection connection)
Called to notify that a driver was added.

Parameters:
connection - a reference to the driver connection.

driverRemoved

public void driverRemoved(String driverName,
                          boolean removeNodesOnly)
Called to notify that a driver was removed.

Parameters:
driverName - the name of the driver to remove.
removeNodesOnly - true if only the nodes attached to the driver are to be removed.

nodeAdded

public void nodeAdded(String driverName,
                      JPPFManagementInfo nodeInfo)
Called to notify that a node was added to a driver.

Parameters:
driverName - the name of the driver to which the node is added.
nodeInfo - the object that encapsulates the node addition.

nodeAdded

public void nodeAdded(DefaultMutableTreeNode driverNode,
                      JPPFManagementInfo nodeInfo)
Called to notify that a node was added to a driver.

Parameters:
driverNode - the driver to which the node is added.
nodeInfo - the object that encapsulates the node addition.

nodeRemoved

public void nodeRemoved(String driverName,
                        String nodeName)
Called to notify that a node was removed from a driver.

Parameters:
driverName - the name of the driver from which the node is removed.
nodeName - the name of the node to remove.

getRefreshHandler

public NodeRefreshHandler getRefreshHandler()
Get the object that handles the automatic and manual refresh of the tree.

Returns:
a NodeRefreshHandler instance.

getAllDriverNames

public Map<String,JPPFClientConnection> getAllDriverNames()
Get a mapping of driver names to their corresponding connection.

Returns:
a map of string to JPPFClientConnection instances.

refreshNodeStates

public void refreshNodeStates()
Refresh the states of all displayed nodes.


setupActions

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


newConnection

public void newConnection(ClientEvent event)
Notifiy this listener that a new driver connection was created.

Specified by:
newConnection in interface ClientListener
Parameters:
event - the event to notify this listener of.
See Also:
ClientListener.newConnection(org.jppf.client.event.ClientEvent)

refreshStatusBar

public void refreshStatusBar()
Refresh the number of active servers and nodes in the status bar.


connectionFailed

public void connectionFailed(ClientEvent event)
Notifiy this listener that a driver connection has failed.

Specified by:
connectionFailed in interface ClientListener
Parameters:
event - the event to notify this listener of.


Copyright © 2005-2010 JPPF Team.