|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.pzgui.AbstractDrawable
org.openflow.gui.drawables.Flow
public class Flow
A flow of packets along some path through some set of node-port pairs.
| Field Summary | |
|---|---|
static boolean |
ALLOW_FLOW_SELECTION
whether flows may be selected or highlighted |
static boolean |
ANIMATE
whether flows should be animated |
| Constructor Summary | |
|---|---|
Flow(FlowType type,
int flowID,
FlowHop[] path)
Creates a flow between two endpoints. |
|
| Method Summary | |
|---|---|
boolean |
contains(int x,
int y)
returns true if the specified coordinates are in the area covered by this flow |
void |
drawObject(java.awt.Graphics2D gfx)
Draw the flow |
java.awt.Color |
getColor()
Gets the color of this flow |
int |
getID()
Gets the ID of this flow |
FlowHop[] |
getPath()
Gets the path of this flow |
int |
getPointSize()
Gets the width of the line within which segments of the flow are drawn |
FlowType |
getType()
Gets the type of this flow |
boolean |
hasSegment(Pair<FlowHop,FlowHop> s)
whether this flow contains a particular segment |
void |
ignoreSegment(Pair<FlowHop,FlowHop> s)
add a segment to ignore |
boolean |
isWithin(int x,
int y,
boolean select)
Returns true if the specified coordinates are in the area covered by this flow. |
void |
setSelected(boolean selected)
Sets whether this flow is selected - should only be directly used when deselecting the flow (otherwise use selectFlow()). |
void |
unignoreSegment(Pair<FlowHop,FlowHop> s)
stop ignoring a particular segment |
| Methods inherited from class org.pzgui.AbstractDrawable |
|---|
drag, drawBeforeObject, isDrawn, isHovered, isSelected, setHovered, unsetDrawn |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static boolean ALLOW_FLOW_SELECTION
public static final boolean ANIMATE
| Constructor Detail |
|---|
public Flow(FlowType type,
int flowID,
FlowHop[] path)
path - the path being taken by this flow from src to dst| Method Detail |
|---|
public FlowType getType()
public int getID()
public FlowHop[] getPath()
public boolean hasSegment(Pair<FlowHop,FlowHop> s)
public void ignoreSegment(Pair<FlowHop,FlowHop> s)
public void unignoreSegment(Pair<FlowHop,FlowHop> s)
public void drawObject(java.awt.Graphics2D gfx)
drawObject in interface DrawabledrawObject in class AbstractDrawablepublic int getPointSize()
public java.awt.Color getColor()
public boolean contains(int x,
int y)
contains in interface Drawablecontains in class AbstractDrawable
public boolean isWithin(int x,
int y,
boolean select)
x - the x coordinatey - the y coordinateselect - whether to select the flow if x,y is within the flow
public void setSelected(boolean selected)
setSelected in interface DrawablesetSelected in class AbstractDrawable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||