Package org.graffiti.graphics
Class GraphElementGraphicAttribute
java.lang.Object
org.graffiti.attributes.AbstractAttribute
org.graffiti.attributes.AbstractCollectionAttribute
org.graffiti.attributes.HashMapAttribute
org.graffiti.graphics.GraphElementGraphicAttribute
- All Implemented Interfaces:
Comparable<Object>,Attribute,CollectionAttribute,DeepCopy,GraphicAttributeConstants,Displayable
- Direct Known Subclasses:
EdgeGraphicAttribute,NodeGraphicAttribute
public abstract class GraphElementGraphicAttribute extends HashMapAttribute implements GraphicAttributeConstants
Defines the common graphic attributes for nodes and edges
- Version:
- $Revision: 1.5 $
-
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 GraphElementGraphicAttribute(String id)Constructor for GraphElementGraphicAttribute.GraphElementGraphicAttribute(String id, Image i, Color frc, Color fic, LabelAttribute l, double ft, LineModeAttribute lm, String s)Constructor for GraphElementGraphicAttribute.GraphElementGraphicAttribute(String id, ImageAttribute i, ColorAttribute frc, ColorAttribute fic, LabelAttribute l, DoubleAttribute ft, LineModeAttribute lm, StringAttribute s)Constructor for GraphElementGraphicAttribute. -
Method Summary
Modifier and Type Method Description ImageAttributegetBackgroundImage()Returns the 'backgroundimage'-value of the encapsulated edge.ColorAttributegetFillcolor()Returns the 'fillcolor'-value of the encapsulated edge.ColorAttributegetFramecolor()Returns the 'framecolor'-value of the encapsulated edge.doublegetFrameThickness()Returns the 'frameThickness'-value of the encapsulated edge.LineModeAttributegetLineMode()Returns the 'lineMode'-value of the encapsulated edge.doublegetOpacity()Returns the current opacity of this graph elementdoublegetRoundedEdges()Returns the rounding of the edges.StringgetShape()Returns the 'shape'-value of the encapsulated edge.doublegetUseGradient()voidsetBackgroundImage(ImageAttribute bgi)Sets the 'backgroundimage'-value.voidsetFillcolor(ColorAttribute fic)Sets the 'fillcolor'-value.voidsetFramecolor(ColorAttribute frc)Sets the 'framecolor'-value.voidsetFrameThickness(double ft)Sets the 'frameThickness'-value.voidsetLineMode(LineModeAttribute lma)Sets the 'lineMode'-value.voidsetOpacity(double value)Sets the opacity of a graph element (node or edge) This value will also influence the opacity of all dependent graph attribute components.voidsetRoundedEdges(double rd)voidsetShape(String sn)Sets the 'shape'-value.voidsetUseGradient(double rd)Methods inherited from class org.graffiti.attributes.HashMapAttribute
compareTo, copy, getCollection, setCollection, setDefaultValue, sizeMethods inherited from class org.graffiti.attributes.AbstractCollectionAttribute
add, add, getAttributable, getAttribute, getValue, isEmpty, remove, remove, setAttributable, toString, toXMLStringMethods inherited from class org.graffiti.attributes.AbstractAttribute
addEdgeAttributeType, addNodeAttributeType, getDescription, getIcon, getId, getName, getParent, getPath, getTypedAttribute, isDeleted, isTypedAttributeFromID, setDeleted, setDescription, setId, setParent, setValue, toStringMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.graffiti.attributes.Attribute
getAttributable, getId, getParent, getPath, getValue, isDeleted, setDeleted, setId, setParent, setValue, toStringMethods inherited from interface org.graffiti.attributes.CollectionAttribute
add, add, getAttribute, isEmpty, remove, remove, setAttributableMethods inherited from interface org.graffiti.plugin.Displayable
getDescription, getIcon, getName, setDescription, toXMLString
-
Constructor Details
-
GraphElementGraphicAttribute
Constructor for GraphElementGraphicAttribute.- Parameters:
id-- Throws:
IllegalIdException
-
GraphElementGraphicAttribute
public GraphElementGraphicAttribute(String id, ImageAttribute i, ColorAttribute frc, ColorAttribute fic, LabelAttribute l, DoubleAttribute ft, LineModeAttribute lm, StringAttribute s) throws IllegalIdExceptionConstructor for GraphElementGraphicAttribute.- Parameters:
id- the id of the attribute.i- the backgroundimage-value of the attriubtefrc- the framecolor-value of the attribute.fic- the fillcolor-value of the attribute.l- DOCUMENT ME!ft- the framethickness-value of the attribute.lm- the linemode-value of the attribute.s- DOCUMENT ME!- Throws:
IllegalIdException
-
GraphElementGraphicAttribute
public GraphElementGraphicAttribute(String id, Image i, Color frc, Color fic, LabelAttribute l, double ft, LineModeAttribute lm, String s) throws IllegalIdExceptionConstructor for GraphElementGraphicAttribute.- Parameters:
id- the id of the attribute.i- the backgroundimage-value of the attriubtefrc- the framecolor-value of the attribute.fic- the fillcolor-value of the attribute.l- DOCUMENT ME!ft- the framethickness-value of the attribute.lm- the linemode-value of the attribute.s- DOCUMENT ME!- Throws:
IllegalIdException
-
-
Method Details
-
setBackgroundImage
Sets the 'backgroundimage'-value.- Parameters:
bgi- the 'backgroundimage'-value to be set.
-
getBackgroundImage
Returns the 'backgroundimage'-value of the encapsulated edge.- Returns:
- the 'backgroundimage'-value of the encapsulated edge.
-
setFillcolor
Sets the 'fillcolor'-value.- Parameters:
fic- the 'fillcolor'-value to be set.
-
getFillcolor
Returns the 'fillcolor'-value of the encapsulated edge.- Returns:
- the 'fillcolor'-value of the encapsulated edge.
-
setFrameThickness
public void setFrameThickness(double ft)Sets the 'frameThickness'-value.- Parameters:
ft- the 'frameThickness'-value to be set.
-
setRoundedEdges
public void setRoundedEdges(double rd) -
setUseGradient
public void setUseGradient(double rd) -
getFrameThickness
public double getFrameThickness()Returns the 'frameThickness'-value of the encapsulated edge.- Returns:
- the 'frameThickness'-value of the encapsulated edge.
-
getRoundedEdges
public double getRoundedEdges()Returns the rounding of the edges.- Returns:
- The rounding value of the edges
-
getUseGradient
public double getUseGradient() -
setFramecolor
Sets the 'framecolor'-value.- Parameters:
frc- the 'framecolor'-valueto be set.
-
getFramecolor
Returns the 'framecolor'-value of the encapsulated edge.- Returns:
- the 'framecolor'-value of the encapsulated edge.
-
setLineMode
Sets the 'lineMode'-value.- Parameters:
lma- the 'lineMode'-value to be set.
-
getLineMode
Returns the 'lineMode'-value of the encapsulated edge.- Returns:
- the 'lineMode'-value of the encapsulated edge.
-
setShape
Sets the 'shape'-value.- Parameters:
sn- the 'shape'-value to be set.
-
getShape
Returns the 'shape'-value of the encapsulated edge.- Returns:
- the 'shape'-value of the encapsulated edge.
-
setOpacity
public void setOpacity(double value)Sets the opacity of a graph element (node or edge) This value will also influence the opacity of all dependent graph attribute components. Only values between 0.0 (transparent) and 1.0 (opaque) are allowed Values outside the allowed range are capped -
getOpacity
public double getOpacity()Returns the current opacity of this graph element- Returns:
- opacity between 0.0 and 1.0
-