org.graffiti.graphics
Class NodeLabelPositionAttribute

java.lang.Object
  extended by org.graffiti.attributes.AbstractAttribute
      extended by org.graffiti.attributes.AbstractCollectionAttribute
          extended by org.graffiti.attributes.LinkedHashMapAttribute
              extended by org.graffiti.graphics.PositionAttribute
                  extended by org.graffiti.graphics.NodeLabelPositionAttribute
All Implemented Interfaces:
Attribute, CollectionAttribute, SortedCollectionAttribute, DeepCopy, GraphicAttributeConstants, Displayable<Object>

public class NodeLabelPositionAttribute
extends PositionAttribute

DOCUMENT ME!

Version:
$Revision: 5768 $ Specifies position of a node label providing several parameters.
Author:
holleis

Field Summary
 
Fields inherited from class org.graffiti.attributes.AbstractCollectionAttribute
attributes
 
Fields inherited from class org.graffiti.attributes.AbstractAttribute
id
 
Fields inherited from interface org.graffiti.graphics.GraphicAttributeConstants
ABSOLUTE_X_OFFSET, ABSOLUTE_Y_OFFSET, ALIGNMENT, ALIGNMENT_SEGMENT, ALIGNMENT_X, ALIGNMENT_Y, ARROWHEAD, ARROWSHAPE_CLASSNAME, ARROWTAIL, BEND, BENDS, BENDS_PATH, BGIMAGE, BGIMAGE_PATH, BLUE, BOTTOM_INSIDE, BOTTOM_OUTSIDE, CENTERED, CIRCLE_CENTER, CIRCLE_CENTER_PATH, CIRCLE_CLASSNAME, CIRCLE_LINE_SEGMENTATION_CLASSNAME, CIRCLE_LINE_SEGMENTATION_SHAPE, COMMON, COORD_PATH, COORDINATE, COORDX_PATH, COORDY_PATH, COORDZ_PATH, CUBICSPLINE, CUBICSPLINE_CLASSNAME, DEFAULT_CAP, DEFAULT_EDGE_FILLCOLOR, DEFAULT_EDGE_FRAMECOLOR, DEFAULT_EDGE_FRAMETHICKNESS, DEFAULT_EDGE_THICKNESS, DEFAULT_FONT_SIZE, DEFAULT_GRAPHIC_ELEMENT_FRAMECOLOR, DEFAULT_GRAPHIC_ELEMENT_FRAMETHICKNESS, DEFAULT_JOIN, DEFAULT_MAX_WIDTH, DEFAULT_MITER, DEFAULT_NODE_FILLCOLOR, DEFAULT_NODE_FRAMECOLOR, DEFAULT_NODE_FRAMETHICKNESS, DEFAULT_NODE_SHAPE, DEFAULT_NODE_SIZE, DEPTH, DEPTH_PATH, DIM_PATH, DIMENSION, DIMH_PATH, DIMW_PATH, DOCKING, DOCKING_PATH, EDGE, ELLIPSE_CLASSNAME, END_ANGLE, FILLCOLOR, FILLCOLOR_PATH, FONT, FONT_SIZE, FRAMECOLOR, FRAMETHICKNESS, FRAMETHICKNESS_PATH, GRAPHICS, GREEN, GRID, GRID_PATH, HEIGHT, IMAGE, IN, INTRA_LEVEL_CLASSNAME, LABEL, LABEL_ATTRIBUTE_PATH, LABEL_DISTANCE, LEFT_INSIDE, LEFT_OUTSIDE, LEVEL, LINE_POINT_PATH, LINEMODE, LINEMODE_PATH, LINETYPE, LINEWIDTH_PATH, MAX_WIDTH, MAXIMIZE, NAME, NEARSOURCE, NEARTARGET, NODE, OFFSET, OPAC, OUT, OUTLINE_PATH, POLYCLOSED_CLASSNAME, POLYLINE, POLYLINE_CLASSNAME, PORT, PORTS, PORTS_PATH, POSITION, QUAD_CURVE_EDGE_SHAPE, RECTANGLE_CLASSNAME, RED, REF, RELATIVE_ALIGNMENT, RELATIVE_X_OFFSET, RELATIVE_Y_OFFSET, RIGHT_INSIDE, RIGHT_OUTSIDE, ROTATION, SHAPE, SHAPE_DESC_PATH, SHAPE_PATH, SHAPEDESCRIPTION, SMOOTH_CLASSNAME, SMOOTH_LINE_EDGE_SHAPE, SMOOTHLINE, SOURCE, SPIRAL_CLASSNAME, SQUARESPLINE, SQUARESPLINE_CLASSNAME, START_ANGLE, STRAIGHT_LINE_EDGE_SHAPE, STRAIGHTLINE, STRAIGHTLINE_CLASSNAME, TARGET, TEXTCOLOR, THICKNESS, THICKNESS_PATH, TILED, TOP_INSIDE, TOP_OUTSIDE, WIDTH, X, Y, Z
 
