Class Router
java.lang.Object
|
+----VisiModel.ATMNode
|
+----Node
|
+----EndSystem
|
+----Router
- public class Router
- extends EndSystem
Class definition for a displayable representation of a router
in an IP/ATM network.
- Version:
- $Revision: 1.3 $, $Date: 2000/10/12 14:07:58 $
- Author:
- John Cavanaugh
-
ROUTER_ICON_SIZE
- The display size of the icon representing the router.
-
Router(String, Network, String, long)
- Constructs a router.
-
draw(Graphics, ViewSettings)
- Draws the router in the display window.
-
drawArrow(Graphics, int, int)
- Draws an arrow on the router.
-
isSwitchControl()
- Determines whether the router is a control processor
for an ATM switch; always return false.
-
merge(ATMNode)
- Merges the router with another.
-
toString()
- Gets a string describing the router.
ROUTER_ICON_SIZE
public static final int ROUTER_ICON_SIZE
- The display size of the icon representing the router.
Router
public Router(String name,
Network net,
String description,
long flags)
- Constructs a router.
- Parameters:
- name - a name for the router.
- net - the network the router is part of.
- description - a description of the router.
- flags - attribute flags for the router.
draw
public void draw(Graphics g,
ViewSettings view)
- Draws the router in the display window.
- Parameters:
- g - the graphics context for the display window.
- view - the view settings.
- Overrides:
- draw in class Node
drawArrow
private void drawArrow(Graphics g,
int horiz,
int vert)
- Draws an arrow on the router.
- Parameters:
- g - the graphics context for the display window.
- horiz - a direction indicator for left vs. right;
1 or -1
- vert - a direction indicator for up vs. down; 1 or -1
isSwitchControl
public boolean isSwitchControl()
- Determines whether the router is a control processor
for an ATM switch; always return false. Overrides
isSwitchControl() in EndSystem.
- Returns:
- always returns false.
- Overrides:
- isSwitchControl in class EndSystem
merge
public void merge(ATMNode node)
- Merges the router with another.
- Parameters:
- node - the node to merge with this node.
- Overrides:
- merge in class EndSystem
toString
public String toString()
- Gets a string describing the router.
- Returns:
- a string describing the router object.
- Overrides:
- toString in class EndSystem