Class DisplayNetwork

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----DisplayNetwork

class DisplayNetwork
extends Panel
implements Observer, MouseMotionListener, DisplayComponent
An user interface component that shows a Network in a graphical way; the Modules are represented by boxes and the Connections by lines connecting the boxes.

Version:
$Revision: 1.35 $

Variable Index

 o addModuleDialog
 o creatingConnection
 o displayConnections
 o dragging
 o layoutManager
 o MDFDirectoryPropertyName
 o moving
 o network
 o newDisplayInConnector
 o newDisplayOutConnector
 o newEndOfConnection
 o newRectangle
 o oldEndOfConnection
 o oldRectangle
 o popupMenu
 o startDisplayConnector
 o startOfConnection
 o viewId

Constructor Index

 o DisplayNetwork(Network)

Method Index

 o addConnection(Connection)
 o addModule(Module, String)
 o addModuleMenuItemActionPerformed(ActionEvent)
 o addPopupMenu()
 o clear()
 o close()
 o connectorChanged(Connector)
 o displayModuleResult(Module)
 o dragFeedback(Rectangle)
 o findDisplayConnection(Connection)
 o findDisplayModule(Module)
 o fit(DisplayModule)
 o fit(Point)
Increases the width and height of the DisplayNetwork if necessary to make sure a specified Point fits in it.
 o getCreatingConnection()
 o getLocationInDisplayNetwork()
 o getNetwork()
 o moduleSave(Module, ModelEvent)
 o mouseClickPerformed(MouseEvent)
This method may also have been called mouseClicked(), but it is called from a scope (inner class in the constructor) in which such a method already exists.
 o mouseDragged(MouseEvent)
 o mouseMoved(MouseEvent)
 o packInfo(Point)
 o paint(Graphics)
 o printDebugMenuItemActionPerformed(ActionEvent)
Called when the print debugmenuitem is selected.
 o removeConnection(Connection)
 o removeModule(Module)
 o repaint(Rectangle)
Repaints the specified rectangle of this component.
 o runMenuItemActionPerformed(ActionEvent)
 o startCreatingConnection(DisplayConnector)
 o stopCreatingConnection(DisplayConnector)
 o unpackInfo(String)
 o update(Observable, Object)

Variables

 o oldRectangle
 private Rectangle oldRectangle
 o newRectangle
 private Rectangle newRectangle
 o dragging
 private boolean dragging
 o creatingConnection
 private boolean creatingConnection
 o moving
 private boolean moving
 o startOfConnection
 private Point startOfConnection
 o newEndOfConnection
 private Point newEndOfConnection
 o oldEndOfConnection
 private Point oldEndOfConnection
 o startDisplayConnector
 private DisplayConnector startDisplayConnector
 o displayConnections
 private DisplayConnectionStore displayConnections
 o network
 private Network network
 o newDisplayInConnector
 private DisplayConnector newDisplayInConnector
 o newDisplayOutConnector
 private DisplayConnector newDisplayOutConnector
 o layoutManager
 private NetworkLayout layoutManager
 o popupMenu
 private PopupMenu popupMenu
 o MDFDirectoryPropertyName
 private String MDFDirectoryPropertyName
 o addModuleDialog
 private FileDialog addModuleDialog
 o viewId
 private static String viewId

Constructors

 o DisplayNetwork
 DisplayNetwork(Network network)

Methods

 o paint
 public void paint(Graphics g)
Overrides:
paint in class Container
 o dragFeedback
 public void dragFeedback(Rectangle r)
 o mouseMoved
 public void mouseMoved(MouseEvent e)
 o startCreatingConnection
 void startCreatingConnection(DisplayConnector c)
Parameters:
start - starting point of the Connection in the coordinate space of the Connector.
 o stopCreatingConnection
 void stopCreatingConnection(DisplayConnector c)
 o getCreatingConnection
 boolean getCreatingConnection()
 o getLocationInDisplayNetwork
 public Point getLocationInDisplayNetwork()
 o update
 public void update(Observable o,
                    Object arg)
 o addModule
 void addModule(Module m,
                String info)
 o removeModule
 private void removeModule(Module m)
 o addConnection
 void addConnection(Connection c)
 o removeConnection
 private void removeConnection(Connection c)
 o displayModuleResult
 private void displayModuleResult(Module m)
 o clear
 private void clear()
 o connectorChanged
 private void connectorChanged(Connector c)
 o close
 void close()
 o findDisplayModule
 private DisplayModule findDisplayModule(Module m)
 o fit
 void fit(Point p)
Increases the width and height of the DisplayNetwork if necessary to make sure a specified Point fits in it.

Parameters:
p - the Point that must fit in the DisplayNetwork.
 o fit
 void fit(DisplayModule dm)
 o findDisplayConnection
 private DisplayConnection findDisplayConnection(Connection c)
 o addPopupMenu
 private void addPopupMenu()
 o addModuleMenuItemActionPerformed
 private void addModuleMenuItemActionPerformed(ActionEvent e)
 o runMenuItemActionPerformed
 private void runMenuItemActionPerformed(ActionEvent e)
 o printDebugMenuItemActionPerformed
 private void printDebugMenuItemActionPerformed(ActionEvent e)
Called when the print debugmenuitem is selected. Only used for debugging.

 o mouseClickPerformed
 private void mouseClickPerformed(MouseEvent e)
This method may also have been called mouseClicked(), but it is called from a scope (inner class in the constructor) in which such a method already exists.

 o moduleSave
 private void moduleSave(Module m,
                         ModelEvent e)
 o packInfo
 private String packInfo(Point p)
 o unpackInfo
 private Point unpackInfo(String info)
 o repaint
 public void repaint(Rectangle r)
Repaints the specified rectangle of this component. This method causes a call to this component's update method as soon as possible.

 o getNetwork
 Network getNetwork()
Returns:
the Network this DisplayNetwork is supposed to visualize.
 o mouseDragged
 public void mouseDragged(MouseEvent e)