Fields inherited from interface org.graffiti.attributes.Attribute
SEPARATOR
 
Constructor Summary
NodeLabelPositionAttribute(String id)
          Constructor for NodeLabelPositionAttribute.
NodeLabelPositionAttribute(String id, StringAttribute alignmentX, StringAttribute alignmentY, DoubleAttribute relativeXOffset, DoubleAttribute relativeYOffset, IntegerAttribute absoluteXOffset, IntegerAttribute absoluteYOffset)
          Constructor for NodeLabelPositionAttribute.
NodeLabelPositionAttribute(String id, String alignmentX, String alignmentY, double relativeXOffset, double relativeYOffset, int absoluteXOffset, int absoluteYOffset)
          Constructor for NodeLabelPositionAttribute.
 
Method Summary
 Object copy()
          Returns a deep copy of this object.
 int getAbsoluteXOffset()
          Returns the absolute X offset.
 int getAbsoluteYOffset()
          Returns the absolute Y offset.
 String getAlignmentX()
          Returns the X alignment.
 String getAlignmentY()
          Returns the Y alignment.
 double getRelativeXOffset()
          Returns the relative X offset.
 double getRelativeYOffset()
          Returns the relative Y offset.
 double getRotationDegree()
          Returns the rotation in degree.
 double getRotationRadian()
          Returns the rotation of this Label in radian.
 void setAbsoluteXOffset(int absoluteXOffset)
          Sets the absolute X offset.
 void setAbsoluteYOffset(int absoluteYOffset)
          Sets the absolute Y offset.
 void setAlignmentX(String alignmentX)
          Sets the X alignment.
 void setAlignmentY(String alignmentY)
          Sets the Y alignment.
 void setCollection(Map<String,Attribute> attrs)
          Sets the collection of attributes contained within this CollectionAttribute
 void setRelativeXOffset(double relativeXOffset)
          Sets the relative X offset.
 void setRelativeYOffset(double relativeYOffset)
          Sets the relative Y offset.
 void setRotationDegree(double degree)
          Sets the rotation in degree.
 void setRotationRadian(double radian)
          Sets the rotation of this Label.
 
Methods inherited from class org.graffiti.attributes.LinkedHashMapAttribute
doSetValue, getCollection, setDefaultValue, toXMLString
 
Methods inherited from class org.graffiti.attributes.AbstractCollectionAttribute
add, add, containsAttribute, getAttributable, getAttribute, getValue, isEmpty, remove, remove, setAttributable, toString
 
Methods inherited from class org.graffiti.attributes.AbstractAttribute
callPostAttributeAdded, callPostAttributeChanged, callPostAttributeRemoved, callPreAttributeAdded, callPreAttributeChanged, callPreAttributeRemoved, getDescription, getId, getName, getParent, getPath, getSpaces, getStandardXML, setDescription, setParent, setValue, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.graffiti.attributes.CollectionAttribute
add, add, containsAttribute, getAttribute, isEmpty, remove, remove, setAttributable
 
