Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| JGraph v5.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jgraph.graph
Class GraphConstants

    java.lang.Object
      |
      +--org.jgraph.graph.GraphConstants

public class GraphConstants
extends Object

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` | `ABSOLUTE` Key for the `absolute` attribute.
`static int` | `ARROW_CIRCLE` Represents a circle decoration
`static int` | `ARROW_CLASSIC` Represents a classic arrow decoration
`static int` | `ARROW_DIAMOND` Represents a diamond decoration
`static int` | `ARROW_DOUBLELINE` Represents a double line decoration
`static int` | `ARROW_LINE` Represents a line decoration
`static int` | `ARROW_NONE` Represents no decoration
`static int` | `ARROW_SIMPLE` Represents a simple arrow decoration
`static int` | `ARROW_TECHNICAL` Represents a technical arrow decoration
`static String` | `AUTOSIZE` Key for the `sizeable` attribute.
`static String` | `BACKGROUND` Key for the `background` attribute.
`static String` | `BEGINFILL` Key for the `startsize` attribute.
`static String` | `BEGINSIZE` Key for the `startsize` attribute.
`static String` | `BENDABLE` Key for the `sizeable` 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` | `CONNECTABLE` Key for the `moveable` attribute.
`protected static float[]` | `dash` Global Stroke To Highlight Selection
`static String` | `DASHPATTERN` Key for the `dashPattern` attribute.
`static int` | `DEFAULTDECORATIONSIZE` Default decoration size.
`static Font` | `DEFAULTFONT`
`static String` | `DISCONNECTABLE` Key for the `moveable` attribute.
`static String` | `EDITABLE` Key for the `editable` attribute.
`static String` | `ENDFILL` Key for the `endsize` attribute.
`static String` | `ENDSIZE` Key for the `endsize` attribute.
`static String` | `FONT` Key for the `font` attribute.
`static String` | `FOREGROUND` Key for the `foreground` 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` | `LABELALONGEDGE` Key for the `labelalongedge` attribute.
`static String` | `LABELPOSITION` Key for the `labelposition` attribute.
`static String` | `LINEBEGIN` Key for the `start` attribute.
`static String` | `LINECOLOR` Key for the `linecolor` attribute.
`static String` | `LINEEND` Key for the `start` attribute.
`static String` | `LINESTYLE` Key for the `lineStyle` attribute.
`static String` | `LINEWIDTH` Key for the `linewidth` attribute.
`static String` | `MOVEABLE` Key for the `moveable` attribute.
`static String` | `MOVEABLEAXIS` Key for the `replaceAttributes` attribute.
`static String` | `OFFSET` Key for the `translate` 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` | `ROUTING` Key for the `routing` attribute.
`static Edge.Routing` | `ROUTING_SIMPLE` A simple default Routing.
`static Stroke` | `SELECTION_STROKE`
`static String` | `SIZE` Key for the `resize` attribute.
`static String` | `SIZEABLE` Key for the `sizeable` attribute.
`static String` | `SIZEABLEAXIS` Key for the `replaceAttributes` 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)`
`static Map` | `createAttributes(Object cell, Object key, Object value)`
`static Map` | `createAttributesFromModel(Object[] elements, GraphModel model)`
`static Color` | `getBackground(Map map)` Returns the value attribute from the specified map.
`static int` | `getBeginSize(Map map)` Returns the opaque attribute from the specified map.
`static Border` | `getBorder(Map map)` Returns the value attribute from the specified map.
`static Color` | `getBorderColor(Map map)` Returns the value attribute from the specified map.
`static Rectangle2D` | `getBounds(Map map)` Returns the bounds attribute from the specified map.
`static float[]` | `getDashPattern(Map map)` Returns the value attribute from the specified map.
`static int` | `getEndSize(Map map)` Returns the opaque attribute from the specified map.
`static Font` | `getFont(Map map)` Returns the font for the specified attribute map.
`static Color` | `getForeground(Map map)` Returns the value attribute from the specified map.
`static int` | `getHorizontalAlignment(Map map)` Returns the opaque attribute from the specified map.
`static int` | `getHorizontalTextPosition(Map map)` Returns the opaque attribute from the specified map.
`static Icon` | `getIcon(Map map)` Returns the value attribute from the specified map.
`static Point` | `getLabelPosition(Map map)` Returns the label position attribute from the specified map.
`static int` | `getLineBegin(Map map)` Returns the opaque attribute from the specified map.
`static Color` | `getLineColor(Map map)` Returns the value attribute from the specified map.
`static int` | `getLineEnd(Map map)` Returns the opaque attribute from the specified map.
`static int` | `getLineStyle(Map map)` Returns the opaque attribute from the specified map.
`static float` | `getLineWidth(Map map)` Returns the opaque attribute from the specified map.
`static int` | `getMoveableAxis(Map map)` Returns the value 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 value attribute from the specified map.
`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 value 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 opaque attribute from the specified map.
`static int` | `getVerticalTextPosition(Map map)` Returns the opaque attribute from the specified map.
`static boolean` | `isAbsolute(Map map)` Returns the offset 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 offset attribute from the specified map.
`static boolean` | `isBendable(Map map)` Returns the bendable attribute from the specified map.
`static boolean` | `isConnectable(Map map)` Returns the connectable 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 offset attribute from the specified map.
`static boolean` | `isLabelAlongEdge(Map map)` Returns the true if the label should be painted along the edge.
`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 offset attribute from the specified map.
`static boolean` | `isSizeable(Map map)` Returns the sizeable attribute from the specified map.
`static Map` | `replaceKeys(Map keyMap, Map map)` Replace the keys in `map` using `keyMap`
`static void` | `setAbsolute(Map map, boolean flag)` Sets the offset 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 value attribute in the specified map to the specified value.
`static void` | `setBeginFill(Map map, boolean flag)` Sets the offset attribute in the specified map to the specified value.
`static void` | `setBeginSize(Map map, int style)` Sets the opaque 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 value attribute in the specified map to the specified value.
`static void` | `setBorderColor(Map map, Color value)` Sets the value 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` | `setConnectable(Map map, boolean flag)` Sets the connectable attribute in the specified map to the specified value.
`static void` | `setDashPattern(Map map, float[] value)` Sets the value 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 offset attribute in the specified map to the specified value.
`static void` | `setEndSize(Map map, int style)` Sets the opaque attribute in the specified map to the specified value.
`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 value attribute in the specified map to the specified value.
`static void` | `setHorizontalAlignment(Map map, int width)` Sets the opaque attribute in the specified map to the specified value.
`static void` | `setHorizontalTextPosition(Map map, int width)` Sets the opaque attribute in the specified map to the specified value.
`static void` | `setIcon(Map map, Icon value)` Sets the value 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` | `setLabelPosition(Map map, Point position)` Sets the label position attribute in the specified map to the specified value.
`static void` | `setLineBegin(Map map, int style)` Sets the opaque attribute in the specified map to the specified value.
`static void` | `setLineColor(Map map, Color value)` Sets the value attribute in the specified map to the specified value.
`static void` | `setLineEnd(Map map, int style)` Sets the opaque attribute in the specified map to the specified value.
`static void` | `setLineStyle(Map map, int style)` Sets the opaque attribute in the specified map to the specified value.
`static void` | `setLineWidth(Map map, float width)` Sets the opaque 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 value 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 offset attribute in the specified map to the specified value.
`static void` | `setRemoveAttributes(Map map, Object[] value)` Sets the value 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` | `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 value 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 width)` Sets the opaque attribute in the specified map to the specified value.
`static void` | `setVerticalTextPosition(Map map, int width)` Sets the opaque attribute in the specified map to the specified value.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### DEFAULTFONT

    public static Font DEFAULTFONT

### DEFAULTDECORATIONSIZE

    public static final int DEFAULTDECORATIONSIZE

  Default decoration size.

  See Also:
    Constant Field Values

### PERMILLE

    public static final int PERMILLE

  100 percent unit for relative positioning. Current value is 1000.

  See Also:
    Constant Field Values

### dash

    protected static float[] dash

  Global Stroke To Highlight Selection

### SELECTION_STROKE

    public static Stroke SELECTION_STROKE

### ARROW_NONE

    public static final int ARROW_NONE

  Represents no decoration

  See Also:
    Constant Field Values

### ARROW_CLASSIC

    public static final int ARROW_CLASSIC

  Represents a classic arrow decoration

  See Also:
    Constant Field Values

### ARROW_TECHNICAL

    public static final int ARROW_TECHNICAL

  Represents a technical arrow decoration

  See Also:
    Constant Field Values

### ARROW_SIMPLE

    public static final int ARROW_SIMPLE

  Represents a simple arrow decoration

  See Also:
    Constant Field Values

### ARROW_CIRCLE

    public static final int ARROW_CIRCLE

  Represents a circle decoration

  See Also:
    Constant Field Values

### ARROW_LINE

    public static final int ARROW_LINE

  Represents a line decoration

  See Also:
    Constant Field Values

### ARROW_DOUBLELINE

    public static final int ARROW_DOUBLELINE

  Represents a double line decoration

  See Also:
    Constant Field Values

### ARROW_DIAMOND

    public static final int ARROW_DIAMOND

  Represents a diamond decoration

  See Also:
    Constant Field Values

### STYLE_ORTHOGONAL

    public static final int STYLE_ORTHOGONAL

  Represents an orthogonal line style

  See Also:
    Constant Field Values

### STYLE_BEZIER

    public static final int STYLE_BEZIER

  Represents a bezier line style

  See Also:
    Constant Field Values

### STYLE_SPLINE

    public static final int STYLE_SPLINE

  Represents an spline line style

  See Also:
    Constant Field Values

### X_AXIS

    public static final int X_AXIS

  Represents an bezier line style

  See Also:
    Constant Field Values

### Y_AXIS

    public static final int Y_AXIS

  Represents an bezier line style

  See Also:
    Constant Field Values

### ROUTING_SIMPLE

    public static final Edge.Routing ROUTING_SIMPLE

  A simple default Routing.

### SIZEABLEAXIS

    public static final String SIZEABLEAXIS

  Key for the `replaceAttributes` attribute. This special attribute contains a Boolean instance indicating whether a map of attributes should replace the attributes of the receiving view.

  See Also:
    Constant Field Values

### MOVEABLEAXIS

    public static final String MOVEABLEAXIS

  Key for the `replaceAttributes` attribute. This special attribute contains a Boolean instance indicating whether a map of attributes should replace the attributes of the receiving view.

  See Also:
    Constant Field Values

### REPLACEATTRIBUTES

    public static final String REPLACEATTRIBUTES

  Key for the `replaceAttributes` attribute. This special attribute contains a Boolean instance indicating whether a map of attributes should replace the attributes of the receiving view.

  See Also:
    Constant Field Values

### REMOVEATTRIBUTES

    public static final String REMOVEATTRIBUTES

  Key for the `removeAttributes` attribute. This special attribute contains a list of attribute-keys which should be removed at the receiving views.

  See Also:
    Constant Field Values

### REMOVEALL

    public static final String REMOVEALL

  Key for the `removeAll` attribute. This causes the receivers attributes to be replaced by the the map that contains this attribute.

  See Also:
    Constant Field Values

### ICON

    public static final String ICON

  Key for the `icon` attribute. Use instances of Icon as values for this key.

  See Also:
    Constant Field Values

### FONT

    public static final String FONT

  Key for the `font` attribute. Use instances of Font as values for this key.

  See Also:
    Constant Field Values

### OPAQUE

    public static final String OPAQUE

  Key for the `opaque` attribute. Use instances of Boolean as values for this key.

  See Also:
    Constant Field Values

### BORDER

    public static final String BORDER

  Key for the `border` attribute. Use instances of Border as values for this key. Optionally, you can set the global instance of LineBorder.

  See Also:
    Constant Field Values

### LINECOLOR

    public static final String LINECOLOR

  Key for the `linecolor` attribute. Use instances of Color as values for this key.

  See Also:
    Constant Field Values

### BORDERCOLOR

    public static final String BORDERCOLOR

  Key for the `bordercolor` attribute. Use instances of Color as values for this key.

  See Also:
    Constant Field Values

### LINEWIDTH

    public static final String LINEWIDTH

  Key for the `linewidth` attribute. Use instances of Float as values for this key.

  See Also:
    Constant Field Values

### FOREGROUND

    public static final String FOREGROUND

  Key for the `foreground` attribute. Use instances of Color as values for this key.

  See Also:
    Constant Field Values

### BACKGROUND

    public static final String BACKGROUND

  Key for the `background` attribute. Use instances of Color as values for this key.

  See Also:
    Constant Field Values

### VERTICAL_ALIGNMENT

    public static final String VERTICAL_ALIGNMENT

  Key for the `verticalAlignment` attribute. Use instances of Integer as values for this key. Constants defined in JLabel class.

  See Also:
    Constant Field Values

### HORIZONTAL_ALIGNMENT

    public static final String HORIZONTAL_ALIGNMENT

  Key for the `horizontalAlignment` attribute. Use instances of Integer as values for this key. Constants defined in JLabel class.

  See Also:
    Constant Field Values

### VERTICAL_TEXT_POSITION

    public static final String VERTICAL_TEXT_POSITION

  Key for the `verticalTextPosition` attribute. Use instances of Integer as values for this key. Constants defined in JLabel class.

  See Also:
    Constant Field Values

### HORIZONTAL_TEXT_POSITION

    public static final String HORIZONTAL_TEXT_POSITION

  Key for the `horizontalTextPosition` attribute. Use instances of Integer as values for this key. Constants defined in JLabel class.

  See Also:
    Constant Field Values

### DASHPATTERN

    public static final String DASHPATTERN

  Key for the `dashPattern` attribute. Use instances of float[] as values for this key.

  See Also:
    Constant Field Values

### LINESTYLE

    public static final String LINESTYLE

  Key for the `lineStyle` attribute. Use instances of Integer as values for this key. Constants defined in this class.

  See Also:
    Constant Field Values

### LINEBEGIN

    public static final String LINEBEGIN

  Key for the `start` attribute. Use instances of Integer as values for this key. Constants defined in this class.

  See Also:
    Constant Field Values

### LINEEND

    public static final String LINEEND

  Key for the `start` attribute. Use instances of Integer as values for this key. Constants defined in this class.

  See Also:
    Constant Field Values

### BEGINSIZE

    public static final String BEGINSIZE

  Key for the `startsize` attribute. Use instances of Integer as values for this key.

  See Also:
    Constant Field Values

### ENDSIZE

    public static final String ENDSIZE

  Key for the `endsize` attribute. Use instances of Integer as values for this key.

  See Also:
    Constant Field Values

### BEGINFILL

    public static final String BEGINFILL

  Key for the `startsize` attribute. Use instances of Integer as values for this key.

  See Also:
    Constant Field Values

### ENDFILL

    public static final String ENDFILL

  Key for the `endsize` attribute. Use instances of Integer as values for this key.

  See Also:
    Constant Field Values

### VALUE

    public static final String VALUE

  Key for the `value` attribute. You can use any Object as a value for this key.

  See Also:
    Constant Field Values

### EDITABLE

    public static final String EDITABLE

  Key for the `editable` attribute. Use instances of Boolean as values for this key.

  See Also:
    Constant Field Values

### MOVEABLE

    public static final String MOVEABLE

  Key for the `moveable` attribute. Use instances of Boolean as values for this key.

  See Also:
    Constant Field Values

### SIZEABLE

    public static final String SIZEABLE

  Key for the `sizeable` attribute. Use instances of Boolean as values for this key.

  See Also:
    Constant Field Values

### AUTOSIZE

    public static final String AUTOSIZE

  Key for the `sizeable` attribute. Use instances of Boolean as values for this key.

  See Also:
    Constant Field Values

### BENDABLE

    public static final String BENDABLE

  Key for the `sizeable` attribute. Use instances of Boolean as values for this key.

  See Also:
    Constant Field Values

### CONNECTABLE

    public static final String CONNECTABLE

  Key for the `moveable` attribute. Use instances of Boolean as values for this key.

  See Also:
    Constant Field Values

### DISCONNECTABLE

    public static final String DISCONNECTABLE

  Key for the `moveable` attribute. Use instances of Boolean as values for this key.

  See Also:
    Constant Field Values

### BOUNDS

    public static final String BOUNDS

  Key for the `bounds` attribute. Use instances of Rectangle as values for this key.

  See Also:
    Constant Field Values

### POINTS

    public static final String POINTS

  Key for the `points` attribute. Use instances of List as values for this key. The list should contain Point instances.

  See Also:
    Constant Field Values

### ROUTING

    public static final String ROUTING

  Key for the `routing` attribute. Use instances of EdgeView.EdgeRouter as values for this key. The list should contain Point instances.

  See Also:
    Constant Field Values

### LABELPOSITION

    public static final String LABELPOSITION

  Key for the `labelposition` attribute. Use instances of Point as values for this key.

  See Also:
    Constant Field Values

### LABELALONGEDGE

    public static final String LABELALONGEDGE

  Key for the `labelalongedge` attribute. Use instances of Boolean as values for this key.

  See Also:
    Constant Field Values

### ABSOLUTE

    public static final String ABSOLUTE

  Key for the `absolute` attribute. Use instances of Boolean as values for this key.

  See Also:
    Constant Field Values

### OFFSET

    public static final String OFFSET

  Key for the `translate` attribute. Use instances of Point as values for this key.

  See Also:
    Constant Field Values

### SIZE

    public static final String SIZE

  Key for the `resize` attribute. Use instances of Dimension as values for this key.

  See Also:
    Constant Field Values

Constructor Detail

### GraphConstants

    public GraphConstants()

Method Detail

### createAttributes

    public static Map createAttributes(Object cell,
                                       Object key,
                                       Object value)

### createAttributes

    public static Map createAttributes(Object[] cells,
                                       Object key,
                                       Object value)

### createAttributes

    public static Map createAttributes(Object[] cells,
                                       Object[] keys,
                                       Object[] values)

  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. The `keys` and `values` parameters must match in size.

### createAttributes

    public static Map createAttributes(Object[] elements,
                                       CellMapper cm)

  Returns a new map, from cells to property maps. The `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.

