|
JGraph |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.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 | |
static String |
ABSOLUTEX
Key for the absoluteX attribute. |
static String |
ABSOLUTEY
Key for the absoluteY attribute. |
static int |
ARROW_CIRCLE
Represents a circle decoration for the beginning or ending of edges. |
static int |
ARROW_CLASSIC
Represents a classic arrow decoration for the beginning or ending of edges. |
static int |
ARROW_DIAMOND
Represents a diamond decoration for the beginning or ending of edges. |
static int |
ARROW_DOUBLELINE
Represents a double line decoration for the beginning or ending of edges. |
static int |
ARROW_LINE
Represents a line decoration for the beginning or ending of edges. |
static int |
ARROW_NONE
Represents no decoration for the beginning or ending of edges. |
static int |
ARROW_SIMPLE
Represents a simple arrow decoration for the beginning or ending of edges. |
static int |
ARROW_TECHNICAL
Represents a technical arrow decoration for the beginning or ending of edges. |
static String |
AUTOSIZE
Key for the autosize attribute. |
static String |
BACKGROUND
Key for the background attribute. |
static String |
BEGINFILL
Key for the beginFill attribute. |
static String |
BEGINSIZE
Key for the beginSize attribute. |
static String |
BENDABLE
Key for the bendable attribute. |
static String |
BORDER
Key for the border attribute. |
static String |
BORDERCOLOR
Key for the bordercolor attribute. |
static String |
BOUNDS
Key for the bounds attribute. |
static String |
CHILDRENSELECTABLE
Key for the childrenSelectable attribute. |
static String |
CONNECTABLE
Key for the connectable attribute. |
static String |
CONSTRAINED
Key for the constrained attribute. |
protected static float[] |
dash
Global Stroke To Highlight Selection |
static String |
DASHOFFSET
Key for the dashOffset attribute. |
static String |
DASHPATTERN
Key for the dashPattern attribute. |
static int |
DEFAULTDECORATIONSIZE
Default decoration size. |
static Font |
DEFAULTFONT
Default font is derived from UIManager.getDefaults().getFont("Label.font") |
static int |
DEFAULTINSET
Default inset size. |
static String |
DISCONNECTABLE
Key for the disconnectable attribute. |
static String |
EDITABLE
Key for the editable attribute. |
static String |
ENDFILL
Key for the endFill attribute. |
static String |
ENDSIZE
Key for the endSize attribute. |
static String |
EXACTSEGMENTRELATIVE
Key for the labelEnabled attribute. |
static String |
EXTRALABELPOSITIONS
Key for the extraLabelPositions attribute. |
static String |
EXTRALABELS
Key for the extraLabels attribute. |
static String |
FONT
Key for the font attribute. |
static String |
FOREGROUND
Key for the foreground attribute. |
static String |
GRADIENTCOLOR
Key for the gradient attribute. |
static String |
GROUPOPAQUE
Key for the groupOpaque attribute. |
static String |
HORIZONTAL_ALIGNMENT
Key for the horizontalAlignment attribute. |
static String |
HORIZONTAL_TEXT_POSITION
Key for the horizontalTextPosition attribute. |
static String |
ICON
Key for the icon attribute. |
static String |
INSET
Key for the inset attribute. |
static String |
LABELALONGEDGE
Key for the labelAlongEdge attribute. |
static String |
LABELENABLED
Key for the labelEnabled attribute. |
static String |
LABELPOSITION
Key for the labelposition attribute. |
static String |
LINEBEGIN
Key for the lineBegin attribute. |
static String |
LINECOLOR
Key for the linecolor attribute. |
static String |
LINEEND
Key for the lineEnd attribute. |
static String |
LINESTYLE
Key for the lineStyle attribute. |
static String |
LINEWIDTH
Key for the linewidth attribute. |
static String |
LINK
Key for the link attribute. |
static String |
MOVEABLE
Key for the moveable attribute. |
static String |
MOVEABLEAXIS
Key for the moveableAxis attribute. |
static String |
MOVEHIDDENCHILDREN
Key for the childrenSelectable attribute. |
static String |
OFFSET
Key for the offset attribute. |
static String |
OPAQUE
Key for the opaque attribute. |
static int |
PERMILLE
100 percent unit for relative positioning. |
static String |
POINTS
Key for the points attribute. |
static String |
REMOVEALL
Key for the removeAll attribute. |
static String |
REMOVEATTRIBUTES
Key for the removeAttributes attribute. |
static String |
REPLACEATTRIBUTES
Key for the replaceAttributes attribute. |
static String |
RESIZE
Key for the resize attribute. |
static String |
ROUTING
Key for the routing attribute. |
static Edge.Routing |
ROUTING_DEFAULT
The default routing that deals with loops. |
static Edge.Routing |
ROUTING_SIMPLE
A simple routing. |
static String |
SELECTABLE
Key for the selectable attribute. |
static Stroke |
SELECTION_STROKE
|
static String |
SIZE
Key for the size attribute. |
static String |
SIZEABLE
Key for the sizeable attribute. |
static String |
SIZEABLEAXIS
Key for the sizeableAxis attribute. |
static int |
STYLE_BEZIER
Represents a bezier line style |
static int |
STYLE_ORTHOGONAL
Represents an orthogonal line style |
static int |
STYLE_SPLINE
Represents an spline line style |
static String |
VALUE
Key for the value attribute. |
static String |
VERTICAL_ALIGNMENT
Key for the verticalAlignment attribute. |
static String |
VERTICAL_TEXT_POSITION
Key for the verticalTextPosition attribute. |
static int |
X_AXIS
Represents an bezier line style |
static int |
Y_AXIS
Represents an bezier line style |
Constructor Summary | |
GraphConstants()
|
Method Summary | |
static Map |
createAttributes(Object[] elements,
CellMapper cm)
Returns a new map, from cells to property maps. |
static Map |
createAttributes(Object[] cells,
Object[] keys,
Object[] values)
Returns a new (nested) map, from cells to attribute maps. |
static Map |
createAttributes(Object[] cells,
Object key,
Object value)
Overloaded method that passes arguments on as arrays |
static Map |
createAttributes(Object cell,
Object key,
Object value)
Overloaded method that passes arguments on as arrays |
static Map |
createAttributesFromModel(Object[] elements,
GraphModel model)
|
static Color |
getBackground(Map map)
Returns the background attribute from the specified map. |
static int |
getBeginSize(Map map)
Returns the beginsize attribute from the specified map. |
static Border |
getBorder(Map map)
Returns the border attribute from the specified map. |
static Color |
getBorderColor(Map map)
Returns the bordercolor attribute from the specified map. |
static Rectangle2D |
getBounds(Map map)
Returns the bounds attribute from the specified map. |
static float |
getDashOffset(Map map)
Returns the dashoffset attribute from the specified map. |
static float[] |
getDashPattern(Map map)
Returns the dashpattern attribute from the specified map. |
static int |
getEndSize(Map map)
Returns the endsize attribute from the specified map. |
static Point2D[] |
getExtraLabelPositions(Map map)
Returns the extralabelpositions attribute from the specified map. |
static Object[] |
getExtraLabels(Map map)
Returns the additional label objects from the specified map.Extra labels only work with edges currently. |
static Font |
getFont(Map map)
Returns the font for the specified attribute map. |
static Color |
getForeground(Map map)
Returns the foreground attribute from the specified map. |
static Color |
getGradientColor(Map map)
Returns the gradientcolor attribute from the specified map. |
static int |
getHorizontalAlignment(Map map)
Returns the horizontalalignment attribute from the specified map. |
static int |
getHorizontalTextPosition(Map map)
Returns the horizontaltextposition attribute from the specified map. |
static Icon |
getIcon(Map map)
Returns the icon attribute from the specified map. |
static int |
getInset(Map map)
Returns the inset attribute from the specified map. |
static Point2D |
getLabelPosition(Map map)
Returns the label position attribute from the specified map. |
static int |
getLineBegin(Map map)
Returns the LINEBEGIN attribute from the specified map. |
static Color |
getLineColor(Map map)
Returns the linecolor attribute from the specified map. |
static int |
getLineEnd(Map map)
Returns the LINEEND attribute from the specified map. |
static int |
getLineStyle(Map map)
Returns the linestyle attribute from the specified map. |
static float |
getLineWidth(Map map)
Returns the linewidth attribute from the specified map. |
static String |
getLink(Map map)
Returns the link for the specified attribute map. |
static int |
getMoveableAxis(Map map)
Returns the moveableaxis attribute from the specified map. |
static Point2D |
getOffset(Map map)
Returns the offset attribute from the specified map. |
static List |
getPoints(Map map)
Returns the points attribute from the specified map. |
static Object[] |
getRemoveAttributes(Map map)
Returns the attribute marked as for removal in the specified map. |
static Edge.Routing |
getROUTING_DEFAULT()
|
static Edge.Routing |
getROUTING_SIMPLE()
|
static Edge.Routing |
getRouting(Map map)
Returns the routing attribute from the specified map. |
static Dimension |
getSize(Map map)
Returns the size attribute from the specified map. |
static int |
getSizeableAxis(Map map)
Returns the sizeableAxis attribute from the specified map. |
static Object |
getValue(Map map)
Returns the value attribute from the specified map. |
static int |
getVerticalAlignment(Map map)
Returns the verticalalignment attribute from the specified map. |
static int |
getVerticalTextPosition(Map map)
Returns the verticaltextposition attribute from the specified map. |
static boolean |
isAbsoluteX(Map map)
Returns the absolutex attribute from the specified map. |
static boolean |
isAbsoluteY(Map map)
Returns the absolutey attribute from the specified map. |
static boolean |
isAutoSize(Map map)
Returns the autosize attribute from the specified map. |
static boolean |
isBeginFill(Map map)
Returns the beginfill attribute from the specified map. |
static boolean |
isBendable(Map map)
Returns the bendable attribute from the specified map. |
static boolean |
isChildrenSelectable(Map map)
Returns the childrenselectable attribute from the specified map. |
static boolean |
isConnectable(Map map)
Returns the connectable attribute from the specified map. |
static boolean |
isConstrained(Map map)
Returns the constrained attribute from the specified map. |
static boolean |
isDisconnectable(Map map)
Returns the disconnectable attribute from the specified map. |
static boolean |
isEditable(Map map)
Returns the editable attribute from the specified map. |
static boolean |
isEndFill(Map map)
Returns the endfill attribute from the specified map. |
static boolean |
isExactSegmentLabel(Map map)
Returns whether the exact segment is worked out for placement of labels along edges for the specified cell. |
static boolean |
isGroupOpaque(Map map)
Returns the opaque attribute from the specified map. |
static boolean |
isLabelAlongEdge(Map map)
Returns the true if the label should be painted along the edge. |
static boolean |
isLabelEnabled(Map map)
Returns whether the label is enabled for the specified cell. |
static boolean |
isMoveable(Map map)
Returns the moveable attribute from the specified map. |
static boolean |
isOpaque(Map map)
Returns the opaque attribute from the specified map. |
static boolean |
isRemoveAll(Map map)
Returns the removeall attribute from the specified map. |
static boolean |
isResize(Map map)
Returns the resize attribute from the specified map. |
static boolean |
isSelectable(Map map)
Returns the selectable attribute from the specified map. |
static boolean |
isSizeable(Map map)
Returns the sizeable attribute from the specified map. |
static Map |
merge(Map change,
Map target)
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. |
static Map |
replaceKeys(Map keyMap,
Map map)
Replace the keys in map using keyMap
|
static void |
setAbsolute(Map map,
boolean flag)
Sets the absolute attributes in the specified map to the specified value. |
static void |
setAbsoluteX(Map map,
boolean flag)
Sets the absolutex attribute in the specified map to the specified value. |
static void |
setAbsoluteY(Map map,
boolean flag)
Sets the absolutey attribute in the specified map to the specified value. |
static void |
setAutoSize(Map map,
boolean flag)
Sets the autosize attribute in the specified map to the specified value. |
static void |
setBackground(Map map,
Color value)
Sets the background attribute in the specified map to the specified value. |
static void |
setBeginFill(Map map,
boolean flag)
Sets the beginfill attribute in the specified map to the specified value. |
static void |
setBeginSize(Map map,
int style)
Sets the beginsize attribute in the specified map to the specified value. |
static void |
setBendable(Map map,
boolean flag)
Sets the bendable attribute in the specified map to the specified value. |
static void |
setBorder(Map map,
Border value)
Sets the border attribute in the specified map to the specified value. |
static void |
setBorderColor(Map map,
Color value)
Sets the bordercolor attribute in the specified map to the specified value. |
static void |
setBounds(Map map,
Rectangle2D bounds)
Sets the bounds attribute in the specified map to the specified value. |
static void |
setChildrenSelectable(Map map,
boolean flag)
Sets the childrenselectable attribute in the specified map to the specified value. |
static void |
setConnectable(Map map,
boolean flag)
Sets the connectable attribute in the specified map to the specified value. |
static void |
setConstrained(Map map,
boolean flag)
Sets the constrained attribute in the specified map to the specified value. |
static void |
setDashOffset(Map map,
float value)
Sets the dashoffset attribute in the specified map to the specified value. |
static void |
setDashPattern(Map map,
float[] value)
Sets the dashpattern attribute in the specified map to the specified value. |
static void |
setDisconnectable(Map map,
boolean flag)
Sets the disconnectable attribute in the specified map to the specified value. |
static void |
setEditable(Map map,
boolean flag)
Sets the editable attribute in the specified map to the specified value. |
static void |
setEndFill(Map map,
boolean flag)
Sets the endfill attribute in the specified map to the specified value. |
static void |
setEndSize(Map map,
int style)
Sets the endsize attribute in the specified map to the specified value. |
static void |
setExactSegmentLabel(Map map,
boolean flag)
Sets the exact segment attribute in the specified map to the specified value. |
static void |
setExtraLabelPositions(Map map,
Point2D[] positions)
Sets the labelpositions attribute in the specified map to the specified value. |
static void |
setExtraLabels(Map map,
Object[] definitions)
Sets the array of additional labels. |
static void |
setFont(Map map,
Font font)
Sets the value attribute in the specified map to the specified font value. |
static void |
setForeground(Map map,
Color value)
Sets the foregrund attribute in the specified map to the specified value. |
static void |
setGradientColor(Map map,
Color value)
Sets the gradientcolor attribute in the specified map to the specified value. |
static void |
setGroupOpaque(Map map,
boolean flag)
Sets the opaque attribute in the specified map to the specified value. |
static void |
setHorizontalAlignment(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 void |
setHorizontalTextPosition(Map map,
int textPosition)
This method set the text of a label on vertext cell relative to image. |
static void |
setIcon(Map map,
Icon value)
Sets the icon attribute in the specified map to the specified value. |
static void |
setInset(Map map,
int width)
Sets the inset attribute in the specified map to the specified value. |
static void |
setLabelAlongEdge(Map map,
boolean flag)
Sets if the label should be painted along the edge. |
static void |
setLabelEnabled(Map map,
boolean flag)
Sets the label enabled attribute in the specified map to the specified value. |
static void |
setLabelPosition(Map map,
Point2D position)
Sets the label position attribute in the specified map to the specified value. |
static void |
setLineBegin(Map map,
int style)
Sets the LINEBEGIN attribute in the specified map to the specified value. |
static void |
setLineColor(Map map,
Color value)
Sets the linecolor attribute in the specified map to the specified value. |
static void |
setLineEnd(Map map,
int style)
Sets the LINEEND attribute in the specified map to the specified value. |
static void |
setLineStyle(Map map,
int style)
Sets the linestyle attribute in the specified map to the specified value. |
static void |
setLineWidth(Map map,
float width)
Sets the linewidth attribute in the specified map to the specified value. |
static void |
setLink(Map map,
String link)
Sets the link attribute in the specified map to the specified value. |
static void |
setMoveable(Map map,
boolean flag)
Sets the moveable attribute in the specified map to the specified value. |
static void |
setMoveableAxis(Map map,
int axis)
Sets the moveableaxis attribute in the specified map to the specified value. |
static void |
setOffset(Map map,
Point2D offset)
Sets the offset attribute in the specified map to the specified value. |
static void |
setOpaque(Map map,
boolean flag)
Sets the opaque attribute in the specified map to the specified value. |
static void |
setPoints(Map map,
List list)
Sets the points attribute in the specified map to the specified value. |
static void |
setRemoveAll(Map map,
boolean flag)
Sets the removeall attribute in the specified map to the specified value. |
static void |
setRemoveAttributes(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 removed |
static void |
setResize(Map map,
boolean flag)
Sets the resize attribute in the specified map to the specified value. |
static void |
setRouting(Map map,
Edge.Routing routing)
Sets the routing attribute in the specified map to the specified value. |
static void |
setSelectable(Map map,
boolean flag)
Sets the selectable attribute in the specified map to the specified value. |
static void |
setSize(Map map,
Dimension size)
Sets the size attribute in the specified map to the specified value. |
static void |
setSizeable(Map map,
boolean flag)
Sets the sizeable attribute in the specified map to the specified value. |
static void |
setSizeableAxis(Map map,
int axis)
Sets the sizeableAxis attribute in the specified map to the specified value. |
static void |
setValue(Map map,
Object value)
Sets the value attribute in the specified map to the specified value. |
static void |
setVerticalAlignment(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 void |
setVerticalTextPosition(Map map,
int textPosition)
This method set the text of a label on vertext cell relative to image. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static Font DEFAULTFONT
public static int DEFAULTDECORATIONSIZE
public static int DEFAULTINSET
public static final int PERMILLE
protected static float[] dash
public static Stroke SELECTION_STROKE
public static final int ARROW_NONE
setLineBegin(Map, int)
,
getLineBegin(Map)
,
setLineEnd(Map, int)
,
getLineEnd(Map)
,
Constant Field Valuespublic static final int ARROW_CLASSIC
setLineBegin(Map,int)
,
getLineBegin(Map)
,
setLineEnd(Map, int)
,
getLineEnd(Map)
,
Constant Field Valuespublic static final int ARROW_TECHNICAL
setLineBegin(Map, int)
,
getLineBegin(Map)
,
setLineEnd(Map, int)
,
getLineEnd(Map)
,
Constant Field Valuespublic static final int ARROW_SIMPLE
setLineBegin(Map,int)
,
getLineBegin(Map)
,
setLineEnd(Map, int)
,
getLineEnd(Map)
,
Constant Field Valuespublic static final int ARROW_CIRCLE
setLineBegin(Map, int)
,
getLineBegin(Map)
,
setLineEnd(Map, int)
,
getLineEnd(Map)
,
Constant Field Valuespublic static final int ARROW_LINE
setLineBegin(Map, int)
,
getLineBegin(Map)
,
setLineEnd(Map, int)
,
getLineEnd(Map)
,
Constant Field Valuespublic static final int ARROW_DOUBLELINE
setLineBegin(Map, int)
,
getLineBegin(Map)
,
setLineEnd(Map, int)
,
getLineEnd(Map)
,
Constant Field Valuespublic static final int ARROW_DIAMOND
setLineBegin(Map, int)
,
getLineBegin(Map)
,
setLineEnd(Map, int)
,
getLineEnd(Map)
,
Constant Field Valuespublic static final int STYLE_ORTHOGONAL
public static final int STYLE_BEZIER
public static final int STYLE_SPLINE
public static final int X_AXIS
public static final int Y_AXIS
public static Edge.Routing ROUTING_DEFAULT
getRouting(Map)
if there is no routing assigned.
public static final Edge.Routing ROUTING_SIMPLE
public static final String SIZEABLEAXIS
sizeableAxis
attribute. This attribute
contains an Integer value representing which axis of a cell may be
resized/scaled Constants defined in this class.
public static final String MOVEABLEAXIS
moveableAxis
attribute. This attribute
contains an Integer value indicating along which axis a cell may be
moved. Constants defined in this class.
public static final String REPLACEATTRIBUTES
replaceAttributes
attribute. This special
attribute contains a Boolean instance indicating whether a map of
attributes should replace the attributes of the receiving view.
public static final String REMOVEATTRIBUTES
removeAttributes
attribute. This special
attribute contains a list of attribute-keys which should be removed at
the receiving views.
public static final String REMOVEALL
removeAll
attribute. This causes the receivers
attributes to be replaced by the the map that contains this attribute.
public static final String ICON
icon
attribute. Use instances of Icon as
values for this key.
public static final String FONT
font
attribute. Use instances of Font as
values for this key.
public static final String OPAQUE
opaque
attribute. Use instances of Boolean as
values for this key.
public static final String GROUPOPAQUE
groupOpaque
attribute. Use instances of
Boolean as values for this key.
public static final String BORDER
border
attribute. Use instances of Border as
values for this key. Optionally, you can set the global instance of
LineBorder.
public static final String LINECOLOR
linecolor
attribute. Use instances of Color as
values for this key.
public static final String BORDERCOLOR
bordercolor
attribute. Use instances of Color
as values for this key.
public static final String LINEWIDTH
linewidth
attribute. Use instances of Float as
values for this key.
public static final String FOREGROUND
foreground
attribute. Use instances of Color
as values for this key.
public static final String BACKGROUND
background
attribute. Use instances of Color
as values for this key.
public static final String GRADIENTCOLOR
gradient
attribute. Use instances of Color as
values for this key.
public static final String VERTICAL_ALIGNMENT
verticalAlignment
attribute. 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
public static final String HORIZONTAL_ALIGNMENT
horizontalAlignment
attribute. 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
public static final String VERTICAL_TEXT_POSITION
verticalTextPosition
attribute. 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.
public static final String HORIZONTAL_TEXT_POSITION
horizontalTextPosition
attribute. 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.
public static final String DASHPATTERN
dashPattern
attribute. Use instances of
float[] as values for this key.
public static final String DASHOFFSET
dashOffset
attribute. Use instances of float
as values for this key.
public static final String LINESTYLE
lineStyle
attribute. Use instances of Integer
as values for this key. Constants defined in this class.
public static final String LINEBEGIN
lineBegin
attribute. Use instances of Integer
as values for this key. Constants defined in this class.
public static final String LINEEND
lineEnd
attribute. Use instances of Integer as
values for this key. Constants defined in this class.
public static final String BEGINSIZE
beginSize
attribute. Use instances of Integer
as values for this key.
public static final String ENDSIZE
endSize
attribute. Use instances of Integer as
values for this key.
public static final String BEGINFILL
beginFill
attribute. Use instances of Integer
as values for this key.
public static final String ENDFILL
endFill
attribute. Use instances of Integer as
values for this key.
public static final String VALUE
value
attribute. You can use any Object as a
value for this key.
public static final String EDITABLE
editable
attribute. Use instances of Boolean
as values for this key.
public static final String MOVEABLE
moveable
attribute. Use instances of Boolean
as values for this key.
public static final String SIZEABLE
sizeable
attribute. Use instances of Boolean
as values for this key.
public static final String AUTOSIZE
autosize
attribute. Use instances of Boolean
as values for this key.
public static final String RESIZE
resize
attribute. Use instances of Boolean as
values for this key.
public static final String INSET
inset
attribute. Use instances of Integer as
values for this key.
public static final String CONSTRAINED
constrained
attribute. Use instances of
Boolean as values for this key.
public static final String SELECTABLE
selectable
attribute. Use instances of Boolean
as values for this key.
public static final String CHILDRENSELECTABLE
childrenSelectable
attribute. Use instances of
Boolean as values for this key.
public static final String MOVEHIDDENCHILDREN
childrenSelectable
attribute. Use instances of
Boolean as values for this key.
public static final String BENDABLE
bendable
attribute. Use instances of Boolean
as values for this key.
public static final String CONNECTABLE
connectable
attribute. Use instances of
Boolean as values for this key.
public static final String DISCONNECTABLE
disconnectable
attribute. Use instances of
Boolean as values for this key.
public static final String BOUNDS
bounds
attribute. Use instances of Rectangle
as values for this key.
public static final String POINTS
points
attribute. Use instances of List as
values for this key. The list should contain Point instances.
public static final String ROUTING
routing
attribute. Use instances of
EdgeView.EdgeRouter as values for this key.
public static final String LABELPOSITION
labelposition
attribute. 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.
public static final String EXTRALABELS
extraLabels
attribute. Use arrays of Objects
as values for this key, where the toString() methods of the objects
provide the label text value.
public static final String EXTRALABELPOSITIONS
extraLabelPositions
attribute. Use arrays of
Points as values for this key.
public static final String LABELALONGEDGE
labelAlongEdge
attribute. Use instances of
Boolean as values for this key.
public static final String ABSOLUTEX
absoluteX
attribute. Use instances of Boolean
as values for this key.
public static final String ABSOLUTEY
absoluteY
attribute. Use instances of Boolean
as values for this key.
public static final String OFFSET
offset
attribute. Use instances of Point as
values for this key.
public static final String SIZE
size
attribute. Use instances of Dimension as
values for this key.
public static final String LINK
link
attribute. Use instances of String as
values for this key.
public static final String LABELENABLED
labelEnabled
attribute. Use instances of Boolean as
values for this key.
public static final String EXACTSEGMENTRELATIVE
labelEnabled
attribute. Use instances of Boolean as
values for this key.
Constructor Detail |
public GraphConstants()
Method Detail |
public static Map createAttributes(Object cell, Object key, Object value)
public static Map createAttributes(Object[] cells, Object key, Object value)
public static Map createAttributes(Object[] cells, Object[] keys, Object[] values)
keys
and values
parameters must
match in size.
public static Map createAttributes(Object[] elements, CellMapper cm)
elements
may be instances of CellView
, 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, the element
is
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.
public static Map createAttributesFromModel(Object[] elements, GraphModel model)
public static Map replaceKeys(Map keyMap, Map map)
map
using keyMap
map must itself
be a map, and is cloned using cloneMap
.
public static Map merge(Map change, Map target)
change
and adds
entries to target
in-place!
public static void setFont(Map map, Font font)
map
- The map to store the font attribute in.font
- The value to set the font attribute to.public static Font getFont(Map map)
public static final void setRemoveAttributes(Map map, Object[] value)
public static final Object[] getRemoveAttributes(Map map)
public static final void setMoveableAxis(Map map, int axis)
public static final int getMoveableAxis(Map map)
public static final void setSizeableAxis(Map map, int axis)
public static final int getSizeableAxis(Map map)
public static final void setIcon(Map map, Icon value)
public static final Icon getIcon(Map map)
public static final void setOpaque(Map map, boolean flag)
public static final boolean isOpaque(Map map)
public static final void setGroupOpaque(Map map, boolean flag)
public static final boolean isGroupOpaque(Map map)
public static final void setBorder(Map map, Border value)
public static final Border getBorder(Map map)
public static final void setLineColor(Map map, Color value)
public static final Color getLineColor(Map map)
public static final void setBorderColor(Map map, Color value)
public static final Color getBorderColor(Map map)
public static final void setLineWidth(Map map, float width)
public static final float getLineWidth(Map map)
public static final void setForeground(Map map, Color value)
public static final Color getForeground(Map map)
public static final void setBackground(Map map, Color value)
public static final Color getBackground(Map map)
public static final void setGradientColor(Map map, Color value)
public static final Color getGradientColor(Map map)
public static final void setVerticalAlignment(Map map, int alignment)
public static final int getVerticalAlignment(Map map)
public static final void setHorizontalAlignment(Map map, int alignment)
public static final int getHorizontalAlignment(Map map)
public static final void setVerticalTextPosition(Map map, int textPosition)
public static final int getVerticalTextPosition(Map map)
public static final void setHorizontalTextPosition(Map map, int textPosition)
public static final int getHorizontalTextPosition(Map map)
public static final void setDashPattern(Map map, float[] value)
public static final float[] getDashPattern(Map map)
public static final void setDashOffset(Map map, float value)
public static final float getDashOffset(Map map)
public static final void setLineStyle(Map map, int style)
public static final int getLineStyle(Map map)
public static final void setBeginSize(Map map, int style)
public static final int getBeginSize(Map map)
public static final void setEndSize(Map map, int style)
public static final int getEndSize(Map map)
public static final void setLineBegin(Map map, int style)
ARROW_NONE
,
ARROW_CLASSIC
,
ARROW_TECHNICAL
,
ARROW_SIMPLE
,
ARROW_CIRCLE
,
ARROW_LINE
,
ARROW_DOUBLELINE
,
ARROW_DIAMOND
public static final int getLineBegin(Map map)
ARROW_NONE
,
ARROW_CLASSIC
,
ARROW_TECHNICAL
,
ARROW_SIMPLE
,
ARROW_CIRCLE
,
ARROW_LINE
,
ARROW_DOUBLELINE
,
ARROW_DIAMOND
public static final void setLineEnd(Map map, int style)
ARROW_NONE
,
ARROW_CLASSIC
,
ARROW_TECHNICAL
,
ARROW_SIMPLE
,
ARROW_CIRCLE
,
ARROW_LINE
,
ARROW_DOUBLELINE
,
ARROW_DIAMOND
public static final int getLineEnd(Map map)
ARROW_NONE
,
ARROW_CLASSIC
,
ARROW_TECHNICAL
,
ARROW_SIMPLE
,
ARROW_CIRCLE
,
ARROW_LINE
,
ARROW_DOUBLELINE
,
ARROW_DIAMOND
public static final void setValue(Map map, Object value)
public static final Object getValue(Map map)
GraphModel.getValue(Object)
public static final void setLabelPosition(Map map, Point2D position)
public static final Point2D getLabelPosition(Map map)
public static final void setExtraLabels(Map map, Object[] definitions)
public static final Object[] getExtraLabels(Map map)
public static final void setExtraLabelPositions(Map map, Point2D[] positions)
getLabelPosition(Map)
public static final Point2D[] getExtraLabelPositions(Map map)
public static final void setLabelAlongEdge(Map map, boolean flag)
public static final boolean isLabelAlongEdge(Map map)
public static final void setEditable(Map map, boolean flag)
public static final boolean isEditable(Map map)
public static final void setMoveable(Map map, boolean flag)
public static final boolean isMoveable(Map map)
public static final void setSizeable(Map map, boolean flag)
public static final boolean isSizeable(Map map)
public static final void setAutoSize(Map map, boolean flag)
public static final boolean isAutoSize(Map map)
public static final void setResize(Map map, boolean flag)
public static final boolean isResize(Map map)
public static final void setConstrained(Map map, boolean flag)
public static final boolean isConstrained(Map map)
public static final void setSelectable(Map map, boolean flag)
public static final boolean isSelectable(Map map)
setSelectable(Map, boolean)
public static final void setChildrenSelectable(Map map, boolean flag)
public static final boolean isChildrenSelectable(Map map)
public static final void setBendable(Map map, boolean flag)
public static final boolean isBendable(Map map)
public static final void setConnectable(Map map, boolean flag)
public static final boolean isConnectable(Map map)
public static final void setDisconnectable(Map map, boolean flag)
public static final boolean isDisconnectable(Map map)
public static final void setPoints(Map map, List list)
public static final List getPoints(Map map)
setPoints(Map, java.util.List)
public static final void setRouting(Map map, Edge.Routing routing)
public static final Edge.Routing getRouting(Map map)
public static final void setBounds(Map map, Rectangle2D bounds)
public static final Rectangle2D getBounds(Map map)
public static final void setInset(Map map, int width)
public static final int getInset(Map map)
public static final void setSize(Map map, Dimension size)
public static final Dimension getSize(Map map)
public static final void setOffset(Map map, Point2D offset)
public static final Point2D getOffset(Map map)
public static final void setBeginFill(Map map, boolean flag)
public static final boolean isBeginFill(Map map)
public static final void setEndFill(Map map, boolean flag)
public static final boolean isEndFill(Map map)
public static final void setAbsolute(Map map, boolean flag)
public static final void setAbsoluteY(Map map, boolean flag)
public static final boolean isAbsoluteY(Map map)
public static final void setAbsoluteX(Map map, boolean flag)
public static final boolean isAbsoluteX(Map map)
public static final void setRemoveAll(Map map, boolean flag)
public static final boolean isRemoveAll(Map map)
public static Edge.Routing getROUTING_SIMPLE()
public static Edge.Routing getROUTING_DEFAULT()
public static void setLink(Map map, String link)
map
- The map to store the link attribute in.link
- The value to set the link attribute to.public static String getLink(Map map)
public static void setLabelEnabled(Map map, boolean flag)
map
- The map to store the label enabled attribute in.flag
- The value to set the label enabled attribute to.public static boolean isLabelEnabled(Map map)
map
- the attribute map for the cell being tested for this
condition.
public static void setExactSegmentLabel(Map map, boolean flag)
map
- The map to store the exact segment attribute in.flag
- The value to set the exact segment attribute to.public static boolean isExactSegmentLabel(Map map)
map
- the attribute map for the cell being tested for this
condition.
|
JGraph |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |