Package org.graffiti.graphics
Class PortAttribute
java.lang.Object
org.graffiti.attributes.AbstractAttribute
org.graffiti.attributes.AbstractCollectionAttribute
org.graffiti.attributes.HashMapAttribute
org.graffiti.graphics.PortAttribute
- All Implemented Interfaces:
Comparable<Object>,Attribute,CollectionAttribute,DeepCopy,GraphicAttributeConstants,Displayable
public class PortAttribute extends HashMapAttribute implements GraphicAttributeConstants
Contains information about the port of a node
- Version:
- $Revision: 1.6 $
- 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 PortAttribute(String id)Constructor for Port.PortAttribute(String id, String n, double x, double y)Constructor for Port.PortAttribute(String id, String n, Point2D c)Constructor for Port.PortAttribute(String id, String n, CoordinateAttribute c)Constructor for Port.PortAttribute(String id, StringAttribute n, double x, double y)Constructor for Port.PortAttribute(String id, StringAttribute n, Point2D c)Constructor for Port.PortAttribute(String id, StringAttribute n, CoordinateAttribute c)Constructor for Port.PortAttribute(String id, Port port)Constructor with an ID and aPortobject. -
Method Summary
Modifier and Type Method Description Objectcopy()Returns a deep copy of this object.booleanequals(Object obj)CoordinateAttributegetCoordinate()Returns the 'port'-value of the encapsulated port.StringgetName()Returns the 'name'-value of the encapsulated port.PortgetPort()Returns the encapsulated port.voidsetCollection(Map<String,Attribute> attrs)Sets the collection of attributes contained within this CollectionAttributevoidsetCoordinate(CoordinateAttribute c)Sets the 'port'-value.voidsetName(String n)Sets the 'name'-value.Methods inherited from class org.graffiti.attributes.HashMapAttribute
compareTo, getCollection, 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, getParent, getPath, getTypedAttribute, isDeleted, isTypedAttributeFromID, setDeleted, setDescription, setId, setParent, setValue, toStringMethods inherited from class java.lang.Object
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, setDescription, toXMLString
-
Constructor Details
-
PortAttribute
Constructor for Port.- Parameters:
id- the id of the attribute.
-
PortAttribute
Constructor with an ID and aPortobject.- Parameters:
id-port-
-
PortAttribute
Constructor for Port.- Parameters:
id- the id of the attribute.n- the name-value of the attribute.c- the coordinate-value of the attribute.
-
PortAttribute
Constructor for Port.- Parameters:
id- the id of the attribute.n- the name-value of the attribute.c- the coordinate-value of the attribute.
-
PortAttribute
Constructor for Port.- Parameters:
id- the id of the attribute.n- the name-value of the attribute.x- the x-coordinate-value of the attribute.y- the y-coordinate-value of the attribute.
-
PortAttribute
Constructor for Port.- Parameters:
id- the id of the attribute.n- the name-value of the attribute.c- the coordinate-value of the attribute.
-
PortAttribute
Constructor for Port.- Parameters:
id- the id of the attribute.n- the name-value of the attribute.c- the coordinate-value of the attribute.
-
PortAttribute
Constructor for Port.- Parameters:
id- the id of the attribute.n- the name-value of the attribute.x- the x-coordinate-value of the attribute.y- the y-coordinate-value of the attribute.
-
-
Method Details
-
setCollection
Sets the collection of attributes contained within this CollectionAttribute- Specified by:
setCollectionin interfaceCollectionAttribute- Overrides:
setCollectionin classHashMapAttribute- Parameters:
attrs- the map that contains all attributes.- Throws:
IllegalArgumentException- DOCUMENT ME!
-
setCoordinate
Sets the 'port'-value.- Parameters:
c- the 'port'-value to be set.
-
getCoordinate
Returns the 'port'-value of the encapsulated port.- Returns:
- the 'port'-value of the encapsulated port.
-
setName
Sets the 'name'-value.- Parameters:
n- the 'name'-value to be set.
-
getName
Returns the 'name'-value of the encapsulated port.- Specified by:
getNamein interfaceDisplayable- Overrides:
getNamein classAbstractAttribute- Returns:
- the 'name'-value of the encapsulated port.
- See Also:
Displayable.getName()
-
getPort
Returns the encapsulated port.- Returns:
- Port
-
copy
Returns a deep copy of this object.- Specified by:
copyin interfaceDeepCopy- Overrides:
copyin classHashMapAttribute- Returns:
- A deep copy of this object.
-
equals
- Overrides:
equalsin classObject- See Also:
Object.equals(java.lang.Object)
-