### createAttributesFromModel

    public static Map createAttributesFromModel(Object[] elements,
                                                GraphModel model)

### replaceKeys

    public static Map replaceKeys(Map keyMap,
                                  Map map)

  Replace the keys in `map` using `keyMapmap` must itself be a map, and is cloned using `cloneMap`.

### setFont

    public static void setFont(Map map,
                               Font font)

  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

    public static Font getFont(Map map)

  Returns the font for the specified attribute map. Uses default font if no font is specified in the attribute map.

### setRemoveAttributes

    public static final void setRemoveAttributes(Map map,
                                                 Object[] value)

  Sets the value attribute in the specified map to the specified value.

### getRemoveAttributes

    public static final Object[] getRemoveAttributes(Map map)

  Returns the value attribute from the specified map.

### setMoveableAxis

    public static final void setMoveableAxis(Map map,
                                             int axis)

  Sets the value attribute in the specified map to the specified value.

### getMoveableAxis

    public static final int getMoveableAxis(Map map)

  Returns the value attribute from the specified map.

### setSizeableAxis

    public static final void setSizeableAxis(Map map,
                                             int axis)

  Sets the value attribute in the specified map to the specified value.

### getSizeableAxis

    public static final int getSizeableAxis(Map map)

  Returns the value attribute from the specified map.

