Package org.graffiti.graphics
Class PortsAttribute
java.lang.Object
org.graffiti.attributes.AbstractAttribute
org.graffiti.attributes.AbstractCollectionAttribute
org.graffiti.attributes.HashMapAttribute
org.graffiti.graphics.PortsAttribute
- All Implemented Interfaces:
Comparable<Object>
,Attribute
,CollectionAttribute
,DeepCopy
,GraphicAttributeConstants
,Displayable
public class PortsAttribute extends HashMapAttribute implements GraphicAttributeConstants
Contains ingoing, outgoing and common ports
- 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 PortsAttribute(String id)
Constructor for Ports.PortsAttribute(String id, CollectionAttribute i, CollectionAttribute o, CollectionAttribute c)
Constructor for Ports. -
Method Summary
Modifier and Type Method Description Object
copy()
Returns a deep copy of this object.CollectionAttribute
getCommon()
Returns the 'common'-value of the encapsulated ports.CollectionAttribute
getIngoing()
Returns the 'ingoing'-value of the encapsulated ports.CollectionAttribute
getOutgoing()
Returns the 'outgoing'-value of the encapsulated ports.PortAttribute
getPort(String name, boolean out)
Look if there is aPortAttribute
in thisCollectionAttribute
calledname
.void
setCollection(Map<String,Attribute> attrs)
Sets the collection of attributes contained within this CollectionAttributevoid
setCommon(CollectionAttribute c)
Sets the 'common'-value.void
setCommonPorts(List ports)
DOCUMENT ME!void
setIngoing(CollectionAttribute i)
Sets the 'ingoing'-value.void
setOutgoing(CollectionAttribute o)
Sets the 'outgoing'-value.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
-
PortsAttribute
Constructor for Ports.- Parameters:
id
- the id of the attribute.
-
PortsAttribute
public PortsAttribute(String id, CollectionAttribute i, CollectionAttribute o, CollectionAttribute c)Constructor for Ports.- Parameters:
id
- the id of the attribute.i
- the ingoing-value of the attribute.o
- the outgoing-value of the attribute.c
- the common-value of the attribute.
-
-
Method Details
-
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!
-
setCommon
Sets the 'common'-value.- Parameters:
c
- the 'common'-value to be set.
-
getCommon
Returns the 'common'-value of the encapsulated ports.- Returns:
- the 'common'-value of the encapsulated ports.
-
setCommonPorts
DOCUMENT ME!- Parameters:
ports
- DOCUMENT ME!
-
setIngoing
Sets the 'ingoing'-value.- Parameters:
i
- the 'ingoing'-value to be set.
-
getIngoing
Returns the 'ingoing'-value of the encapsulated ports.- Returns:
- the 'ingoing'-value of the encapsulated ports.
-
setOutgoing
Sets the 'outgoing'-value.- Parameters:
o
- the 'outgoing'-value to be set.
-
getOutgoing
Returns the 'outgoing'-value of the encapsulated ports.- Returns:
- the 'outgoing'-value of the encapsulated ports.
-
getPort
Look if there is aPortAttribute
in thisCollectionAttribute
calledname
. Returnsnull
if there is no such attribute.- Parameters:
name
- the name of the port attribute wanted.out
- DOCUMENT ME!- Returns:
- the
PortAttribute
namedname
ornull
if no such attribute exists.
-
copy
Returns a deep copy of this object.- Specified by:
copy
in interfaceDeepCopy
- Overrides:
copy
in classHashMapAttribute
- Returns:
- A deep copy of this object.
-