jdsl.extension.LEDA
Class EdgeParameters

java.lang.Object
  |
  +--jdsl.extension.LEDA.Parameters
        |
        +--jdsl.extension.LEDA.EdgeParameters

public class EdgeParameters
extends Parameters
implements java.lang.Cloneable

This class represents the attributes of edges. For valid parameters look into class Parameters.


Field Summary
static int CIRCLE
          A valid shape for edges: circle.
 
Fields inherited from class jdsl.extension.LEDA.Parameters
BEZIER, BLACK, BLUE, BLUE2, BORDERWIDTH0, BORDERWIDTH1, BORDERWIDTH2, BORDERWIDTH3, BORDERWIDTH4, BORDERWIDTH5, BORDERWIDTH6, BROWN, CYAN, DASHED, DASHEDDOTTED, DATA, DATAINDEX, DEFAULTCOLOR, DOTTED, EDGE_CIRCLE, EDGELIKE, ELLIPSE, GREEN, GREEN2, GREY1, GREY2, GREY3, INDEX, INVISIBLE, LINE, LPOS_ABOVE, LPOS_C, LPOS_E, LPOS_N, LPOS_NE, LPOS_NW, LPOS_ON, LPOS_S, LPOS_SE, LPOS_SW, LPOS_UNDER, LPOS_W, MIDDLELEFT, MIDDLERIGHT, NOARROW, NODE_CIRCLE, NON, ORANGE, OVAL, PINK, POLY, RECTANGLE, RED, RHOMBUS, SMOOTHRECTANGLE, SPLINE, SQUARE, TOLEFT, TOLEFTRIGHT, TORIGHT, TORIGHTLEFT, USER, USERDATA, USERDATAINDEX, USERINDEX, VIOLET, WHITE, YELLOW
 
Constructor Summary
EdgeParameters()
          Constructs a new parameter set initialized with default values.
EdgeParameters(EdgeParameters e)
          Constructs a new parameters set by copying given.
 
Method Summary
 java.lang.Object clone()
          Creates a new EdgeParameters and initializes it with this.
 int getArrow()
          Returns current direction.
 int getLabelPosition()
          Returns current label position.
 Point getSAnch()
          Returns current S anchor.
 Vector2D getSAnchAsVector2D()
          Returns current S anchor.
 int getStyle()
          Returns current style.
 Point getTAnch()
          Returns current T anchor.
 Vector2D getTAnchAsVector2D()
          Returns current T anchor.
 int getWidth()
          Returns current width.
 void setArrow(int arg)
          Sets a new direction type.
 void setDefaults()
          Sets default attributs.
 void setLabelPosition(int arg)
          Sets a new label position.
 void setLabelType(int arg)
          Sets a new label type.
 void setSAnch(Point p)
          Set a new anchor at start node.
 void setShape(int arg)
          Sets a new shape.
 void setStyle(int arg)
          Sets a new style.
 void setTAnch(Point p)
          Set a new anchor at end node.
 void setWidth(int arg)
          Sets a new width.
 
Methods inherited from class jdsl.extension.LEDA.Parameters
getColor, getColorIndex, getLabel, getLabelColor, getLabelColorIndex, getLabelType, getShape, setColor, setColor, setLabel, setLabelColor, setLabelColor
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CIRCLE

public static final int CIRCLE
A valid shape for edges: circle.
See Also:
Parameters.POLY, Parameters.BEZIER, Parameters.SPLINE
Constructor Detail

EdgeParameters

public EdgeParameters()
Constructs a new parameter set initialized with default values.

EdgeParameters

public EdgeParameters(EdgeParameters e)
Constructs a new parameters set by copying given.

Note:
If e is null then it will initialized with default parameters.
Method Detail

clone

public java.lang.Object clone()
Creates a new EdgeParameters and initializes it with this.
Returns:
a clone of this instance.
Overrides:
clone in class java.lang.Object

setDefaults

public void setDefaults()
Sets default attributs.

setWidth