### setIcon

    public static final void setIcon(Map map,
                                     Icon value)

  Sets the value attribute in the specified map to the specified value.

### getIcon

    public static final Icon getIcon(Map map)

  Returns the value attribute from the specified map.

### setOpaque

    public static final void setOpaque(Map map,
                                       boolean flag)

  Sets the opaque attribute in the specified map to the specified value.

### isOpaque

    public static final boolean isOpaque(Map map)

  Returns the opaque attribute from the specified map.

### setBorder

    public static final void setBorder(Map map,
                                       Border value)

  Sets the value attribute in the specified map to the specified value.

### getBorder

    public static final Border getBorder(Map map)

  Returns the value attribute from the specified map.

### setLineColor

    public static final void setLineColor(Map map,
                                          Color value)

  Sets the value attribute in the specified map to the specified value.

### getLineColor

    public static final Color getLineColor(Map map)

  Returns the value attribute from the specified map.

### setBorderColor

    public static final void setBorderColor(Map map,
                                            Color value)

  Sets the value attribute in the specified map to the specified value.

### getBorderColor

    public static final Color getBorderColor(Map map)

  Returns the value attribute from the specified map.

### setLineWidth

    public static final void setLineWidth(Map map,
                                          float width)

  Sets the opaque attribute in the specified map to the specified value.

