Class NodeCanvas

All Implemented Interfaces:
DNDComponentInterface, AcctEventListener, DropTargetListener, ActionListener, FocusListener, KeyListener, MouseListener, MouseMotionListener, ImageObserver, ItemSelectable, MenuContainer, Serializable, Remote, EventListener, Accessible, Scrollable

See Also:
  • Field Details

    • needsRepaint

      public boolean needsRepaint
    • inCorrectDFMNodeIds

      public static HashMap<String,Boolean> inCorrectDFMNodeIds
  • Constructor Details

    • NodeCanvas

      public NodeCanvas(Font f)
  • Method Details

    • setScrollPane

      public void setScrollPane(JScrollPane jsp)
    • 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

      public Vector getHosts()
    • setHosts

      public void setHosts(Vector hosts)
    • getCanvasMenu

      public JPopupMenu getCanvasMenu()
    • updateToggleMenuItems

      public void updateToggleMenuItems()
    • setSize

      public void setSize(Dimension d)
      Overrides:
      setSize in class Component
    • setSize

      public void setSize(int width, int height)
      Overrides:
      setSize in class Component
    • updateNodes

      public void updateNodes()
    • deleteNode

      public void deleteNode(NodeIcon node, boolean bridge)
    • getNode

      public NodeIcon getNode(int i)
    • getSelectedNode

      public NodeIcon getSelectedNode()
    • getSelectedNodes

      public Vector getSelectedNodes()
    • paintComponent

      public void paintComponent(Graphics gc)
      Overrides:
      paintComponent in class JComponent
    • autoLayout

      public void autoLayout()
    • gotFocus

      public boolean gotFocus(Event event, Object what)
      Overrides:
      gotFocus in class Component
    • lostFocus

      public boolean lostFocus(Event event, Object what)
      Overrides:
      lostFocus in class Component
    • keyDown

      public boolean keyDown(Event event, int key)
      Overrides:
      keyDown in class Component
    • keyUp

      public boolean keyUp(Event event, int key)
      Overrides:
      keyUp in class Component
    • handleEvent

      public boolean handleEvent(Event event)
      Overrides:
      handleEvent in class Component
    • mouseClicked

      public void mouseClicked(MouseEvent event)
      Specified by:
      mouseClicked in interface MouseListener
    • mouseEntered

      public void mouseEntered(MouseEvent event)
      Specified by:
      mouseEntered in interface MouseListener
    • mouseExited

      public void mouseExited(MouseEvent event)
      Specified by:
      mouseExited in interface MouseListener
    • mousePressed

      public void mousePressed(MouseEvent event)
      Specified by:
      mousePressed in interface MouseListener
    • mouseReleased

      public void mouseReleased(MouseEvent event)
      Specified by:
      mouseReleased in interface MouseListener
    • mouseMoved

      public void mouseMoved(MouseEvent event)
      Specified by:
      mouseMoved in interface MouseMotionListener
    • mouseDragged

      public void mouseDragged(MouseEvent event)
      Specified by:
      mouseDragged in interface MouseMotionListener
    • actionPerformed

      public void actionPerformed(ActionEvent event)
      Specified by:
      actionPerformed in interface ActionListener
    • addElement

      public void addElement(Object s)
      Specified by:
      addElement in interface DNDComponentInterface
    • removeElement

      public void removeElement()
      Specified by:
      removeElement in interface DNDComponentInterface
    • dragEnter

      public void dragEnter(DropTargetDragEvent event)
      is invoked when you are dragging over the DropSite
      Specified by:
      dragEnter in interface DropTargetListener
    • dragExit

      public void dragExit(DropTargetEvent event)
      is invoked when you are exit the DropSite without dropping
      Specified by:
      dragExit in interface DropTargetListener
    • dragOver

      public void dragOver(DropTargetDragEvent event)
      is invoked when a drag operation is going on
      Specified by:
      dragOver in interface DropTargetListener
    • drop

      public void drop(DropTargetDropEvent event)
      a drop has occurred
      Specified by:
      drop in interface DropTargetListener
    • dropActionChanged

      public void dropActionChanged(DropTargetDragEvent event)
      is invoked if the use modifies the current drop gesture
      Specified by:
      dropActionChanged in interface DropTargetListener
    • getPreferredScrollableViewportSize

      public Dimension getPreferredScrollableViewportSize()
      Specified by:
      getPreferredScrollableViewportSize in interface Scrollable
    • getScrollableUnitIncrement

      public int getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction)
      Specified by:
      getScrollableUnitIncrement in interface Scrollable
    • getScrollableBlockIncrement

      public int getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction)
      Specified by:
      getScrollableBlockIncrement in interface Scrollable
    • getScrollableTracksViewportWidth

      public boolean getScrollableTracksViewportWidth()
      Specified by:
      getScrollableTracksViewportWidth in interface Scrollable
    • getScrollableTracksViewportHeight

      public boolean getScrollableTracksViewportHeight()
      Specified by:
      getScrollableTracksViewportHeight in interface Scrollable
    • 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

      public void nodeManagersAdded(Vector nmList)
      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 interface AcctEventListener
      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

      public void nodeManagersRemoved(Vector nmList)
      Indicates that one or more NodeManagers were removed.
      Specified by:
      nodeManagersRemoved in interface AcctEventListener
      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 interface AcctEventListener
      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 interface AcctEventListener
      Parameters:
      nmItem - NMItem object which represents the Node Manager managing the node that was added. The Vector associated with nodeManager 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 interface AcctEventListener
      Parameters:
      nmItem - NMItem object which represents the Node Manager managing the node that was removed. The Vector associated with nodeManager 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 interface AcctEventListener
      Parameters:
      nmItem - NMItem object which represents the Node Manager whose node changed. The Vector associated with nodeManager will contain the node that changed.
    • nodePerformanceUpdate

      public void nodePerformanceUpdate(Vector perfs)
      Indicates that the node performance data has updated.
      Specified by:
      nodePerformanceUpdate in interface AcctEventListener
      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 interface AcctEventListener
      Parameters:
      file - FileItem object representing the system file that changed.
    • adminServerChanged

      public void adminServerChanged(StatusMessage sm)
      Indicates that status of the Admin Server has changed.
      Specified by:
      adminServerChanged in interface AcctEventListener
      Parameters:
      sm - A StatusMessage object containing the new status of the Admin Server.
    • systemUpdate

      public void systemUpdate(SystemModel model)
      Indicates that the system has substantially changed.
      Specified by:
      systemUpdate in interface AcctEventListener
      Parameters:
      model - SystemModel representing the current state of the system.
    • createNewNode

      public void createNewNode(ActionEvent event)
    • 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

      public Object[] getSelectedObjects()
      Specified by:
      getSelectedObjects in interface ItemSelectable
    • addItemListener

      public void addItemListener(ItemListener l)
      Specified by:
      addItemListener in interface ItemSelectable
    • removeItemListener

      public void removeItemListener(ItemListener l)
      Specified by:
      removeItemListener in interface ItemSelectable
    • processEvent

      protected void processEvent(AWTEvent e)
      Overrides:
      processEvent in class Container
    • processItemEvent

      protected void processItemEvent(ItemEvent e)
    • focusGained

      public void focusGained(FocusEvent e)
      Specified by:
      focusGained in interface FocusListener
    • focusLost

      public void focusLost(FocusEvent e)
      Specified by:
      focusLost in interface FocusListener
    • keyTyped

      public void keyTyped(KeyEvent e)
      Specified by:
      keyTyped in interface KeyListener
    • keyPressed

      public void keyPressed(KeyEvent e)
      Specified by:
      keyPressed in interface KeyListener
    • keyReleased

      public void keyReleased(KeyEvent e)
      Specified by:
      keyReleased in interface KeyListener