gui.playfield
Class NodeGraphic
java.lang.Object
gui.playfield.PlayFieldGraphic
gui.playfield.NodeGraphic
public class NodeGraphic
- extends PlayFieldGraphic
Visualization of a DTN Node
Method Summary |
void |
draw(java.awt.Graphics2D g2)
Draws the graphic component to the graphics context g2 |
static void |
setDrawConnections(boolean draw)
Sets whether node's connections to other nodes should be drawn |
static void |
setDrawCoverage(boolean draw)
Sets whether radio coverage of nodes should be drawn |
static void |
setDrawNodeName(boolean draw)
Sets whether node's name should be displayed |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NodeGraphic
public NodeGraphic(DTNHost node)
draw
public void draw(java.awt.Graphics2D g2)
- Description copied from class:
PlayFieldGraphic
- Draws the graphic component to the graphics context g2
- Specified by:
draw
in class PlayFieldGraphic
- Parameters:
g2
- The context to draw the graphics to
setDrawCoverage
public static void setDrawCoverage(boolean draw)
- Sets whether radio coverage of nodes should be drawn
- Parameters:
draw
- If true, radio coverage is drawn
setDrawNodeName
public static void setDrawNodeName(boolean draw)
- Sets whether node's name should be displayed
- Parameters:
draw
- If true, node's name is displayed
setDrawConnections
public static void setDrawConnections(boolean draw)
- Sets whether node's connections to other nodes should be drawn
- Parameters:
draw
- If true, node's connections to other nodes is drawn