Package org.jgraph.graph
Class GraphConstants
java.lang.Object
org.jgraph.graph.GraphConstants
A collection of well known or common attribute keys and methods to apply to
an Map to get/set the properties in a typesafe manner. The following
attributes and methods need special attention: removeAttributes, removeAll
and value. RemoveAttributes and RemoveAll are not stored in a map, but remove
the specified entries. The value entry of a propertyMap is always in sync
with the userObject of a GraphCell. The isMoveable, isAutoSize and isSizeable
are used indepedently (see
http://sourceforge.net/forum/forum.php?thread_id=770111&forum_id=140880)
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringKey for theabsoluteXattribute.static final StringKey for theabsoluteYattribute.static final intRepresents a circle decoration for the beginning or ending of edges.static final intRepresents a classic arrow decoration for the beginning or ending of edges.static final intRepresents a diamond decoration for the beginning or ending of edges.static final intRepresents a double line decoration for the beginning or ending of edges.static final intRepresents a line decoration for the beginning or ending of edges.static final intRepresents no decoration for the beginning or ending of edges.static final intRepresents a simple arrow decoration for the beginning or ending of edges.static final intRepresents a technical arrow decoration for the beginning or ending of edges.static final StringKey for theautosizeattribute.static final StringKey for thebackgroundattribute.static final StringKey for thebeginFillattribute.static final StringKey for thebeginSizeattribute.static final StringKey for thebendableattribute.static final StringKey for theborderattribute.static final StringKey for thebordercolorattribute.static final StringKey for theboundsattribute.static final StringKey for thechildrenSelectableattribute.static final StringKey for theconnectableattribute.static final StringKey for theconstrainedattribute.protected static float[]Global Stroke To Highlight Selectionstatic final StringKey for thedashOffsetattribute.static final StringKey for thedashPatternattribute.static intDefault decoration size.static FontDefault font is derived from UIManager.getDefaults().getFont("Label.font")static intDefault inset size.static final StringKey for thedisconnectableattribute.static final StringKey for theeditableattribute.static final StringKey for theendFillattribute.static final StringKey for theendSizeattribute.static final StringKey for thelabelEnabledattribute.static final StringKey for theextraLabelPositionsattribute.static final StringKey for theextraLabelsattribute.static final StringKey for thefontattribute.static final StringKey for theforegroundattribute.static final StringKey for thegradientattribute.static final StringKey for thegroupOpaqueattribute.static final StringKey for thehorizontalAlignmentattribute.static final StringKey for thehorizontalTextPositionattribute.static final StringKey for theiconattribute.static final StringKey for theinsetattribute.static final StringKey for thelabelAlongEdgeattribute.static final StringKey for thelabelEnabledattribute.static final StringKey for thelabelpositionattribute.static final StringKey for thelineBeginattribute.static final StringKey for thelinecolorattribute.static final StringKey for thelineEndattribute.static final StringKey for thelineStyleattribute.static final StringKey for thelinewidthattribute.static final StringKey for thelinkattribute.static final StringKey for themoveableattribute.static final StringKey for themoveableAxisattribute.static final StringKey for thechildrenSelectableattribute.static final StringKey for theoffsetattribute.static final StringKey for theopaqueattribute.static final int100 percent unit for relative positioning.static final StringKey for thepointsattribute.static final StringKey for theremoveAllattribute.static final StringKey for theremoveAttributesattribute.static final StringKey for thereplaceAttributesattribute.static final StringKey for theresizeattribute.static final StringKey for theroutingattribute.static Edge.RoutingThe default routing that deals with loops.static final Edge.RoutingA simple routing.static final StringKey for theselectableattribute.static Strokestatic final StringKey for thesizeattribute.static final StringKey for thesizeableattribute.static final StringKey for thesizeableAxisattribute.static final intRepresents a bezier line stylestatic final intRepresents an orthogonal line stylestatic final intRepresents an spline line stylestatic final StringKey for thevalueattribute.static final StringKey for theverticalAlignmentattribute.static final StringKey for theverticalTextPositionattribute.static final intRepresents an bezier line stylestatic final intRepresents an bezier line style -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MapcreateAttributes(Object[] cells, Object[] keys, Object[] values) Returns a new (nested) map, from cells to attribute maps.static MapcreateAttributes(Object[] cells, Object key, Object value) Overloaded method that passes arguments on as arraysstatic MapcreateAttributes(Object[] elements, CellMapper cm) Returns a new map, from cells to property maps.static MapcreateAttributes(Object cell, Object key, Object value) Overloaded method that passes arguments on as arraysstatic MapcreateAttributesFromModel(Object[] elements, GraphModel model) static final ColorgetBackground(Map map) Returns the background attribute from the specified map.static final intgetBeginSize(Map map) Returns the beginsize attribute from the specified map.static final BorderReturns the border attribute from the specified map.static final ColorgetBorderColor(Map map) Returns the bordercolor attribute from the specified map.static final Rectangle2DReturns the bounds attribute from the specified map.static final floatgetDashOffset(Map map) Returns the dashoffset attribute from the specified map.static final float[]getDashPattern(Map map) Returns the dashpattern attribute from the specified map.static final intgetEndSize(Map map) Returns the endsize attribute from the specified map.static final Point2D[]Returns the extralabelpositions attribute from the specified map.static final Object[]getExtraLabels(Map map) Returns the additional label objects from the specified map.Extra labels only work with edges currently.static FontReturns the font for the specified attribute map.static final ColorgetForeground(Map map) Returns the foreground attribute from the specified map.static final ColorgetGradientColor(Map map) Returns the gradientcolor attribute from the specified map.static final intReturns the horizontalalignment attribute from the specified map.static final intReturns the horizontaltextposition attribute from the specified map.static final IconReturns the icon attribute from the specified map.static final intReturns the inset attribute from the specified map.static final Point2DgetLabelPosition(Map map) Returns the label position attribute from the specified map.static final intgetLineBegin(Map map) Returns the LINEBEGIN attribute from the specified map.static final ColorgetLineColor(Map map) Returns the linecolor attribute from the specified map.static final intgetLineEnd(Map map) Returns the LINEEND attribute from the specified map.static final intgetLineStyle(Map map) Returns the linestyle attribute from the specified map.static final floatgetLineWidth(Map map) Returns the linewidth attribute from the specified map.static StringReturns the link for the specified attribute map.static final intgetMoveableAxis(Map map) Returns the moveableaxis attribute from the specified map.static final Point2DReturns the offset attribute from the specified map.static final ListReturns the points attribute from the specified map.static final Object[]getRemoveAttributes(Map map) Returns the attribute marked as for removal in the specified map.static final Edge.RoutinggetRouting(Map map) Returns the routing attribute from the specified map.static Edge.Routingstatic Edge.Routingstatic final DimensionReturns the size attribute from the specified map.static final intgetSizeableAxis(Map map) Returns the sizeableAxis attribute from the specified map.static final ObjectReturns the value attribute from the specified map.static final intgetVerticalAlignment(Map map) Returns the verticalalignment attribute from the specified map.static final intReturns the verticaltextposition attribute from the specified map.static final booleanisAbsoluteX(Map map) Returns the absolutex attribute from the specified map.static final booleanisAbsoluteY(Map map) Returns the absolutey attribute from the specified map.static final booleanisAutoSize(Map map) Returns the autosize attribute from the specified map.static final booleanisBeginFill(Map map) Returns the beginfill attribute from the specified map.static final booleanisBendable(Map map) Returns the bendable attribute from the specified map.static final booleanisChildrenSelectable(Map map) Returns the childrenselectable attribute from the specified map.static final booleanisConnectable(Map map) Returns the connectable attribute from the specified map.static final booleanisConstrained(Map map) Returns the constrained attribute from the specified map.static final booleanisDisconnectable(Map map) Returns the disconnectable attribute from the specified map.static final booleanisEditable(Map map) Returns the editable attribute from the specified map.static final booleanReturns the endfill attribute from the specified map.static booleanisExactSegmentLabel(Map map) Returns whether the exact segment is worked out for placement of labels along edges for the specified cell.static final booleanisGroupOpaque(Map map) Returns the opaque attribute from the specified map.static final booleanisLabelAlongEdge(Map map) Returns the true if the label should be painted along the edge.static booleanisLabelEnabled(Map map) Returns whether the label is enabled for the specified cell.static final booleanisMoveable(Map map) Returns the moveable attribute from the specified map.static final booleanReturns the opaque attribute from the specified map.static final booleanisRemoveAll(Map map) Returns the removeall attribute from the specified map.static final booleanReturns the resize attribute from the specified map.static final booleanisSelectable(Map map) Returns the selectable attribute from the specified map.static final booleanisSizeable(Map map) Returns the sizeable attribute from the specified map.static MapMerges the specified nested maps by adding all attributes in the change to the attributes for the cell in target, if the cell does not exist in target, then a new entry is added with all attributes from change.static MapreplaceKeys(Map keyMap, Map map) Replace the keys inmapusingkeyMap</code, which maps from old to new keys.static final voidsetAbsolute(Map map, boolean flag) Sets the absolute attributes in the specified map to the specified value.static final voidsetAbsoluteX(Map map, boolean flag) Sets the absolutex attribute in the specified map to the specified value.static final voidsetAbsoluteY(Map map, boolean flag) Sets the absolutey attribute in the specified map to the specified value.static final voidsetAutoSize(Map map, boolean flag) Sets the autosize attribute in the specified map to the specified value.static final voidsetBackground(Map map, Color value) Sets the background attribute in the specified map to the specified value.static final voidsetBeginFill(Map map, boolean flag) Sets the beginfill attribute in the specified map to the specified value.static final voidsetBeginSize(Map map, int style) Sets the beginsize attribute in the specified map to the specified value.static final voidsetBendable(Map map, boolean flag) Sets the bendable attribute in the specified map to the specified value.static final voidSets the border attribute in the specified map to the specified value.static final voidsetBorderColor(Map map, Color value) Sets the bordercolor attribute in the specified map to the specified value.static final voidsetBounds(Map map, Rectangle2D bounds) Sets the bounds attribute in the specified map to the specified value.static final voidsetChildrenSelectable(Map map, boolean flag) Sets the childrenselectable attribute in the specified map to the specified value.static final voidsetConnectable(Map map, boolean flag) Sets the connectable attribute in the specified map to the specified value.static final voidsetConstrained(Map map, boolean flag) Sets the constrained attribute in the specified map to the specified value.static final voidsetDashOffset(Map map, float value) Sets the dashoffset attribute in the specified map to the specified value.static final voidsetDashPattern(Map map, float[] value) Sets the dashpattern attribute in the specified map to the specified value.static final voidsetDisconnectable(Map map, boolean flag) Sets the disconnectable attribute in the specified map to the specified value.static final voidsetEditable(Map map, boolean flag) Sets the editable attribute in the specified map to the specified value.static final voidsetEndFill(Map map, boolean flag) Sets the endfill attribute in the specified map to the specified value.static final voidsetEndSize(Map map, int style) Sets the endsize attribute in the specified map to the specified value.static voidsetExactSegmentLabel(Map map, boolean flag) Sets the exact segment attribute in the specified map to the specified value.static final voidsetExtraLabelPositions(Map map, Point2D[] positions) Sets the labelpositions attribute in the specified map to the specified value.static final voidsetExtraLabels(Map map, Object[] definitions) Sets the array of additional labels.static voidSets the value attribute in the specified map to the specified font value.static final voidsetForeground(Map map, Color value) Sets the foregrund attribute in the specified map to the specified value.static final voidsetGradientColor(Map map, Color value) Sets the gradientcolor attribute in the specified map to the specified value.static final voidsetGroupOpaque(Map map, boolean flag) Sets the opaque attribute in the specified map to the specified value.static final voidsetHorizontalAlignment(Map map, int alignment) This method set the position of the label in vertex cells, and takes aruguments of type SwingConstants (for JLabel) i.e.static final voidsetHorizontalTextPosition(Map map, int textPosition) This method set the text of a label on vertext cell relative to image.static final voidSets the icon attribute in the specified map to the specified value.static final voidSets the inset attribute in the specified map to the specified value.static final voidsetLabelAlongEdge(Map map, boolean flag) Sets if the label should be painted along the edge.static voidsetLabelEnabled(Map map, boolean flag) Sets the label enabled attribute in the specified map to the specified value.static final voidsetLabelPosition(Map map, Point2D position) Sets the label position attribute in the specified map to the specified value.static final voidsetLineBegin(Map map, int style) Sets the LINEBEGIN attribute in the specified map to the specified value.static final voidsetLineColor(Map map, Color value) Sets the linecolor attribute in the specified map to the specified value.static final voidsetLineEnd(Map map, int style) Sets the LINEEND attribute in the specified map to the specified value.static final voidsetLineStyle(Map map, int style) Sets the linestyle attribute in the specified map to the specified value.static final voidsetLineWidth(Map map, float width) Sets the linewidth attribute in the specified map to the specified value.static voidSets the link attribute in the specified map to the specified value.static final voidsetMoveable(Map map, boolean flag) Sets the moveable attribute in the specified map to the specified value.static final voidsetMoveableAxis(Map map, int axis) Sets the moveableaxis attribute in the specified map to the specified value.static final voidSets the offset attribute in the specified map to the specified value.static final voidSets the opaque attribute in the specified map to the specified value.static final voidSets the points attribute in the specified map to the specified value.static final voidsetRemoveAll(Map map, boolean flag) Sets the removeall attribute in the specified map to the specified value.static final voidsetRemoveAttributes(Map map, Object[] value) Sets specific attributes are being marked for removal @ param map The transport map indicating the attribute removal @ param value The attributes to be removedstatic final voidSets the resize attribute in the specified map to the specified value.static final voidsetRouting(Map map, Edge.Routing routing) Sets the routing attribute in the specified map to the specified value.static final voidsetSelectable(Map map, boolean flag) Sets the selectable attribute in the specified map to the specified value.static final voidSets the size attribute in the specified map to the specified value.static final voidsetSizeable(Map map, boolean flag) Sets the sizeable attribute in the specified map to the specified value.static final voidsetSizeableAxis(Map map, int axis) Sets the sizeableAxis attribute in the specified map to the specified value.static final voidSets the value attribute in the specified map to the specified value.static final voidsetVerticalAlignment(Map map, int alignment) This method set the position of the label in vertex cells, and takes aruguments of type SwingConstants (for JLabel) i.e.static final voidsetVerticalTextPosition(Map map, int textPosition) This method set the text of a label on vertext cell relative to image.
-
Field Details
-
DEFAULTFONT
Default font is derived from UIManager.getDefaults().getFont("Label.font") -
DEFAULTDECORATIONSIZE
public static int DEFAULTDECORATIONSIZEDefault decoration size. Value is 0. -
DEFAULTINSET
public static int DEFAULTINSETDefault inset size. Value is 0. -
PERMILLE
public static final int PERMILLE100 percent unit for relative positioning. Current value is 1000.- See Also:
-
dash
protected static float[] dashGlobal Stroke To Highlight Selection -
SELECTION_STROKE
-
ARROW_NONE
public static final int ARROW_NONERepresents no decoration for the beginning or ending of edges. -
ARROW_CLASSIC
public static final int ARROW_CLASSICRepresents a classic arrow decoration for the beginning or ending of edges. -
ARROW_TECHNICAL
public static final int ARROW_TECHNICALRepresents a technical arrow decoration for the beginning or ending of edges. -
ARROW_SIMPLE
public static final int ARROW_SIMPLERepresents a simple arrow decoration for the beginning or ending of edges. -
ARROW_CIRCLE
public static final int ARROW_CIRCLERepresents a circle decoration for the beginning or ending of edges. -
ARROW_LINE
public static final int ARROW_LINERepresents a line decoration for the beginning or ending of edges. -
ARROW_DOUBLELINE
public static final int ARROW_DOUBLELINERepresents a double line decoration for the beginning or ending of edges. -
ARROW_DIAMOND
public static final int ARROW_DIAMONDRepresents a diamond decoration for the beginning or ending of edges. -
STYLE_ORTHOGONAL
public static final int STYLE_ORTHOGONALRepresents an orthogonal line style- See Also:
-
STYLE_BEZIER
public static final int STYLE_BEZIERRepresents a bezier line style- See Also:
-
STYLE_SPLINE
public static final int STYLE_SPLINERepresents an spline line style- See Also:
-
X_AXIS
public static final int X_AXISRepresents an bezier line style- See Also:
-
Y_AXIS
public static final int Y_AXISRepresents an bezier line style- See Also:
-
ROUTING_DEFAULT
The default routing that deals with loops. This is returned bygetRouting(Map)if there is no routing assigned. -
ROUTING_SIMPLE
A simple routing. -
SIZEABLEAXIS
Key for thesizeableAxisattribute. This attribute contains an Integer value representing which axis of a cell may be resized/scaled Constants defined in this class.- See Also:
-
MOVEABLEAXIS
Key for themoveableAxisattribute. This attribute contains an Integer value indicating along which axis a cell may be moved. Constants defined in this class.- See Also:
-
REPLACEATTRIBUTES
Key for thereplaceAttributesattribute. This special attribute contains a Boolean instance indicating whether a map of attributes should replace the attributes of the receiving view.- See Also:
-
REMOVEATTRIBUTES
Key for theremoveAttributesattribute. This special attribute contains a list of attribute-keys which should be removed at the receiving views.- See Also:
-
REMOVEALL
Key for theremoveAllattribute. This causes the receivers attributes to be replaced by the the map that contains this attribute.- See Also:
-
ICON
Key for theiconattribute. Use instances of Icon as values for this key.- See Also:
-
FONT
Key for thefontattribute. Use instances of Font as values for this key.- See Also:
-
OPAQUE
Key for theopaqueattribute. Use instances of Boolean as values for this key.- See Also:
-
GROUPOPAQUE
Key for thegroupOpaqueattribute. Use instances of Boolean as values for this key.- See Also:
-
BORDER
Key for theborderattribute. Use instances of Border as values for this key. Optionally, you can set the global instance of LineBorder.- See Also:
-
LINECOLOR
Key for thelinecolorattribute. Use instances of Color as values for this key.- See Also:
-
BORDERCOLOR
Key for thebordercolorattribute. Use instances of Color as values for this key.- See Also:
-
LINEWIDTH
Key for thelinewidthattribute. Use instances of Float as values for this key.- See Also:
-
FOREGROUND
Key for theforegroundattribute. Use instances of Color as values for this key.- See Also:
-
BACKGROUND
Key for thebackgroundattribute. Use instances of Color as values for this key.- See Also:
-
GRADIENTCOLOR
Key for thegradientattribute. Use instances of Color as values for this key.- See Also:
-
VERTICAL_ALIGNMENT
Key for theverticalAlignmentattribute. Use instances of Integer as values for this key. Constants defined in JLabel class. This key value pair is for placment of label on vertex cell. Valid values would be JLabel.TOP, JLabel.CENTER, JLABEL.BOTTOM- See Also:
-
HORIZONTAL_ALIGNMENT
Key for thehorizontalAlignmentattribute. Use instances of Integer as values for this key. Constants defined in JLabel class. This Key/Value pair is for placment of label on vertex cell. Valid values would be JLabel.LEFT, JLabel.CENTER, JLabel.RIGHT- See Also:
-
VERTICAL_TEXT_POSITION
Key for theverticalTextPositionattribute. Use instances of Integer as values for this key. Constants defined in JLabel class. This Key/Value pair affects text postion of label on vertex cell relative to image, the value is of type SwingConstant.- See Also:
-
HORIZONTAL_TEXT_POSITION
Key for thehorizontalTextPositionattribute. Use instances of Integer as values for this key. Constants defined in JLabel class. This Key/Value pair affects text postion of label on vertex cell relative to image, the value is of type SwingConstant.- See Also:
-
DASHPATTERN
Key for thedashPatternattribute. Use instances of float[] as values for this key.- See Also:
-
DASHOFFSET
Key for thedashOffsetattribute. Use instances of float as values for this key.- See Also:
-
LINESTYLE
Key for thelineStyleattribute. Use instances of Integer as values for this key. Constants defined in this class.- See Also:
-
LINEBEGIN
Key for thelineBeginattribute. Use instances of Integer as values for this key. Constants defined in this class.- See Also:
-
LINEEND
Key for thelineEndattribute. Use instances of Integer as values for this key. Constants defined in this class.- See Also:
-
BEGINSIZE
Key for thebeginSizeattribute. Use instances of Integer as values for this key.- See Also:
-
ENDSIZE
Key for theendSizeattribute. Use instances of Integer as values for this key.- See Also:
-
BEGINFILL
Key for thebeginFillattribute. Use instances of Integer as values for this key.- See Also:
-
ENDFILL
Key for theendFillattribute. Use instances of Integer as values for this key.- See Also:
-
VALUE
Key for thevalueattribute. You can use any Object as a value for this key.- See Also:
-
EDITABLE
Key for theeditableattribute. Use instances of Boolean as values for this key.- See Also:
-
MOVEABLE
Key for themoveableattribute. Use instances of Boolean as values for this key.- See Also:
-
SIZEABLE
Key for thesizeableattribute. Use instances of Boolean as values for this key.- See Also:
-
AUTOSIZE
Key for theautosizeattribute. Use instances of Boolean as values for this key.- See Also:
-
RESIZE
Key for theresizeattribute. Use instances of Boolean as values for this key.- See Also:
-
INSET
Key for theinsetattribute. Use instances of Integer as values for this key.- See Also:
-
CONSTRAINED
Key for theconstrainedattribute. Use instances of Boolean as values for this key.- See Also:
-
SELECTABLE
Key for theselectableattribute. Use instances of Boolean as values for this key.- See Also:
-
CHILDRENSELECTABLE
Key for thechildrenSelectableattribute. Use instances of Boolean as values for this key.- See Also:
-
MOVEHIDDENCHILDREN
Key for thechildrenSelectableattribute. Use instances of Boolean as values for this key.- See Also:
-
BENDABLE
Key for thebendableattribute. Use instances of Boolean as values for this key.- See Also:
-
CONNECTABLE
Key for theconnectableattribute. Use instances of Boolean as values for this key.- See Also:
-
DISCONNECTABLE
Key for thedisconnectableattribute. Use instances of Boolean as values for this key.- See Also:
-
BOUNDS
Key for theboundsattribute. Use instances of Rectangle as values for this key.- See Also:
-
POINTS
Key for thepointsattribute. Use instances of List as values for this key. The list should contain Point instances.- See Also:
-
ROUTING
Key for theroutingattribute. Use instances of EdgeView.EdgeRouter as values for this key.- See Also:
-
LABELPOSITION
Key for thelabelpositionattribute. Use instances of Point as values for this key. This Key/Value pair is for position of text relative to edge cell, and has no effect on label in vertex cell.- See Also:
-
EXTRALABELS
Key for theextraLabelsattribute. Use arrays of Objects as values for this key, where the toString() methods of the objects provide the label text value.- See Also:
-
EXTRALABELPOSITIONS
Key for theextraLabelPositionsattribute. Use arrays of Points as values for this key.- See Also:
-
LABELALONGEDGE
Key for thelabelAlongEdgeattribute. Use instances of Boolean as values for this key.- See Also:
-
ABSOLUTEX
Key for theabsoluteXattribute. Use instances of Boolean as values for this key.- See Also:
-
ABSOLUTEY
Key for theabsoluteYattribute. Use instances of Boolean as values for this key.- See Also:
-
OFFSET
Key for theoffsetattribute. Use instances of Point as values for this key.- See Also:
-
SIZE
Key for thesizeattribute. Use instances of Dimension as values for this key.- See Also:
-
LINK
Key for thelinkattribute. Use instances of String as values for this key.- See Also:
-
LABELENABLED
Key for thelabelEnabledattribute. Use instances of Boolean as values for this key.- See Also:
-
EXACTSEGMENTRELATIVE
Key for thelabelEnabledattribute. Use instances of Boolean as values for this key.- See Also:
-
-
Constructor Details
-
GraphConstants
public GraphConstants()
-
-
Method Details
-
createAttributes
Overloaded method that passes arguments on as arrays -
createAttributes
Overloaded method that passes arguments on as arrays -
createAttributes
Returns a new (nested) map, from cells to attribute maps. The attributes are populated with the (key, value)-pairs specified by the two given arrays. Thekeysandvaluesparameters must match in size. -
createAttributes
Returns a new map, from cells to property maps. Theelementsmay be instances ofCellView, in which case the cell view's corresponding cell is used as a key, and its attributes are used as a property map. In any other case, theelementis considered as a cell and looked-up in the cell mapper to find the corresponding view. If a view is found, its attributes are cloned and used as a property map, along with the cell as a key.Note: This method returns a map of maps! This is different from the createMap method, which creates a map, from keys to values. This method returns a map, from cells to maps, which in turn map from keys to values.
-
createAttributesFromModel
-
replaceKeys
Replace the keys inmapusingkeyMap</code, which maps from old to new keys. The value inmapmust itself be a map, and is cloned usingcloneMap. -
merge
Merges the specified nested maps by adding all attributes in the change to the attributes for the cell in target, if the cell does not exist in target, then a new entry is added with all attributes from change. Returns the modified target map. Note: This method removes entries fromchangeand adds entries totargetin-place!- Returns:
- a map including all attributes from change merged with target
-
setFont
Sets the value attribute in the specified map to the specified font value.- Parameters:
map- The map to store the font attribute in.font- The value to set the font attribute to.
-
getFont
Returns the font for the specified attribute map. Uses default font if no font is specified in the attribute map. -
setRemoveAttributes
Sets specific attributes are being marked for removal @ param map The transport map indicating the attribute removal @ param value The attributes to be removed -
getRemoveAttributes
Returns the attribute marked as for removal in the specified map. -
setMoveableAxis
Sets the moveableaxis attribute in the specified map to the specified value. -
getMoveableAxis
Returns the moveableaxis attribute from the specified map. -
setSizeableAxis
Sets the sizeableAxis attribute in the specified map to the specified value. -
getSizeableAxis
Returns the sizeableAxis attribute from the specified map. -
setIcon
Sets the icon attribute in the specified map to the specified value. -
getIcon
Returns the icon attribute from the specified map. -
setOpaque
Sets the opaque attribute in the specified map to the specified value. -
isOpaque
Returns the opaque attribute from the specified map. -
setGroupOpaque
Sets the opaque attribute in the specified map to the specified value. -
isGroupOpaque
Returns the opaque attribute from the specified map. -
setBorder
Sets the border attribute in the specified map to the specified value. -
getBorder
Returns the border attribute from the specified map. -
setLineColor
Sets the linecolor attribute in the specified map to the specified value. -
getLineColor
Returns the linecolor attribute from the specified map. -
setBorderColor
Sets the bordercolor attribute in the specified map to the specified value. -
getBorderColor
Returns the bordercolor attribute from the specified map. -
setLineWidth
Sets the linewidth attribute in the specified map to the specified value. -
getLineWidth
Returns the linewidth attribute from the specified map. -
setForeground
Sets the foregrund attribute in the specified map to the specified value. -
getForeground
Returns the foreground attribute from the specified map. -
setBackground
Sets the background attribute in the specified map to the specified value. -
getBackground
Returns the background attribute from the specified map. -
setGradientColor
Sets the gradientcolor attribute in the specified map to the specified value. -
getGradientColor
Returns the gradientcolor attribute from the specified map. -
setVerticalAlignment
This method set the position of the label in vertex cells, and takes aruguments of type SwingConstants (for JLabel) i.e. JLabel.TOP etc. Default value is JLabel.CENTER. This method has no effect on edge cells. -
getVerticalAlignment
Returns the verticalalignment attribute from the specified map. -
setHorizontalAlignment
This method set the position of the label in vertex cells, and takes aruguments of type SwingConstants (for JLabel) i.e. JLabel.LEFT etc. Default is JLabel.CENTER. This method has no effect on edge cells. -
getHorizontalAlignment
Returns the horizontalalignment attribute from the specified map. -
setVerticalTextPosition
This method set the text of a label on vertext cell relative to image. See JLabel api. Default value is JLabel.BOTTOM. -
getVerticalTextPosition
Returns the verticaltextposition attribute from the specified map. -
setHorizontalTextPosition
This method set the text of a label on vertext cell relative to image. See JLabel api. Default value is JLabel.CENTER. -
getHorizontalTextPosition
Returns the horizontaltextposition attribute from the specified map. -
setDashPattern
Sets the dashpattern attribute in the specified map to the specified value. -
getDashPattern
Returns the dashpattern attribute from the specified map. -
setDashOffset
Sets the dashoffset attribute in the specified map to the specified value. -
getDashOffset
Returns the dashoffset attribute from the specified map. -
setLineStyle
Sets the linestyle attribute in the specified map to the specified value. -
getLineStyle
Returns the linestyle attribute from the specified map. -
setBeginSize
Sets the beginsize attribute in the specified map to the specified value. -
getBeginSize
Returns the beginsize attribute from the specified map. -
setEndSize
Sets the endsize attribute in the specified map to the specified value. -
getEndSize
Returns the endsize attribute from the specified map. -
setLineBegin
Sets the LINEBEGIN attribute in the specified map to the specified value. This attribute indicates what sort of decoration should be applied to the beginning of edges when they are rendered. -
getLineBegin
Returns the LINEBEGIN attribute from the specified map. This attribute indicates what sort of decoration should be applied to the beginning of edges when they are rendered. -
setLineEnd
Sets the LINEEND attribute in the specified map to the specified value. This attribute indicates what sort of decoration should be applied to the ends of edges when they are rendered. -
getLineEnd
Returns the LINEEND attribute from the specified map. This attribute indicates what sort of decoration should be applied to the ends of edges when they are rendered. -
setValue
Sets the value attribute in the specified map to the specified value. -
getValue
Returns the value attribute from the specified map. Only use for transport maps, not storage map since the value is removed from the final storage map- See Also:
-
setLabelPosition
Sets the label position attribute in the specified map to the specified value. -
getLabelPosition
Returns the label position attribute from the specified map. The point is interpreted by the EdgeRenderer as follows:
x coordinate: the percentual position on the length of the edge in direction of the edge
y coordinate: the absolute offset, orthogonally to the edge -
setExtraLabels
Sets the array of additional labels. The objects's toString methods are used to determine the actual label string. Extra labels only work with edges currently. -
getExtraLabels
Returns the additional label objects from the specified map.Extra labels only work with edges currently. -
setExtraLabelPositions
Sets the labelpositions attribute in the specified map to the specified value. The Point instance at a particular index corresponds to the object at the same index in the extralabels array attribute. Extra labels only work with edges currently.- See Also:
-
getExtraLabelPositions
Returns the extralabelpositions attribute from the specified map. Extra labels only work with edges currently. -
setLabelAlongEdge
Sets if the label should be painted along the edge. -
isLabelAlongEdge
Returns the true if the label should be painted along the edge. Defaults to false. -
setEditable
Sets the editable attribute in the specified map to the specified value. -
isEditable
Returns the editable attribute from the specified map. -
setMoveable
Sets the moveable attribute in the specified map to the specified value. -
isMoveable
Returns the moveable attribute from the specified map. -
setSizeable
Sets the sizeable attribute in the specified map to the specified value. -
isSizeable
Returns the sizeable attribute from the specified map. -
setAutoSize
Sets the autosize attribute in the specified map to the specified value. -
isAutoSize
Returns the autosize attribute from the specified map. -
setResize
Sets the resize attribute in the specified map to the specified value. -
isResize
Returns the resize attribute from the specified map. -
setConstrained
Sets the constrained attribute in the specified map to the specified value. -
isConstrained
Returns the constrained attribute from the specified map. -
setSelectable
Sets the selectable attribute in the specified map to the specified value. This detemines whether or not a cell may be selected. Vertices and edges may be selectable, not ports. -
isSelectable
Returns the selectable attribute from the specified map.- See Also:
-
setChildrenSelectable
Sets the childrenselectable attribute in the specified map to the specified value. -
isChildrenSelectable
Returns the childrenselectable attribute from the specified map. -
setBendable
Sets the bendable attribute in the specified map to the specified value. -
isBendable
Returns the bendable attribute from the specified map. -
setConnectable
Sets the connectable attribute in the specified map to the specified value. -
isConnectable
Returns the connectable attribute from the specified map. -
setDisconnectable
Sets the disconnectable attribute in the specified map to the specified value. -
isDisconnectable
Returns the disconnectable attribute from the specified map. -
setPoints
Sets the points attribute in the specified map to the specified value. Points are literally the points where an edge is connected by two lines. The two defaults points are the start and end of the edge. For example, for an simple orthogonal edge there will be two extra points indicating where the two right-angled bends are. This attribute can only be applied to an edge. -
getPoints
Returns the points attribute from the specified map.- See Also:
-
setRouting
Sets the routing attribute in the specified map to the specified value. -
getRouting
Returns the routing attribute from the specified map. -
setBounds
Sets the bounds attribute in the specified map to the specified value. -
getBounds
Returns the bounds attribute from the specified map. Note: The CellView interface offers a getBounds method! -
setInset
Sets the inset attribute in the specified map to the specified value. -
getInset
Returns the inset attribute from the specified map. Note: The CellView interface offers a getBounds method! -
setSize
Sets the size attribute in the specified map to the specified value. Not currently used in JGraph. Use setBounds to set vertex bounds instead. -
getSize
Returns the size attribute from the specified map. Not currently used in JGraph. Use getBounds to set vertex bounds instead. -
setOffset
Sets the offset attribute in the specified map to the specified value. The offset is the position of a port relative to its origin, note this attribute is only for ports. -
getOffset
Returns the offset attribute from the specified map. The offset is the position of a port relative to its origin, note this attribute is only for ports. -
setBeginFill
Sets the beginfill attribute in the specified map to the specified value. -
isBeginFill
Returns the beginfill attribute from the specified map. -
setEndFill
Sets the endfill attribute in the specified map to the specified value. -
isEndFill
Returns the endfill attribute from the specified map. -
setAbsolute
Sets the absolute attributes in the specified map to the specified value. -
setAbsoluteY
Sets the absolutey attribute in the specified map to the specified value. -
isAbsoluteY
Returns the absolutey attribute from the specified map. -
setAbsoluteX
Sets the absolutex attribute in the specified map to the specified value. -
isAbsoluteX
Returns the absolutex attribute from the specified map. -
setRemoveAll
Sets the removeall attribute in the specified map to the specified value. -
isRemoveAll
Returns the removeall attribute from the specified map. -
getROUTING_SIMPLE
- Returns:
- Returns the ROUTING_SIMPLE.
-
getROUTING_DEFAULT
- Returns:
- Returns the ROUTING_SIMPLE.
-
setLink
Sets the link attribute in the specified map to the specified value.- Parameters:
map- The map to store the link attribute in.link- The value to set the link attribute to.
-
getLink
Returns the link for the specified attribute map. -
setLabelEnabled
Sets the label enabled attribute in the specified map to the specified value.- Parameters:
map- The map to store the label enabled attribute in.flag- The value to set the label enabled attribute to.
-
isLabelEnabled
Returns whether the label is enabled for the specified cell.- Parameters:
map- the attribute map for the cell being tested for this condition.- Returns:
- whether or not labels should be displayed on this cell
-
setExactSegmentLabel
Sets the exact segment attribute in the specified map to the specified value.- Parameters:
map- The map to store the exact segment attribute in.flag- The value to set the exact segment attribute to.
-
isExactSegmentLabel
Returns whether the exact segment is worked out for placement of labels along edges for the specified cell.- Parameters:
map- the attribute map for the cell being tested for this condition.- Returns:
- whether or not exact segments should be calculated on this cell
-