Package org.graffiti.graphics
Class EdgeGraphicAttribute
java.lang.Object
org.graffiti.attributes.AbstractAttribute
org.graffiti.attributes.AbstractCollectionAttribute
org.graffiti.attributes.HashMapAttribute
org.graffiti.graphics.GraphElementGraphicAttribute
org.graffiti.graphics.EdgeGraphicAttribute
- All Implemented Interfaces:
Comparable<Object>
,Attribute
,CollectionAttribute
,DeepCopy
,GraphicAttributeConstants
,Displayable
public class EdgeGraphicAttribute extends GraphElementGraphicAttribute
Defines all graphic attributes of an edge
- Version:
- $Revision: 1.8 $
- Author:
- breu
-
Field Summary
Fields inherited from interface org.graffiti.graphics.GraphicAttributeConstants
ABOVE, ABOVELEFT, ABOVERIGHT, ABSHOR, ABSVERT, ALIGNMENT, ALIGNSEGMENT, ANCHOR, ARROWHEAD, ARROWTAIL, AUTO_OUTSIDE, AXISCOLOR, BELOW, BELOWLEFT, BELOWRIGHT, BENDS, BENDS_PATH, BGIMAGE, BLUE, BORDER_BOTTOM_CENTER, BORDER_BOTTOM_LEFT, BORDER_BOTTOM_RIGHT, BORDER_LEFT_BOTTOM, BORDER_LEFT_CENTER, BORDER_LEFT_TOP, BORDER_RIGHT_BOTTOM, BORDER_RIGHT_CENTER, BORDER_RIGHT_TOP, BORDER_TOP_CENTER, BORDER_TOP_LEFT, BORDER_TOP_RIGHT, CATEGORY_BACKGROUND_A, CATEGORY_BACKGROUND_B, CATEGORY_BACKGROUND_C, CENTERED, CENTERED_FIT, CHARTBACKGROUNDCOLOR, CIRCLE_CLASSNAME, COLOR, COMMON, COORD_PATH, COORDINATE, COORDX_PATH, COORDY_PATH, CUBICSPLINE, CUBICSPLINE_CLASSNAME, DEFAULT_CAP_B, DEFAULT_CAP_R, DEFAULT_JOIN, DEFAULT_MITER, DIM_PATH, DIMENSION, DIMH_PATH, DIMW_PATH, DOCKING, DOCKING_PATH, ELLIPSE_CLASSNAME, FILLCOLOR, FILLCOLOR_PATH, FONTNAME, FONTSIZE, FONTSTYLE, FRAMECOLOR, FRAMETHICKNESS, FRAMETHICKNESS_PATH, GRADIENT, GRAPHICS, GREEN, GRIDCOLOR, HEATMAP_LOWER_COL, HEATMAP_MIDDLE_COL, HEATMAP_UPPER_COL, HEIGHT, HIDDEN, IMAGE, IN, INSIDEBOTTOM, INSIDEBOTTOMLEFT, INSIDEBOTTOMRIGHT, INSIDELEFT, INSIDERIGHT, INSIDETOP, INSIDETOPLEFT, INSIDETOPRIGHT, LABEL, LABEL_ATTRIBUTE_PATH, LABEL_DISTANCE, LABELGRAPHICS, LABELOFFSET, LEFT, LINEMODE, LINETYPE, LINEWIDTH_PATH, LOCALALIGN, MAXIMIZE, NAME, NEARSOURCE, NEARTARGET, OPAC, OUT, OUTLINE_PATH, POLYCLOSED_CLASSNAME, POLYLINE, POLYLINE_CLASSNAME, PORT, PORTS, PORTS_PATH, POSITION, RECTANGLE_CLASSNAME, RED, REF, RELALIGN, RELHOR, RELVERT, RIGHT, ROUNDING, SHADOWCOLOR, SHADOWOFFSET, SHAPE, SHAPE_DESC_PATH, SHAPE_PATH, SHAPEDESCRIPTION, SMOOTH_CLASSNAME, SMOOTHLINE, SOURCE, SQUARESPLINE, SQUARESPLINE_CLASSNAME, STRAIGHTLINE, STRAIGHTLINE_CLASSNAME, TARGET, TEXTCOLOR, THICKNESS, TILED, WIDTH, X, Y
-
Constructor Summary
Constructors Constructor Description EdgeGraphicAttribute()
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.EdgeGraphicAttribute(String ah, String at, DoubleAttribute t, DockingAttribute d)
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. -
Method Summary
Modifier and Type Method Description 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.Collection<Attribute>
getBendAttributes()
int
getBendCount()
SortedCollectionAttribute
getBends()
Returns the collection ofCoordinateAttribute
s specifying the bends for this edge.DockingAttribute
getDocking()
Returns the 'docking'-value of the encapsulated edge.String
getLineType()
Returns the line type.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 CollectionAttributevoid
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, getOpacity, getRoundedEdges, getShape, getUseGradient, setBackgroundImage, setFillcolor, setFramecolor, setFrameThickness, setLineMode, setOpacity, setRoundedEdges, setShape, setUseGradient
Methods inherited from class org.graffiti.attributes.HashMapAttribute
compareTo, getCollection, setDefaultValue, size
Methods inherited from class org.graffiti.attributes.AbstractCollectionAttribute
add, add, getAttributable, getAttribute, getValue, isEmpty, remove, remove, setAttributable, toString, toXMLString
Methods inherited from class org.graffiti.attributes.AbstractAttribute
addEdgeAttributeType, addNodeAttributeType, getDescription, getIcon, getId, getName, getParent, getPath, getTypedAttribute, isDeleted, isTypedAttributeFromID, setDeleted, setDescription, setId, setParent, setValue, toString
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.graffiti.attributes.Attribute
getAttributable, getId, getParent, getPath, getValue, isDeleted, setDeleted, setId, setParent, setValue, toString
Methods inherited from interface org.graffiti.attributes.CollectionAttribute
add, add, getAttribute, isEmpty, remove, remove, setAttributable
Methods inherited from interface org.graffiti.plugin.Displayable
getDescription, getIcon, getName, setDescription, toXMLString
-
Constructor Details
-
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
- theCollectionAttriubte
containing the bends.lt
- the lineType of the edge.
-
EdgeGraphicAttribute
Constructs an EdgeGraphicAttribute and initializes all its members.- Throws:
IllegalIdException
-
EdgeGraphicAttribute
public EdgeGraphicAttribute(String ah, String at, double t, DockingAttribute d) throws IllegalIdExceptionConstructs 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 IllegalIdExceptionConstructs 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 IllegalIdExceptionConstructs 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 Details
-
setArrowhead
Sets the 'arrowhead'-value.- Parameters:
ah
- the 'arrowhead'-value to be set.
-
getArrowhead
Returns the 'arrowhead'-value of the encapsulated edge.- Returns:
- the 'arrowhead'-value of the encapsulated edge.
-
setArrowtail
Sets the 'arrowtail'-value.- Parameters:
at
- the 'arrowtail'-value to be set.
-
getArrowtail
Returns the 'arrowtail'-value of the encapsulated edge.- Returns:
- the 'arrowtail'-value of the encapsulated edge.
-
setBends
Sets the 'bends'-value.- Parameters:
b
- the 'bends'-value to be set.
-
getBends
Returns the collection ofCoordinateAttribute
s specifying the bends for this edge.- Returns:
- the collection of
CoordinateAttribute
s specifying the bends for this edge.
-
setCollection
Sets the collection of attributes contained within this CollectionAttribute- Specified by:
setCollection
in interfaceCollectionAttribute
- Overrides:
setCollection
in classHashMapAttribute
- Parameters:
attrs
- the map that contains all attributes.- Throws:
IllegalArgumentException
- DOCUMENT ME!
-
setDocking
Sets the 'docking'-value.- Parameters:
d
- the 'docking'-value to be set.
-
getDocking
Returns the 'docking'-value of the encapsulated edge.- Returns:
- the 'docking'-value of the encapsulated edge.
-
setLineType
DOCUMENT ME!- Parameters:
l
-
-
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.
-
copy
Returns a deep copy of this object.- Specified by:
copy
in interfaceDeepCopy
- Overrides:
copy
in classHashMapAttribute
- Returns:
- A deep copy of this object.
-
getBendAttributes
-
getBendCount
public int getBendCount()
-