### getLineWidth

    public static final float getLineWidth(Map map)

  Returns the opaque attribute from the specified map.

### setForeground

    public static final void setForeground(Map map,
                                           Color value)

  Sets the value attribute in the specified map to the specified value.

### getForeground

    public static final Color getForeground(Map map)

  Returns the value attribute from the specified map.

### setBackground

    public static final void setBackground(Map map,
                                           Color value)

  Sets the value attribute in the specified map to the specified value.

### getBackground

    public static final Color getBackground(Map map)

  Returns the value attribute from the specified map.

### setVerticalAlignment

    public static final void setVerticalAlignment(Map map,
                                                  int width)

  Sets the opaque attribute in the specified map to the specified value.

### getVerticalAlignment

    public static final int getVerticalAlignment(Map map)

  Returns the opaque attribute from the specified map.

### setHorizontalAlignment

    public static final void setHorizontalAlignment(Map map,
                                                    int width)

  Sets the opaque attribute in the specified map to the specified value.

### getHorizontalAlignment

    public static final int getHorizontalAlignment(Map map)

  Returns the opaque attribute from the specified map.

### setVerticalTextPosition

    public static final void setVerticalTextPosition(Map map,
                                                     int width)

  Sets the opaque attribute in the specified map to the specified value.

### getVerticalTextPosition

    public static final int getVerticalTextPosition(Map map)

  Returns the opaque attribute from the specified map.

