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 $
-
addModuleDialog
-
-
creatingConnection
-
-
displayConnections
-
-
dragging
-
-
layoutManager
-
-
MDFDirectoryPropertyName
-
-
moving
-
-
network
-
-
newDisplayInConnector
-
-
newDisplayOutConnector
-
-
newEndOfConnection
-
-
newRectangle
-
-
oldEndOfConnection
-
-
oldRectangle
-
-
popupMenu
-
-
startDisplayConnector
-
-
startOfConnection
-
-
viewId
-
-
DisplayNetwork(Network)
-
-
addConnection(Connection)
-
-
addModule(Module, String)
-
-
addModuleMenuItemActionPerformed(ActionEvent)
-
-
addPopupMenu()
-
-
clear()
-
-
close()
-
-
connectorChanged(Connector)
-
-
displayModuleResult(Module)
-
-
dragFeedback(Rectangle)
-
-
findDisplayConnection(Connection)
-
-
findDisplayModule(Module)
-
-
fit(DisplayModule)
-
-
fit(Point)
- Increases the width and height of the DisplayNetwork if necessary to
make sure a specified Point fits in it.
-
getCreatingConnection()
-
-
getLocationInDisplayNetwork()
-
-
getNetwork()
-
-
moduleSave(Module, ModelEvent)
-
-
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.
-
mouseDragged(MouseEvent)
-
-
mouseMoved(MouseEvent)
-
-
packInfo(Point)
-
-
paint(Graphics)
-
-
printDebugMenuItemActionPerformed(ActionEvent)
- Called when the print debugmenuitem is selected.
-
removeConnection(Connection)
-
-
removeModule(Module)
-
-
repaint(Rectangle)
- Repaints the specified rectangle of this component.
-
runMenuItemActionPerformed(ActionEvent)
-
-
startCreatingConnection(DisplayConnector)
-
-
stopCreatingConnection(DisplayConnector)
-
-
unpackInfo(String)
-
-
update(Observable, Object)
-
oldRectangle
private Rectangle oldRectangle
newRectangle
private Rectangle newRectangle
dragging
private boolean dragging
creatingConnection
private boolean creatingConnection
moving
private boolean moving
startOfConnection
private Point startOfConnection
newEndOfConnection
private Point newEndOfConnection
oldEndOfConnection
private Point oldEndOfConnection
startDisplayConnector
private DisplayConnector startDisplayConnector
displayConnections
private DisplayConnectionStore displayConnections
network
private Network network
newDisplayInConnector
private DisplayConnector newDisplayInConnector
newDisplayOutConnector
private DisplayConnector newDisplayOutConnector
layoutManager
private NetworkLayout layoutManager
popupMenu
private PopupMenu popupMenu
MDFDirectoryPropertyName
private String MDFDirectoryPropertyName
addModuleDialog
private FileDialog addModuleDialog
viewId
private static String viewId
DisplayNetwork
DisplayNetwork(Network network)
paint
public void paint(Graphics g)
- Overrides:
- paint in class Container
dragFeedback
public void dragFeedback(Rectangle r)
mouseMoved
public void mouseMoved(MouseEvent e)
startCreatingConnection
void startCreatingConnection(DisplayConnector c)
- Parameters:
- start - starting point of the Connection in the coordinate
space of the Connector.
stopCreatingConnection
void stopCreatingConnection(DisplayConnector c)
getCreatingConnection
boolean getCreatingConnection()
getLocationInDisplayNetwork
public Point getLocationInDisplayNetwork()
update
public void update(Observable o,
Object arg)
addModule
void addModule(Module m,
String info)
removeModule
private void removeModule(Module m)
addConnection
void addConnection(Connection c)
removeConnection
private void removeConnection(Connection c)
displayModuleResult
private void displayModuleResult(Module m)
clear
private void clear()
connectorChanged
private void connectorChanged(Connector c)
close
void close()
findDisplayModule
private DisplayModule findDisplayModule(Module m)
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.
fit
void fit(DisplayModule dm)
findDisplayConnection
private DisplayConnection findDisplayConnection(Connection c)
addPopupMenu
private void addPopupMenu()
addModuleMenuItemActionPerformed
private void addModuleMenuItemActionPerformed(ActionEvent e)
runMenuItemActionPerformed
private void runMenuItemActionPerformed(ActionEvent e)
printDebugMenuItemActionPerformed
private void printDebugMenuItemActionPerformed(ActionEvent e)
- Called when the print debugmenuitem is selected. Only used for
debugging.
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.
moduleSave
private void moduleSave(Module m,
ModelEvent e)
packInfo
private String packInfo(Point p)
unpackInfo
private Point unpackInfo(String info)
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.
getNetwork
Network getNetwork()
- Returns:
- the Network this DisplayNetwork is supposed to visualize.
mouseDragged
public void mouseDragged(MouseEvent e)