Methods inherited from interface org.graffiti.attributes.Attribute
getAttributable, getId, getParent, getPath, getValue, setParent, setValue, toString
 
Methods inherited from interface org.graffiti.plugin.Displayable
getDescription, getName, setDescription
 

Constructor Detail

NodeLabelPositionAttribute

public NodeLabelPositionAttribute(String id)
Constructor for NodeLabelPositionAttribute.

Parameters:
id -

NodeLabelPositionAttribute

public NodeLabelPositionAttribute(String id,
                                  String alignmentX,
                                  String alignmentY,
                                  double relativeXOffset,
                                  double relativeYOffset,
                                  int absoluteXOffset,
                                  int absoluteYOffset)
Constructor for NodeLabelPositionAttribute.


NodeLabelPositionAttribute

public NodeLabelPositionAttribute(String id,
                                  StringAttribute alignmentX,
                                  StringAttribute alignmentY,
                                  DoubleAttribute relativeXOffset,
                                  DoubleAttribute relativeYOffset,
                                  IntegerAttribute absoluteXOffset,
                                  IntegerAttribute absoluteYOffset)
Constructor for NodeLabelPositionAttribute.

Method Detail

setCollection

public void setCollection(Map<String,Attribute> attrs)
Sets the collection of attributes contained within this CollectionAttribute

Specified by:
setCollection in interface CollectionAttribute
Overrides:
setCollection in class PositionAttribute
Parameters:
attrs - the map that contains all attributes.
Throws:
IllegalArgumentException - DOCUMENT ME!

getAbsoluteXOffset

public int getAbsoluteXOffset()
Returns the absolute X offset.

Returns:
int the absolute X offset

setAbsoluteXOffset

public void setAbsoluteXOffset(int absoluteXOffset)
Sets the absolute X offset.

Parameters:
absoluteXOffset - the new absolute X offset

getAbsoluteYOffset

public int getAbsoluteYOffset()
Returns the absolute Y offset.

Returns:
int the absolute Y offset

setAbsoluteYOffset

public void setAbsoluteYOffset(int absoluteYOffset)
Sets the absolute Y offset.

Parameters:
absoluteYOffset - the new absolute Y offset

getRelativeXOffset

public double getRelativeXOffset()
Returns the relative X offset.

Returns:
int the relative X offset

setRelativeXOffset

public void setRelativeXOffset(double relativeXOffset)
Sets the relative X offset.

Parameters:
relativeXOffset - the new relative X offset

getRelativeYOffset

public double getRelativeYOffset()
Returns the relative Y offset.

Returns:
int the relative Y offset

setRelativeYOffset

public void setRelativeYOffset(double relativeYOffset)
Sets the relative Y offset.

Parameters:
relativeYOffset - the new relative Y offset

getAlignmentX

public String getAlignmentX()
Returns the X alignment.

Returns:
String the X alignment

setAlignmentX

public void setAlignmentX(String alignmentX)
Sets the X alignment.

Parameters:
alignmentX - the new X alignment

getAlignmentY

public String getAlignmentY()
Returns the Y alignment.

Returns:
String the Y alignment

setAlignmentY

public void setAlignmentY(String alignmentY)
Sets the Y alignment.

Parameters:
alignmentY - the new Y alignment

getRotationDegree

public double getRotationDegree()
Returns the rotation in degree.

Returns:
The rotation in degree.

setRotationDegree

public void setRotationDegree(double degree)
Sets the rotation in degree.

Parameters:
degree - The rotation in degree.

getRotationRadian

public double getRotationRadian()
Returns the rotation of this Label in radian.

Returns:
The rotation of this Label in radian.

setRotationRadian

public void setRotationRadian(double radian)
Sets the rotation of this Label.

Parameters:
radian - The rotation of the Label, which is to be set.

copy

public Object copy()
Returns a deep copy of this object.

Specified by:
copy in interface DeepCopy
Overrides:
copy in class LinkedHashMapAttribute
Returns:
A deep copy of this object.


Generated at 2012-05-30 11:00:36 PM CEST