### setHorizontalTextPosition

    public static final void setHorizontalTextPosition(Map map,
                                                       int width)

  Sets the opaque attribute in the specified map to the specified value.

### getHorizontalTextPosition

    public static final int getHorizontalTextPosition(Map map)

  Returns the opaque attribute from the specified map.

### setDashPattern

    public static final void setDashPattern(Map map,
                                            float[] value)

  Sets the value attribute in the specified map to the specified value.

### getDashPattern

    public static final float[] getDashPattern(Map map)

  Returns the value attribute from the specified map.

### setLineStyle

    public static final void setLineStyle(Map map,
                                          int style)

  Sets the opaque attribute in the specified map to the specified value.

### getLineStyle

    public static final int getLineStyle(Map map)

  Returns the opaque attribute from the specified map.

### setBeginSize

    public static final void setBeginSize(Map map,
                                          int style)

  Sets the opaque attribute in the specified map to the specified value.

### getBeginSize

    public static final int getBeginSize(Map map)

  Returns the opaque attribute from the specified map.

### setEndSize

    public static final void setEndSize(Map map,
                                        int style)

  Sets the opaque attribute in the specified map to the specified value.

### getEndSize

    public static final int getEndSize(Map map)

  Returns the opaque attribute from the specified map.

### setLineBegin

    public static final void setLineBegin(Map map,
                                          int style)

  Sets the opaque attribute in the specified map to the specified value.

