org.graffiti.graphics
Class EdgeGraphicAttribute

java.lang.Object
  extended by org.graffiti.attributes.AbstractAttribute
      extended by org.graffiti.attributes.AbstractCollectionAttribute
          extended by org.graffiti.attributes.HashMapAttribute
              extended by org.graffiti.graphics.GraphElementGraphicAttribute
                  extended by org.graffiti.graphics.EdgeGraphicAttribute
All Implemented Interfaces:
Attribute, CollectionAttribute, DeepCopy, GraphicAttributeConstants, Displayable<Object>

public class EdgeGraphicAttribute
extends GraphElementGraphicAttribute

Defines all graphic attributes of an edge

Version:
$Revision: 5768 $
Author:
breu

Field Summary
 
Fields inherited from class org.graffiti.graphics.GraphElementGraphicAttribute
backgroundImage, fillcolor, framecolor, frameThickness, lineMode, shape
 
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
EdgeGraphicAttribute()
          Constructs an EdgeGraphicAttribute and initializes all its members.
EdgeGraphicAttribute(boolean directed)
          Constructs an EdgeGraphicAttribute and initializes all its members.
EdgeGraphicAttribute(StringAttribute ah, StringAttribute at, double t, DockingAttribute d)
          Constructs an EdgeGraphicAttribute and initializes all its members.
EdgeGraphicAttribute(String ah, String at, DoubleAttribute t, DockingAttribute d)
          Constructs an EdgeGraphicAttribute and initializes all its members.
EdgeGraphicAttribute(String ah, String at, double t, DockingAttribute d)
          Constructs an EdgeGraphicAttribute and initializes all its members.
EdgeGraphicAttribute(String ah, String at, double t, DockingAttribute d, LinkedHashMapAttribute b, String lt)
          Constructs an EdgeGraphicAttribute and initializes all its members.
 
Method Summary
 Object copy()
          Returns a deep copy of this object.
 String getArrowhead()
          Returns the 'arrowhead'-value of the encapsulated edge.
 String getArrowtail()
          Returns the 'arrowtail'-value of the encapsulated edge.
 SortedCollectionAttribute getBends()
          Returns the collection of CoordinateAttributes specifying the bends for this edge.
 double getDepth()
          Returns the 'depth'-value of the encapsulated edge.
 DockingAttribute getDocking()
          Returns the 'docking'-value of the encapsulated edge.
 String getLineType()
          Returns the line type.
 int getNumberOfBends()
           
 double getThickness()
          Returns the 'thickness'-value of the encapsulated edge.
 void setArrowhead(String ah)
          Sets the 'arrowhead'-value.
 void setArrowtail(String at)
          Sets the 'arrowtail'-value.
 void setBends(SortedCollectionAttribute b)
          Sets the 'bends'-value.
 void setCollection(Map<String,Attribute> attrs)
          Sets the collection of attributes contained within this CollectionAttribute
 void setDepth(double depth)
          Sets the 'depth'-value.
 void setDocking(DockingAttribute d)
          Sets the 'docking'-value.
 void setLineType(String l)
          DOCUMENT ME!
 void setThickness(double t)
          Sets the 'thickness'-value.
 
Methods inherited from class org.graffiti.graphics.GraphElementGraphicAttribute
getBackgroundImage, getFillcolor, getFramecolor, getFrameThickness, getLineMode, getShape, setBackgroundImage, setFillcolor, setFramecolor, setFrameThickness, setLineMode, setShape
 
Methods inherited from class org.graffiti.attributes.HashMapAttribute
doSetValue, getCollection, setDefaultValue
 
Methods inherited from class org.graffiti.attributes.AbstractCollectionAttribute
add, add, containsAttribute, getAttributable, getAttribute, getValue, isEmpty, remove, remove, setAttributable, toString, toXMLString
 
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, toXMLString
 

Constructor Detail

EdgeGraphicAttribute

public EdgeGraphicAttribute(String ah,
                            String at,
                            double t,
                            DockingAttribute d,
                            LinkedHashMapAttribute b,
                            String lt)
Constructs an EdgeGraphicAttribute and initializes all its members.

Parameters:
ah - the arrowhead-value of the attribute.
at - the arrowtail-value of the attribute.
t - the thickness-value of the attribute.
d - the docking-value of the attribute.
b - the CollectionAttriubte containing the bends.
lt - the lineType of the edge.

