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.AccessibleJPanelNested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponentNested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainerNested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy -
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanFields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWFields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactionPerformed(ActionEvent event) voidaddElement(Object s) voidvoidaddNM()voidaddNode(com.nt.udc.admin.NodeInfo ni) voidIndicates that status of the Admin Server has changed.voidvoidvoidvoidcreateNewNode(ActionEvent event) voidvoiddeleteNode(NodeIcon node, boolean bridge) voiddragEnter(DropTargetDragEvent event) is invoked when you are dragging over the DropSitevoiddragExit(DropTargetEvent event) is invoked when you are exit the DropSite without droppingvoiddragOver(DropTargetDragEvent event) is invoked when a drag operation is going onvoiddrop(DropTargetDropEvent event) a drop has occurredvoidis invoked if the use modifies the current drop gesturevoideditNM()voidvoidfileChanged(com.nt.udc.admin.FileItem file) Indicates that a system file changed.voidvoidvoidforgetNM()getHosts()intLook at the integer labels of all currently existing nodes, and return the max plus one.getNode(int i) intgetScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction) booleanbooleanintgetScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction) Object[]booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanhandleEvent(Event event) booleanvoidvoidvoidbooleanbooleanvoidmouseClicked(MouseEvent event) voidmouseDragged(MouseEvent event) voidmouseEntered(MouseEvent event) voidmouseExited(MouseEvent event) voidmouseMoved(MouseEvent event) voidmousePressed(MouseEvent event) voidmouseReleased(MouseEvent event) voidnodeChanged(com.nt.udc.admin.NMItem nmItem) Indicates that the properties of a Node have changed.voidnodeManagerChanged(com.nt.udc.admin.NMItem nmItem) Indicates that the properties of a Node Manager have changed.voidnodeManagersAdded(Vector nmList) Indicates that one or more NodeManagers were added.voidnodeManagersRemoved(Vector nmList) Indicates that one or more NodeManagers were removed.voidnodePerformanceUpdate(Vector perfs) Indicates that the node performance data has updated.voidnodesAdded(com.nt.udc.admin.NMItem nmItem) Indicates that a Node has been added to a particular Node Manager.voidnodesRemoved(com.nt.udc.admin.NMItem nmItem) Indicates that a Node has been removed from a particular Node Manager.voidprotected voidprotected voidvoidvoidvoidvoidvoidsetScrollPane(JScrollPane jsp) voidsetShowAlarms(boolean b) voidsetShowHostIPAndPort(boolean b) voidsetShowNodeHosts(boolean b) voidsetShowNodeIds(boolean b) voidsetShowNodeNames(boolean b) voidsetShowNodeTypes(boolean b) voidsetShowRoutingLabels(boolean b) voidsetShowState(boolean b) voidsetSize(int width, int height) voidvoidvoidvoidvoidstopNode()voidsystemUpdate(SystemModel model) Indicates that the system has substantially changed.voidvoidvoidvoidMethods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIMethods 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, updateMethods 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, validateTreeMethods 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:
paintComponentin classJComponent
-
autoLayout
public void autoLayout() -
gotFocus
-
lostFocus
-
keyDown
-
keyUp
-
handleEvent
- Overrides:
handleEventin classComponent
-
mouseClicked
- Specified by:
mouseClickedin interfaceMouseListener
-
mouseEntered
- Specified by:
mouseEnteredin interfaceMouseListener
-
mouseExited
- Specified by:
mouseExitedin interfaceMouseListener
-
mousePressed
- Specified by:
mousePressedin interfaceMouseListener
-
mouseReleased
- Specified by:
mouseReleasedin interfaceMouseListener
-
mouseMoved
- Specified by:
mouseMovedin interfaceMouseMotionListener
-
mouseDragged
- Specified by:
mouseDraggedin interfaceMouseMotionListener
-
actionPerformed
- Specified by:
actionPerformedin interfaceActionListener
-
addElement
- Specified by:
addElementin interfaceDNDComponentInterface
-
removeElement
public void removeElement()- Specified by:
removeElementin interfaceDNDComponentInterface
-
dragEnter
is invoked when you are dragging over the DropSite- Specified by:
dragEnterin interfaceDropTargetListener
-
dragExit
is invoked when you are exit the DropSite without dropping- Specified by:
dragExitin interfaceDropTargetListener
-
dragOver
is invoked when a drag operation is going on- Specified by:
dragOverin interfaceDropTargetListener
-
drop
a drop has occurred- Specified by:
dropin interfaceDropTargetListener
-
dropActionChanged
is invoked if the use modifies the current drop gesture- Specified by:
dropActionChangedin interfaceDropTargetListener
-
getPreferredScrollableViewportSize
- Specified by:
getPreferredScrollableViewportSizein interfaceScrollable
-
getScrollableUnitIncrement
- Specified by:
getScrollableUnitIncrementin interfaceScrollable
-
getScrollableBlockIncrement
- Specified by:
getScrollableBlockIncrementin interfaceScrollable
-
getScrollableTracksViewportWidth
public boolean getScrollableTracksViewportWidth()- Specified by:
getScrollableTracksViewportWidthin interfaceScrollable
-
getScrollableTracksViewportHeight
public boolean getScrollableTracksViewportHeight()- Specified by:
getScrollableTracksViewportHeightin 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:
nodeManagersAddedin 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:
nodeManagersRemovedin 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:
nodeManagerChangedin 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:
nodesAddedin interfaceAcctEventListener- Parameters:
nmItem- NMItem object which represents the Node Manager managing the node that was added. The Vector associated withnodeManagerwill 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:
nodesRemovedin interfaceAcctEventListener- Parameters:
nmItem- NMItem object which represents the Node Manager managing the node that was removed. The Vector associated withnodeManagerwill 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:
nodeChangedin interfaceAcctEventListener- Parameters:
nmItem- NMItem object which represents the Node Manager whose node changed. The Vector associated withnodeManagerwill contain the node that changed.
-
nodePerformanceUpdate
Indicates that the node performance data has updated.- Specified by:
nodePerformanceUpdatein 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:
fileChangedin interfaceAcctEventListener- Parameters:
file- FileItem object representing the system file that changed.
-
adminServerChanged
Indicates that status of the Admin Server has changed.- Specified by:
adminServerChangedin interfaceAcctEventListener- Parameters:
sm- A StatusMessage object containing the new status of the Admin Server.
-
systemUpdate
Indicates that the system has substantially changed.- Specified by:
systemUpdatein 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:
getSelectedObjectsin interfaceItemSelectable
-
addItemListener
- Specified by:
addItemListenerin interfaceItemSelectable
-
removeItemListener
- Specified by:
removeItemListenerin interfaceItemSelectable
-
processEvent
- Overrides:
processEventin classContainer
-
processItemEvent
-
focusGained
- Specified by:
focusGainedin interfaceFocusListener
-
focusLost
- Specified by:
focusLostin interfaceFocusListener
-
keyTyped
- Specified by:
keyTypedin interfaceKeyListener
-
keyPressed
- Specified by:
keyPressedin interfaceKeyListener
-
keyReleased
- Specified by:
keyReleasedin interfaceKeyListener
-