|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.geom.Line2D
java.awt.geom.Line2D.Float
verinec.gui.core.NwWire
public class NwWire
Base class for wires. This class offers standard implementations of methods that every wire must contain. A wire is always connected to a binding of a node and to a hub, even if only two nodes are connected.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.awt.geom.Line2D |
|---|
Line2D.Double, Line2D.Float |
| Field Summary | |
|---|---|
protected NwHub |
dest
The hub this wire is connected to. |
protected VerinecStudio |
gui
The main application |
protected NwBinding |
source
The binding this wire is connected to. |
protected int |
type
The network type of this wire. |
protected Color |
wireColor
How this wire should be drawn. |
protected BasicStroke |
wireStroke
How this wire should be drawn. |
| Fields inherited from class java.awt.geom.Line2D.Float |
|---|
x1, x2, y1, y2 |
| Constructor Summary | |
|---|---|
NwWire(int type,
NwBinding source,
NwHub dest,
VerinecStudio gui)
Create a wire and connect it to the source and dest. |
|
| Method Summary | |
|---|---|
void |
delete()
Notify owners that the wire doesn't exist any longer. |
void |
endPointMoved()
Notify the wire that one end point has moved. |
NwBinding |
getBinding()
Returns the binding of the wire. |
Color |
getColor()
Returns the color of the wire. |
NwHub |
getDest()
Get the hub this wire is connected to. |
BasicStroke |
getStroke()
Returns the stroke of the wire. |
int |
getType()
Get the network type of this wire. |
void |
resizeWire(float factor)
Resizes the wire. |
| Methods inherited from class java.awt.geom.Line2D.Float |
|---|
getBounds2D, getP1, getP2, getX1, getX2, getY1, getY2, setLine, setLine |
| Methods inherited from class java.awt.geom.Line2D |
|---|
clone, contains, contains, contains, contains, getBounds, getPathIterator, getPathIterator, intersects, intersects, intersectsLine, intersectsLine, linesIntersect, ptLineDist, ptLineDist, ptLineDist, ptLineDistSq, ptLineDistSq, ptLineDistSq, ptSegDist, ptSegDist, ptSegDist, ptSegDistSq, ptSegDistSq, ptSegDistSq, relativeCCW, relativeCCW, relativeCCW, setLine, setLine |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected VerinecStudio gui
protected int type
protected NwBinding source
protected NwHub dest
protected BasicStroke wireStroke
protected Color wireColor
| Constructor Detail |
|---|
public NwWire(int type,
NwBinding source,
NwHub dest,
VerinecStudio gui)
type - The network type of this wire.source - The binding this wire is attached to.dest - The destination this wire is attached to.gui - The main application reference.| Method Detail |
|---|
public int getType()
public NwBinding getBinding()
public NwHub getDest()
public BasicStroke getStroke()
public Color getColor()
public void endPointMoved()
public void resizeWire(float factor)
factor - the resize factor.public void delete()
|
Copyright © 2005 Verinec, DIUF | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||