|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuchicago.src.sim.network.DefaultNode
uchicago.src.sim.network.DefaultDrawableNode
public class DefaultDrawableNode
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class uchicago.src.sim.network.DefaultNode |
|---|
DefaultNode.OrderedHashMap |
| Field Summary | |
|---|---|
protected NetworkDrawable |
item
|
| Fields inherited from class uchicago.src.sim.network.DefaultNode |
|---|
inEdges, inMap, label, outEdges, outMap |
| Constructor Summary | |
|---|---|
DefaultDrawableNode()
Creates this DefaultDrawableNode. |
|
DefaultDrawableNode(NetworkDrawable nDrawable)
|
|
DefaultDrawableNode(java.lang.String label,
NetworkDrawable nDrawable)
|
|
| Method Summary | |
|---|---|
void |
allowResizing(boolean val)
Sets whether or not this DefaultDrawableNode will be resized to fit its label. |
void |
calcSize(SimGraphics g)
Calculates the size of this DefaultDrawableNode. |
boolean |
contains(java.awt.Point p)
Does this object contain the point specified by p. |
void |
draw(SimGraphics g)
Draws this Drawable2DGridNode. |
java.awt.Color |
getBorderColor()
Gets the border color for this DefaultDrawableNode. |
int |
getBorderWidth()
Gets the border width for this DefaultDrawableNode. |
java.awt.Color |
getColor()
Gets the color of this DefaultDrawableNode. |
java.awt.Font |
getFont()
Gets the label font for this DefaultDrawableNode. |
int |
getHeight()
Gets the height of this DefaultDrawableNode. |
java.awt.Color |
getLabelColor()
Gets label color for this DefaultDrawableNode. |
Node |
getNode()
Deprecated. |
int |
getWidth()
Gets the width of this DefaultDrawableNode. |
double |
getX()
Gets the x coordinate for this node. |
double |
getY()
Gets the y coordinate for this node. |
void |
setBorderColor(java.awt.Color c)
Sets the border color for this DefaultDrawableNode. |
void |
setBorderWidth(int width)
Sets the border width for this DefaultDrawableNode. |
void |
setColor(java.awt.Color c)
Sets the color of this DefaultDrawableNode. |
void |
setDrawable(NetworkDrawable nDrawable)
Sets the drawable for this DefaultNetworkNode. |
void |
setDrawableNoCopy(NetworkDrawable nDrawable)
|
void |
setFont(java.awt.Font font)
Sets the label font for this DefaultDrawableNode. |
void |
setHeight(int height)
Sets the height of this DefaultDrawableNode.By default this will be ignored and the DefaultDrawableNode will be sized to fit its label. |
void |
setLabelColor(java.awt.Color c)
Sets label color for this DefaultDrawableNode. |
void |
setNodeLabel(java.lang.String nlabel)
Sets the label for this DefaultDrawableNode. |
void |
setWidth(int width)
Sets the width of this DefaultDrawableNode. |
void |
setX(double x)
Sets the x coordinate for this node. |
void |
setX(int val)
Implements the moveable interface, setting the x coordinate to some integer value. |
void |
setY(double y)
Sets the y coordinate for this node. |
void |
setY(int val)
Implements the moveable interface, setting the y coordinate to some integer value. |
| Methods inherited from class uchicago.src.sim.network.DefaultNode |
|---|
addInEdge, addInEdges, addOutEdge, addOutEdges, clearInEdges, clearOutEdges, getEdgesFrom, getEdgesTo, getFromNodes, getId, getInDegree, getInEdges, getInNodes, getNodeLabel, getNumInEdges, getNumOutEdges, getOutDegree, getOutEdges, getOutNodes, getRandomFromNode, getRandomNodeIn, getRandomNodeOut, getRandomToNode, getToNodes, hasEdgeFrom, hasEdgeTo, hasEdgeToOrFrom, makeRandomInEdge, makeRandomOutEdge, removeEdgesFrom, removeEdgesTo, removeInEdge, removeOutEdge |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface uchicago.src.sim.gui.DrawableNonGridNode |
|---|
getOutEdges |
| Methods inherited from interface uchicago.src.sim.gui.Drawable2DGridNode |
|---|
getOutEdges |
| Field Detail |
|---|
protected NetworkDrawable item
| Constructor Detail |
|---|
public DefaultDrawableNode()
public DefaultDrawableNode(java.lang.String label,
NetworkDrawable nDrawable)
public DefaultDrawableNode(NetworkDrawable nDrawable)
| Method Detail |
|---|
public void setDrawable(NetworkDrawable nDrawable)
public void setDrawableNoCopy(NetworkDrawable nDrawable)
public void calcSize(SimGraphics g)
calcSize in interface DrawableNonGridNodepublic Node getNode()
getNode in class DefaultNodepublic int getWidth()
getWidth in interface NonGridDrawablepublic void setWidth(int width)
public int getHeight()
getHeight in interface NonGridDrawablepublic void setHeight(int height)
public void allowResizing(boolean val)
public void setNodeLabel(java.lang.String nlabel)
setNodeLabel in interface NodesetNodeLabel in class DefaultNodepublic void setBorderColor(java.awt.Color c)
public java.awt.Color getBorderColor()
public void setBorderWidth(int width)
public int getBorderWidth()
public void setFont(java.awt.Font font)
public java.awt.Font getFont()
public void setLabelColor(java.awt.Color c)
public java.awt.Color getLabelColor()
public void setColor(java.awt.Color c)
public java.awt.Color getColor()
public double getX()
getX in interface Drawable2DGridNodegetX in interface NonGridDrawablepublic double getY()
getY in interface Drawable2DGridNodegetY in interface NonGridDrawablepublic void setX(double x)
setX in interface DrawableNonGridNodepublic void setY(double y)
setY in interface DrawableNonGridNodepublic boolean contains(java.awt.Point p)
contains in interface NonGridDrawablep - the point to test for.public void draw(SimGraphics g)
Drawable2DGridNode
draw in interface Drawable2DGridNodedraw in interface NonGridDrawableg - the SimGraphics object used for drawingpublic void setX(int val)
setX in interface Moveablepublic void setY(int val)
setY in interface Moveable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||