jdsl.extension.LEDA
Class NodeParameters

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

public class NodeParameters
extends Parameters
implements java.lang.Cloneable

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


Field Summary
static int CIRCLE
          A valid shape for nodes: 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
NodeParameters()
          Constructs a new parameter set initialized with default values.
NodeParameters(NodeParameters n)
          Constructs a new parameters set by copying given.
 
Method Summary
 java.lang.Object clone()
          Creats a new NodeParameters and initializes it with this.
 Color getBorderColor()
          Returns current color (of border).
 int getBorderColorIndex()
          Returns current color-index (of border).
 int getBorderWidth()
          Returns current width (of border).
 double getShapeHeight()
          Returns current height (of shape).
 double getShapeWidth()
          Returns current width (of shape).
 void setBorderColor(Color arg)
          Sets a new color for border.
 void setBorderColor(int arg)
          Sets a new color for border.
 void setBorderWidth(int arg)
          Changes border's width.
 void setDefaults()
          Sets default values for all attributs.
 void setShapeHeight(double arg)
          Changes shape's height.
 void setShapeWidth(double arg)
          Changes shape's width.
 java.lang.String toString()
           
 
Methods inherited from class jdsl.extension.LEDA.Parameters
getColor, getColorIndex, getLabel, getLabelColor, getLabelColorIndex, getLabelPosition, getLabelType, getShape, setColor, setColor, setLabel, setLabelColor, setLabelColor, setLabelPosition, setLabelType, setShape
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CIRCLE

public static final int CIRCLE
A valid shape for nodes: circle.
See Also:
Parameters.ELLIPSE, Parameters.SQUARE, Parameters.RECTANGLE, Parameters.SMOOTHRECTANGLE, Parameters.OVAL, Parameters.RHOMBUS
Constructor Detail

NodeParameters

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

NodeParameters

public NodeParameters(NodeParameters n)
Constructs a new parameters set by copying given.

Note:
If n is null then it will initialized with default values.
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

clone

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

setDefaults

public void setDefaults()
Sets default values for all attributs.

setShapeWidth

public void setShapeWidth(double arg)
Changes shape's width.
Parameters:
arg - new width (non-negativ double)

setShapeHeight

public void setShapeHeight(double arg)
Changes shape's height.
Parameters:
arg - new height (non-negativ double)

setBorderColor

public void setBorderColor(Color arg)
Sets a new color for border.
Parameters:
arg - a valid color
See Also:
Parameters.INVISIBLE, Parameters.WHITE, Parameters.BLACK, Parameters.RED, Parameters.GREEN, Parameters.BLUE, Parameters.YELLOW, Parameters.VIOLET, Parameters.ORANGE, Parameters.CYAN, Parameters.BROWN, Parameters.PINK, Parameters.GREEN2, Parameters.BLUE2, Parameters.GREY1, Parameters.GREY2, Parameters.GREY3, Parameters.DEFAULTCOLOR

setBorderColor

public void setBorderColor(int arg)
Sets a new color for border.
Parameters:
arg - a valid color-index
See Also:
Color.INVISIBLE, Color.WHITE, Color.BLACK, Color.RED, Color.GREEN, Color.BLUE, Color.YELLOW, Color.VIOLET, Color.ORANGE, Color.CYAN, Color.BROWN, Color.PINK, Color.GREEN2, Color.BLUE2, Color.GREY1, Color.GREY2, Color.GREY3, Color.DEFAULTCOLOR

setBorderWidth

public void setBorderWidth(int arg)
Changes border's width.
Parameters:
arg - any non-negativ integer
See Also:
Parameters.BORDERWIDTH0, Parameters.BORDERWIDTH1, Parameters.BORDERWIDTH2, Parameters.BORDERWIDTH3, Parameters.BORDERWIDTH4, Parameters.BORDERWIDTH5, Parameters.BORDERWIDTH6

getShapeWidth

public double getShapeWidth()
Returns current width (of shape).
Returns:
a non-negativ double

getShapeHeight

public double getShapeHeight()
Returns current height (of shape).
Returns:
a non-negativ double

getBorderColor

public Color getBorderColor()
Returns current color (of border).
Returns:
a valid color
See Also:
Parameters.INVISIBLE, Parameters.WHITE, Parameters.BLACK, Parameters.RED, Parameters.GREEN, Parameters.BLUE, Parameters.YELLOW, Parameters.VIOLET, Parameters.ORANGE, Parameters.CYAN, Parameters.BROWN, Parameters.PINK, Parameters.GREEN2, Parameters.BLUE2, Parameters.GREY1, Parameters.GREY2, Parameters.GREY3, Parameters.DEFAULTCOLOR

getBorderColorIndex

public int getBorderColorIndex()
Returns current color-index (of border).
Returns:
a valid color-index
See Also:
Color.INVISIBLE, Color.WHITE, Color.BLACK, Color.RED, Color.GREEN, Color.BLUE, Color.YELLOW, Color.VIOLET, Color.ORANGE, Color.CYAN, Color.BROWN, Color.PINK, Color.GREEN2, Color.BLUE2, Color.GREY1, Color.GREY2, Color.GREY3, Color.DEFAULTCOLOR

getBorderWidth

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