public void setWidth(int arg)
Sets a new width.
Parameters:
arg - a non-negativ integer
See Also:
Parameters.BORDERWIDTH0, Parameters.BORDERWIDTH1, Parameters.BORDERWIDTH2, Parameters.BORDERWIDTH3, Parameters.BORDERWIDTH4, Parameters.BORDERWIDTH5, Parameters.BORDERWIDTH6

setShape

public void setShape(int arg)
Sets a new shape.
Parameters:
arg - a valid shape
Overrides:
setShape in class Parameters
See Also:
Parameters.POLY, CIRCLE, Parameters.BEZIER, Parameters.SPLINE

setStyle

public void setStyle(int arg)
Sets a new style.
Parameters:
arg - a valid style
See Also:
Parameters.LINE, Parameters.DASHED, Parameters.DOTTED, Parameters.DASHEDDOTTED

setArrow

public void setArrow(int arg)
Sets a new direction type.
Parameters:
arg - a valid direction
See Also:
Parameters.EDGELIKE, Parameters.NOARROW, Parameters.TORIGHT, Parameters.TOLEFT, Parameters.TOLEFTRIGHT, Parameters.TORIGHTLEFT, Parameters.MIDDLERIGHT, Parameters.MIDDLELEFT

setSAnch

public void setSAnch(Point p)
Set a new anchor at start node. p is used as reference (no copy effects are involved).

Note:
This is a experimental feature
Parameters:
p - a point

setTAnch

public void setTAnch(Point p)
Set a new anchor at end node. p is used as reference (no copy effects are involved).

Note:
This is a experimental feature
Parameters:
p - a valid Vector2D reference

setLabelType

public void setLabelType(int arg)
Sets a new label type.
Parameters:
arg - a valid label type
Overrides:
setLabelType in class Parameters
See Also:
Parameters.NON, Parameters.USER, Parameters.DATA, Parameters.INDEX, Parameters.USERDATA, Parameters.USERINDEX, Parameters.DATAINDEX, Parameters.USERDATAINDEX

setLabelPosition

public void setLabelPosition(int arg)
Sets a new label position.
Parameters:
arg - a valid label position
Overrides:
setLabelPosition in class Parameters
See Also:
Parameters.LPOS_ABOVE, Parameters.LPOS_ON, Parameters.LPOS_UNDER

getWidth

public int getWidth()
Returns current width.
Returns:
a non-negativ integer
See Also:
Parameters.BORDERWIDTH0, Parameters.BORDERWIDTH1, Parameters.BORDERWIDTH2, Parameters.BORDERWIDTH3, Parameters.BORDERWIDTH4, Parameters.BORDERWIDTH5, Parameters.BORDERWIDTH6

getStyle

public int getStyle()
Returns current style.
Returns:
a valid style
See Also:
Parameters.LINE, Parameters.DASHED, Parameters.DOTTED, Parameters.DASHEDDOTTED

getArrow

public int getArrow()
Returns current direction.
Returns:
a valid direction
See Also:
Parameters.EDGELIKE, Parameters.NOARROW, Parameters.TORIGHT, Parameters.TOLEFT, Parameters.TOLEFTRIGHT, Parameters.TORIGHTLEFT, Parameters.MIDDLERIGHT, Parameters.MIDDLELEFT

getSAnch

public Point getSAnch()
Returns current S anchor.

Note:
This is a experimental feature
Returns:
a Vector2D

getTAnch

public Point getTAnch()
Returns current T anchor.

Note:
This is a experimental feature
Returns:
a Vector2D

getSAnchAsVector2D

public Vector2D getSAnchAsVector2D()
Returns current S anchor.

Note:
This is a experimental feature
Returns:
a Vector2D

getTAnchAsVector2D

public Vector2D getTAnchAsVector2D()
Returns current T anchor.

Note:
This is a experimental feature
Returns:
a Vector2D

getLabelPosition

public int getLabelPosition()
Returns current label position.
Returns:
a valid position
Overrides:
getLabelPosition in class Parameters
See Also:
Parameters.LPOS_ABOVE, Parameters.LPOS_ON, Parameters.LPOS_UNDER