EdgeGraphicAttribute

public EdgeGraphicAttribute()
                     throws IllegalIdException
Constructs an EdgeGraphicAttribute and initializes all its members.

Throws:
IllegalIdException

EdgeGraphicAttribute

public EdgeGraphicAttribute(boolean directed)
                     throws IllegalIdException
Constructs an EdgeGraphicAttribute and initializes all its members.

Parameters:
directed - indicates whether the edge is directed
Throws:
IllegalIdException

EdgeGraphicAttribute

public EdgeGraphicAttribute(String ah,
                            String at,
                            double t,
                            DockingAttribute d)
                     throws IllegalIdException
Constructs an EdgeGraphicAttribute and initializes all its members.

Parameters:
ah - the arrowhead-value of the attribute.
at - the arrowtail-value of the attribute.
t - the thickness-value of the attribute.
d - the docking-value of the attribute.
Throws:
IllegalIdException

EdgeGraphicAttribute

public EdgeGraphicAttribute(String ah,
                            String at,
                            DoubleAttribute t,
                            DockingAttribute d)
                     throws IllegalIdException
Constructs an EdgeGraphicAttribute and initializes all its members.

Parameters:
ah - the arrowhead-value of the attribute.
at - the arrowtail-value of the attribute.
t - the thickness-value of the attribute.
d - the docking-value of the attribute.
Throws:
IllegalIdException

EdgeGraphicAttribute

public EdgeGraphicAttribute(StringAttribute ah,
                            StringAttribute at,
                            double t,
                            DockingAttribute d)
                     throws IllegalIdException
Constructs an EdgeGraphicAttribute and initializes all its members.

Parameters:
ah - the arrowhead-value of the attribute.
at - the arrowtail-value of the attribute.
t - the thickness-value of the attribute.
d - the docking-value of the attribute.
Throws:
IllegalIdException
Method Detail

setArrowhead

public void setArrowhead(String ah)
Sets the 'arrowhead'-value.

Parameters:
ah - the 'arrowhead'-value to be set.

getArrowhead

public String getArrowhead()
Returns the 'arrowhead'-value of the encapsulated edge.

Returns:
the 'arrowhead'-value of the encapsulated edge.

setArrowtail

public void setArrowtail(String at)
Sets the 'arrowtail'-value.

Parameters:
at - the 'arrowtail'-value to be set.

getArrowtail

public String getArrowtail()
Returns the 'arrowtail'-value of the encapsulated edge.

Returns:
the 'arrowtail'-value of the encapsulated edge.

setBends

public void setBends(SortedCollectionAttribute b)
Sets the 'bends'-value.

Parameters:
b - the 'bends'-value to be set.

getBends

public SortedCollectionAttribute getBends()
Returns the collection of CoordinateAttributes specifying the bends for this edge.

Returns:
the collection of CoordinateAttributes specifying the bends for this edge.

getNumberOfBends

public int getNumberOfBends()

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 HashMapAttribute
Parameters:
attrs - the map that contains all attributes.
Throws:
IllegalArgumentException - DOCUMENT ME!

setDocking

public void setDocking(DockingAttribute d)
Sets the 'docking'-value.

Parameters:
d - the 'docking'-value to be set.

getDocking

public DockingAttribute getDocking()
Returns the 'docking'-value of the encapsulated edge.

Returns:
the 'docking'-value of the encapsulated edge.

setLineType

public void setLineType(String l)
DOCUMENT ME!

Parameters:
l -

getLineType

public String getLineType()
Returns the line type.

Returns:
DOCUMENT ME!

setThickness

public void setThickness(double t)
Sets the 'thickness'-value.

Parameters:
t - the 'thickness'-value of the encapsulated edge.

getThickness

public double getThickness()
Returns the 'thickness'-value of the encapsulated edge.

Returns:
the 'thickness'-value of the encapsulated edge.

setDepth

public void setDepth(double depth)
Sets the 'depth'-value.

Parameters:
depth - the 'depth'-value of the encapsulated edge.

getDepth

public double getDepth()
Returns the 'depth'-value of the encapsulated edge.

Returns:
the 'depth'-value of the encapsulated edge.

copy

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

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


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