### getLineBegin

    public static final int getLineBegin(Map map)

  Returns the opaque attribute from the specified map.

### setLineEnd

    public static final void setLineEnd(Map map,
                                        int style)

  Sets the opaque attribute in the specified map to the specified value.

### getLineEnd

    public static final int getLineEnd(Map map)

  Returns the opaque attribute from the specified map.

### setValue

    public static final void setValue(Map map,
                                      Object value)

  Sets the value attribute in the specified map to the specified value.

### getValue

    public static final Object getValue(Map map)

  Returns the value attribute from the specified map.

### setLabelPosition

    public static final void setLabelPosition(Map map,
                                              Point position)

  Sets the label position attribute in the specified map to the specified value.

### getLabelPosition

    public static final Point getLabelPosition(Map map)

  Returns the label position attribute from the specified map.

### setLabelAlongEdge

    public static final void setLabelAlongEdge(Map map,
                                               boolean flag)

  Sets if the label should be painted along the edge.

### isLabelAlongEdge

    public static final boolean isLabelAlongEdge(Map map)

  Returns the true if the label should be painted along the edge. Defaults to false.

### setEditable

    public static final void setEditable(Map map,
                                         boolean flag)

  Sets the editable attribute in the specified map to the specified value.

### isEditable

    public static final boolean isEditable(Map map)

  Returns the editable attribute from the specified map.

