Package com.nt.udc.admin.client.gui
Class NodeCanvas
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.nt.udc.admin.client.gui.NodeCanvas
- All Implemented Interfaces:
DNDComponentInterface
,AcctEventListener
,DropTargetListener
,ActionListener
,FocusListener
,KeyListener
,MouseListener
,MouseMotionListener
,ImageObserver
,ItemSelectable
,MenuContainer
,Serializable
,Remote
,EventListener
,Accessible
,Scrollable
public class NodeCanvas
extends JPanel
implements MouseListener, MouseMotionListener, ActionListener, Scrollable, AcctEventListener, DNDComponentInterface, DropTargetListener, ItemSelectable, FocusListener, KeyListener
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
-
Field Summary
FieldsModifier and TypeFieldDescriptionboolean
Fields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
actionPerformed
(ActionEvent event) void
addElement
(Object s) void
void
addNM()
void
addNode
(com.nt.udc.admin.NodeInfo ni) void
Indicates that status of the Admin Server has changed.void
void
void
void
createNewNode
(ActionEvent event) void
void
deleteNode
(NodeIcon node, boolean bridge) void
dragEnter
(DropTargetDragEvent event) is invoked when you are dragging over the DropSitevoid
dragExit
(DropTargetEvent event) is invoked when you are exit the DropSite without droppingvoid
dragOver
(DropTargetDragEvent event) is invoked when a drag operation is going onvoid
drop
(DropTargetDropEvent event) a drop has occurredvoid
is invoked if the use modifies the current drop gesturevoid
editNM()
void
void
fileChanged
(com.nt.udc.admin.FileItem file) Indicates that a system file changed.void
void
void
forgetNM()
getHosts()
int
Look at the integer labels of all currently existing nodes, and return the max plus one.getNode
(int i) int
getScrollableBlockIncrement
(Rectangle visibleRect, int orientation, int direction) boolean
boolean
int
getScrollableUnitIncrement
(Rectangle visibleRect, int orientation, int direction) Object[]
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
handleEvent
(Event event) boolean
void
void
void
boolean
boolean
void
mouseClicked
(MouseEvent event) void
mouseDragged
(MouseEvent event) void
mouseEntered
(MouseEvent event) void
mouseExited
(MouseEvent event) void
mouseMoved
(MouseEvent event) void
mousePressed
(MouseEvent event) void
mouseReleased
(MouseEvent event) void
nodeChanged
(com.nt.udc.admin.NMItem nmItem) Indicates that the properties of a Node have changed.void
nodeManagerChanged
(com.nt.udc.admin.NMItem nmItem) Indicates that the properties of a Node Manager have changed.void
nodeManagersAdded
(Vector nmList) Indicates that one or more NodeManagers were added.void
nodeManagersRemoved
(Vector nmList) Indicates that one or more NodeManagers were removed.void
nodePerformanceUpdate
(Vector perfs) Indicates that the node performance data has updated.void
nodesAdded
(com.nt.udc.admin.NMItem nmItem) Indicates that a Node has been added to a particular Node Manager.void
nodesRemoved
(com.nt.udc.admin.NMItem nmItem) Indicates that a Node has been removed from a particular Node Manager.void
protected void
protected void
void
void
void
void
void
setScrollPane
(JScrollPane jsp) void
setShowAlarms
(boolean b) void
setShowHostIPAndPort
(boolean b) void
setShowNodeHosts
(boolean b) void
setShowNodeIds
(boolean b) void
setShowNodeNames
(boolean b) void
setShowNodeTypes
(boolean b) void
setShowRoutingLabels
(boolean b) void
setShowState
(boolean b) void
setSize
(int width, int height) void
void
void
void
void
stopNode()
void
systemUpdate
(SystemModel model) Indicates that the system has substantially changed.void
void
void
void
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, list, list, list, location, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Field Details
-
needsRepaint
public boolean needsRepaint -
inCorrectDFMNodeIds
-
-
Constructor Details
-
NodeCanvas
-
-
Method Details
-
setScrollPane
-
getShowRoutingLabels
public boolean getShowRoutingLabels() -
getShowNodeNames
public boolean getShowNodeNames() -
getShowNodeTypes
public boolean getShowNodeTypes() -
getShowNodeHosts
public boolean getShowNodeHosts() -
getShowHostIPAndPort
public boolean getShowHostIPAndPort() -
getShowAlarms
public boolean getShowAlarms() -
getShowNodeIds
public boolean getShowNodeIds() -
setShowNodeIds
public void setShowNodeIds(boolean b) -
getShowState
public boolean getShowState() -
setShowRoutingLabels
public void setShowRoutingLabels(boolean b) -
setShowNodeNames
public void setShowNodeNames(boolean b) -
setShowNodeTypes
public void setShowNodeTypes(boolean b) -
setShowNodeHosts
public void setShowNodeHosts(boolean b) -
setShowHostIPAndPort
public void setShowHostIPAndPort(boolean b) -
setShowAlarms
public void setShowAlarms(boolean b) -
setShowState
public void setShowState(boolean b) -
getHosts
-
setHosts
-
getCanvasMenu
-
updateToggleMenuItems
public void updateToggleMenuItems() -
setSize
-
setSize
public void setSize(int width, int height) -
updateNodes
public void updateNodes() -
deleteNode
-
getNode
-
getSelectedNode
-
getSelectedNodes
-
paintComponent
- Overrides:
paintComponent
in classJComponent
-
autoLayout
public void autoLayout() -
gotFocus
-
lostFocus
-
keyDown
-
keyUp
-
handleEvent
- Overrides:
handleEvent
in classComponent
-
mouseClicked
- Specified by:
mouseClicked
in interfaceMouseListener
-
mouseEntered
- Specified by:
mouseEntered
in interfaceMouseListener
-
mouseExited
- Specified by:
mouseExited
in interfaceMouseListener
-
mousePressed
- Specified by:
mousePressed
in interfaceMouseListener
-
mouseReleased
- Specified by:
mouseReleased
in interfaceMouseListener
-
mouseMoved
- Specified by:
mouseMoved
in interfaceMouseMotionListener
-
mouseDragged
- Specified by:
mouseDragged
in interfaceMouseMotionListener
-
actionPerformed
- Specified by:
actionPerformed
in interfaceActionListener
-
addElement
- Specified by:
addElement
in interfaceDNDComponentInterface
-
removeElement
public void removeElement()- Specified by:
removeElement
in interfaceDNDComponentInterface
-
dragEnter
is invoked when you are dragging over the DropSite- Specified by:
dragEnter
in interfaceDropTargetListener
-
dragExit
is invoked when you are exit the DropSite without dropping- Specified by:
dragExit
in interfaceDropTargetListener
-
dragOver
is invoked when a drag operation is going on- Specified by:
dragOver
in interfaceDropTargetListener
-
drop
a drop has occurred- Specified by:
drop
in interfaceDropTargetListener
-
dropActionChanged
is invoked if the use modifies the current drop gesture- Specified by:
dropActionChanged
in interfaceDropTargetListener
-
getPreferredScrollableViewportSize
- Specified by:
getPreferredScrollableViewportSize
in interfaceScrollable
-
getScrollableUnitIncrement
- Specified by:
getScrollableUnitIncrement
in interfaceScrollable
-
getScrollableBlockIncrement
- Specified by:
getScrollableBlockIncrement
in interfaceScrollable
-
getScrollableTracksViewportWidth
public boolean getScrollableTracksViewportWidth()- Specified by:
getScrollableTracksViewportWidth
in interfaceScrollable
-
getScrollableTracksViewportHeight
public boolean getScrollableTracksViewportHeight()- Specified by:
getScrollableTracksViewportHeight
in interfaceScrollable
-
updateNodePosition
public void updateNodePosition() -
fetchNodeInfo
public void fetchNodeInfo() -
saveNodeInfo
public void saveNodeInfo() -
deleteNode
public void deleteNode() -
startNode
public void startNode() -
stopNode
public void stopNode() -
clearNodeAlarms
public void clearNodeAlarms() -
showNodeLog
public void showNodeLog() -
addNM
public void addNM() -
editNM
public void editNM() -
forgetNM
public void forgetNM() -
clearNMAlarms
public void clearNMAlarms() -
showNMLog
public void showNMLog() -
updateAllNodePositions
public void updateAllNodePositions() -
nodeManagersAdded
Indicates that one or more NodeManagers were added. The Vector associated with each NMItem object will represent all the nodes that are being managed by that Node Manager.- Specified by:
nodeManagersAdded
in interfaceAcctEventListener
- Parameters:
nmList
- nodeManager Vector of NMItem objects, each representing a Node Manager that was added. Each NMItem's child (node) Vector will contain all nodes managed by that Node Manager.
-
nodeManagersRemoved
Indicates that one or more NodeManagers were removed.- Specified by:
nodeManagersRemoved
in interfaceAcctEventListener
- Parameters:
nmList
- Vector of NMItem objects representing the Node Managers that were removed.
-
nodeManagerChanged
public void nodeManagerChanged(com.nt.udc.admin.NMItem nmItem) Indicates that the properties of a Node Manager have changed.- Specified by:
nodeManagerChanged
in interfaceAcctEventListener
- Parameters:
nmItem
- NMItem object representing the Node Manager that changed.
-
nodesAdded
public void nodesAdded(com.nt.udc.admin.NMItem nmItem) Indicates that a Node has been added to a particular Node Manager.- Specified by:
nodesAdded
in interfaceAcctEventListener
- Parameters:
nmItem
- NMItem object which represents the Node Manager managing the node that was added. The Vector associated withnodeManager
will contain only the node that was added.
-
nodesRemoved
public void nodesRemoved(com.nt.udc.admin.NMItem nmItem) Indicates that a Node has been removed from a particular Node Manager.- Specified by:
nodesRemoved
in interfaceAcctEventListener
- Parameters:
nmItem
- NMItem object which represents the Node Manager managing the node that was removed. The Vector associated withnodeManager
will contain only the node(s) that was(were) removed.
-
nodeChanged
public void nodeChanged(com.nt.udc.admin.NMItem nmItem) Indicates that the properties of a Node have changed.- Specified by:
nodeChanged
in interfaceAcctEventListener
- Parameters:
nmItem
- NMItem object which represents the Node Manager whose node changed. The Vector associated withnodeManager
will contain the node that changed.
-
nodePerformanceUpdate
Indicates that the node performance data has updated.- Specified by:
nodePerformanceUpdate
in interfaceAcctEventListener
- Parameters:
perfs
- Vector of node performance objects which contain the node performance data.
-
fileChanged
public void fileChanged(com.nt.udc.admin.FileItem file) Indicates that a system file changed.- Specified by:
fileChanged
in interfaceAcctEventListener
- Parameters:
file
- FileItem object representing the system file that changed.
-
adminServerChanged
Indicates that status of the Admin Server has changed.- Specified by:
adminServerChanged
in interfaceAcctEventListener
- Parameters:
sm
- A StatusMessage object containing the new status of the Admin Server.
-
systemUpdate
Indicates that the system has substantially changed.- Specified by:
systemUpdate
in interfaceAcctEventListener
- Parameters:
model
- SystemModel representing the current state of the system.
-
createNewNode
-
addNode
public void addNode(com.nt.udc.admin.NodeInfo ni) -
getNextNewNodeLabel
public int getNextNewNodeLabel()Look at the integer labels of all currently existing nodes, and return the max plus one. -
getSelectedObjects
- Specified by:
getSelectedObjects
in interfaceItemSelectable
-
addItemListener
- Specified by:
addItemListener
in interfaceItemSelectable
-
removeItemListener
- Specified by:
removeItemListener
in interfaceItemSelectable
-
processEvent
- Overrides:
processEvent
in classContainer
-
processItemEvent
-
focusGained
- Specified by:
focusGained
in interfaceFocusListener
-
focusLost
- Specified by:
focusLost
in interfaceFocusListener
-
keyTyped
- Specified by:
keyTyped
in interfaceKeyListener
-
keyPressed
- Specified by:
keyPressed
in interfaceKeyListener
-
keyReleased
- Specified by:
keyReleased
in interfaceKeyListener
-