### setMoveable

    public static final void setMoveable(Map map,
                                         boolean flag)

  Sets the moveable attribute in the specified map to the specified value.

### isMoveable

    public static final boolean isMoveable(Map map)

  Returns the moveable attribute from the specified map.

### setSizeable

    public static final void setSizeable(Map map,
                                         boolean flag)

  Sets the sizeable attribute in the specified map to the specified value.

### isSizeable

    public static final boolean isSizeable(Map map)

  Returns the sizeable attribute from the specified map.

### setAutoSize

    public static final void setAutoSize(Map map,
                                         boolean flag)

  Sets the autosize attribute in the specified map to the specified value.

### isAutoSize

    public static final boolean isAutoSize(Map map)

  Returns the autosize attribute from the specified map.

### setBendable

    public static final void setBendable(Map map,
                                         boolean flag)

  Sets the bendable attribute in the specified map to the specified value.

### isBendable

    public static final boolean isBendable(Map map)

  Returns the bendable attribute from the specified map.

### setConnectable

    public static final void setConnectable(Map map,
                                            boolean flag)

  Sets the connectable attribute in the specified map to the specified value.

### isConnectable

    public static final boolean isConnectable(Map map)

  Returns the connectable attribute from the specified map.

### setDisconnectable

    public static final void setDisconnectable(Map map,
                                               boolean flag)

  Sets the disconnectable attribute in the specified map to the specified value.

### isDisconnectable

    public static final boolean isDisconnectable(Map map)

  Returns the disconnectable attribute from the specified map.

### setPoints

    public static final void setPoints(Map map,
                                       List list)

  Sets the points attribute in the specified map to the specified value.

### getPoints

    public static final List getPoints(Map map)

  Returns the points attribute from the specified map.

### setRouting

    public static final void setRouting(Map map,
                                        Edge.Routing routing)

  Sets the routing attribute in the specified map to the specified value.

### getRouting

    public static final Edge.Routing getRouting(Map map)

  Returns the routing attribute from the specified map.

### setBounds

    public static final void setBounds(Map map,
                                       Rectangle2D bounds)

  Sets the bounds attribute in the specified map to the specified value.

### getBounds

    public static final Rectangle2D getBounds(Map map)

  Returns the bounds attribute from the specified map. Note: The CellView interface offers a getBounds method!

### setSize

    public static final void setSize(Map map,
                                     Dimension size)

  Sets the size attribute in the specified map to the specified value.

### getSize

    public static final Dimension getSize(Map map)

  Returns the size attribute from the specified map.

### setOffset

    public static final void setOffset(Map map,
                                       Point2D offset)

  Sets the offset attribute in the specified map to the specified value.

### getOffset

    public static final Point2D getOffset(Map map)

  Returns the offset attribute from the specified map.

### setBeginFill

    public static final void setBeginFill(Map map,
                                          boolean flag)

  Sets the offset attribute in the specified map to the specified value.

### isBeginFill

    public static final boolean isBeginFill(Map map)

  Returns the offset attribute from the specified map.

### setEndFill

    public static final void setEndFill(Map map,
                                        boolean flag)

  Sets the offset attribute in the specified map to the specified value.

### isEndFill

    public static final boolean isEndFill(Map map)

  Returns the offset attribute from the specified map.

### setAbsolute

    public static final void setAbsolute(Map map,
                                         boolean flag)

  Sets the offset attribute in the specified map to the specified value.

### isAbsolute

    public static final boolean isAbsolute(Map map)

  Returns the offset attribute from the specified map.

### setRemoveAll

    public static final void setRemoveAll(Map map,
                                          boolean flag)

  Sets the offset attribute in the specified map to the specified value.

### isRemoveAll

    public static final boolean isRemoveAll(Map map)

  Returns the offset attribute from the specified map.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| JGraph v5.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (C) 2003-2004 Gaudenz Alder. All rights reserved.