Package org.eclipse.gef.layout

# Class LayoutProperties

java.lang.Object
org.eclipse.gef.layout.LayoutProperties

public class LayoutProperties extends Object
`LayoutProperties` contains all properties which can be accessed on `Graph`, `Edge`, `Node`, their default values, as well as static accessor methods for those properties.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`ASPECT_RATIO_PROPERTY`
Stores the preferred aspect ratio (width / height) for this EntityLayout.
`static final String`
`BOUNDS_PROPERTY`
Stores the bounds in which the graph elements can be placed.
`static final Double`
`DEFAULT_ASPECT_RATIO`
Defines the default value for the `ASPECT_RATIO_PROPERTY`.
`static final Integer`
`DEFAULT_DIRECTION`
Defines the default value for the `DIRECTION_PROPERTY`.
`static final Boolean`
`DEFAULT_MOVABLE`
Defines the default value for the `MOVABLE_PROPERTY`.
`static final Boolean`
`DEFAULT_RESIZABLE`
Defines the default value for the `RESIZABLE_PROPERTY`.
`static final Double`
`DEFAULT_WEIGHT`
Defines the default value for the `WEIGHT_PROPERTY`.
`static final int`
`DIRECTION_BOTTOM_UP`
Constant for bottom-up direction.
`static final int`
`DIRECTION_LEFT_RIGHT`
Constant for direction from left to right.
`static final String`
`DIRECTION_PROPERTY`
Stores the direction of this subgraph.
`static final int`
`DIRECTION_RIGHT_LEFT`
Constant for direction from right to left.
`static final int`
`DIRECTION_TOP_DOWN`
Constant for top-down direction (default).
`static final String`
`LOCATION_PROPERTY`
Stores the location of this EntityLayout.
`static final String`
`MOVABLE_PROPERTY`
Stores the movable state of this EntityLayout.
`static final String`
`RESIZABLE_PROPERTY`
Stores the resizable state of this EntityLayout.
`static final String`
`SIZE_PROPERTY`
Stores the size of this EntityLayout.
`static final String`
`WEIGHT_PROPERTY`
Stores a weight for this connection.

## Constructor Summary

Constructors
Constructor
Description
`LayoutProperties()`

## Method Summary

Modifier and Type
Method
Description
`static Rectangle`
`getBounds(org.eclipse.gef.graph.Graph graph)`
Returns the value of the `BOUNDS_PROPERTY` of the given `LayoutContext`.
`static Point`
`getLocation(org.eclipse.gef.graph.Node node)`
Returns the value of the `LOCATION_PROPERTY` of the given `Node`.
`static Double`
`getPreferredAspectRatio(org.eclipse.gef.graph.Node node)`
Returns the value of the `ASPECT_RATIO_PROPERTY` of the given `Node`.
`static Dimension`
`getSize(org.eclipse.gef.graph.Node node)`
Returns the value of the `SIZE_PROPERTY` of the given `Node` .
`static Double`
`getWeight(org.eclipse.gef.graph.Edge edge)`
Returns the value of the `WEIGHT_PROPERTY` of the given `Edge`.
`static Boolean`
`isMovable(org.eclipse.gef.graph.Node node)`
Returns the value of the `MOVABLE_PROPERTY` of the given `Node`.
`static Boolean`
`isResizable(org.eclipse.gef.graph.Node node)`
Returns the value of the `RESIZABLE_PROPERTY` of the given `Node`.
`static void`
`setBounds(org.eclipse.gef.graph.Graph graph, Rectangle bounds)`
Sets the value of the `BOUNDS_PROPERTY` of the given `LayoutContext` to the given value.
`static void`
`setLocation(org.eclipse.gef.graph.Node node, Point location)`
Sets the value of the `LOCATION_PROPERTY` of the given `Node` to the given value.
`static void`
`setResizable(org.eclipse.gef.graph.Node node, boolean resizable)`
Sets the value of the `RESIZABLE_PROPERTY` of the given `Node` to the given value.
`static void`
`setSize(org.eclipse.gef.graph.Node node, Dimension size)`
Sets the value of the `SIZE_PROPERTY` of the given `Node` to the given value.
`static void`
`setWeight(org.eclipse.gef.graph.Edge edge, double weight)`
Sets the value of the `WEIGHT_PROPERTY` of the given `Edge` to the given value.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### BOUNDS_PROPERTY

public static final String BOUNDS_PROPERTY
Stores the bounds in which the graph elements can be placed.

See Also:
  - Constant Field Values

### LOCATION_PROPERTY

public static final String LOCATION_PROPERTY
Stores the location of this EntityLayout.

See Also:
  - Constant Field Values

### SIZE_PROPERTY

public static final String SIZE_PROPERTY
Stores the size of this EntityLayout.

See Also:
  - Constant Field Values

### MOVABLE_PROPERTY

public static final String MOVABLE_PROPERTY
Stores the movable state of this EntityLayout.

See Also:
  - Constant Field Values

### DEFAULT_MOVABLE

public static final Boolean DEFAULT_MOVABLE
Defines the default value for the `MOVABLE_PROPERTY`.

### RESIZABLE_PROPERTY

public static final String RESIZABLE_PROPERTY
Stores the resizable state of this EntityLayout. A resizable EntityLayout may be resized by a layout algorithm.

See Also:
  - Constant Field Values

### DEFAULT_RESIZABLE

public static final Boolean DEFAULT_RESIZABLE
Defines the default value for the `RESIZABLE_PROPERTY`.

### ASPECT_RATIO_PROPERTY

public static final String ASPECT_RATIO_PROPERTY
Stores the preferred aspect ratio (width / height) for this EntityLayout.

See Also:
  - Constant Field Values

### DEFAULT_ASPECT_RATIO

public static final Double DEFAULT_ASPECT_RATIO
Defines the default value for the `ASPECT_RATIO_PROPERTY`.

### WEIGHT_PROPERTY

public static final String WEIGHT_PROPERTY
Stores a weight for this connection.

See Also:
  - Constant Field Values

### DEFAULT_WEIGHT

public static final Double DEFAULT_WEIGHT
Defines the default value for the `WEIGHT_PROPERTY`.

### DIRECTION_TOP_DOWN

public static final int DIRECTION_TOP_DOWN
Constant for top-down direction (default).

See Also:
  - Constant Field Values

### DIRECTION_BOTTOM_UP

public static final int DIRECTION_BOTTOM_UP
Constant for bottom-up direction.

See Also:
  - Constant Field Values

### DIRECTION_LEFT_RIGHT

public static final int DIRECTION_LEFT_RIGHT
Constant for direction from left to right.

See Also:
  - Constant Field Values

### DIRECTION_RIGHT_LEFT

public static final int DIRECTION_RIGHT_LEFT
Constant for direction from right to left.

See Also:
  - Constant Field Values

### DIRECTION_PROPERTY

public static final String DIRECTION_PROPERTY
Stores the direction of this subgraph.

See Also:
  - Constant Field Values

### DEFAULT_DIRECTION

public static final Integer DEFAULT_DIRECTION
Defines the default value for the `DIRECTION_PROPERTY`.

## Constructor Details

### LayoutProperties

public LayoutProperties()

## Method Details

### getBounds

public static Rectangle getBounds(org.eclipse.gef.graph.Graph graph)
Returns the value of the `BOUNDS_PROPERTY` of the given `LayoutContext`.

Parameters:
  `graph` - The `Graph` whose `BOUNDS_PROPERTY` is read.
Returns:
  The value of the `BOUNDS_PROPERTY` of the given `Graph`.

### setBounds

public static void setBounds(org.eclipse.gef.graph.Graph graph, Rectangle bounds)
Sets the value of the `BOUNDS_PROPERTY` of the given `LayoutContext` to the given value.

Parameters:
  `graph` - The `Graph` whose `BOUNDS_PROPERTY` is changed.
  `bounds` - The new value for the `BOUNDS_PROPERTY` of the given `Graph`.

### getLocation

public static Point getLocation(org.eclipse.gef.graph.Node node)
Returns the value of the `LOCATION_PROPERTY` of the given `Node`.

Parameters:
  `node` - The `Node` whose `LOCATION_PROPERTY` is read.
Returns:
  The value of the `LOCATION_PROPERTY` of the given `Node`.

### getSize

public static Dimension getSize(org.eclipse.gef.graph.Node node)
Returns the value of the `SIZE_PROPERTY` of the given `Node` .

Parameters:
  `node` - The `Node` whose `SIZE_PROPERTY` is read.
Returns:
  The value of the `SIZE_PROPERTY` of the given `Node` .

### getPreferredAspectRatio

public static Double getPreferredAspectRatio(org.eclipse.gef.graph.Node node)
Returns the value of the `ASPECT_RATIO_PROPERTY` of the given `Node`.

Parameters:
  `node` - The `Node` whose `ASPECT_RATIO_PROPERTY` is read.
Returns:
  The value of the `ASPECT_RATIO_PROPERTY` of the given `Node`.

### isResizable

public static Boolean isResizable(org.eclipse.gef.graph.Node node)
Returns the value of the `RESIZABLE_PROPERTY` of the given `Node`.

Parameters:
  `node` - The `Node` whose `RESIZABLE_PROPERTY` is read.
Returns:
  The value of the `RESIZABLE_PROPERTY` of the given `Node`.

### isMovable

public static Boolean isMovable(org.eclipse.gef.graph.Node node)
Returns the value of the `MOVABLE_PROPERTY` of the given `Node`.

Parameters:
  `node` - The `Node` whose `MOVABLE_PROPERTY` is read.
Returns:
  The value of the `MOVABLE_PROPERTY` of the given `Node`.

### setLocation

public static void setLocation(org.eclipse.gef.graph.Node node, Point location)
Sets the value of the `LOCATION_PROPERTY` of the given `Node` to the given value.

Parameters:
  `node` - The `Node` whose `LOCATION_PROPERTY` is changed.
  `location` - The new location for the `LOCATION_PROPERTY` of the given `Node`.

### setSize

public static void setSize(org.eclipse.gef.graph.Node node, Dimension size)
Sets the value of the `SIZE_PROPERTY` of the given `Node` to the given value.

Parameters:
  `node` - The `Node` whose `SIZE_PROPERTY` is changed.
  `size` - The new size for the `SIZE_PROPERTY` of the given `Node`.

### setResizable

public static void setResizable(org.eclipse.gef.graph.Node node, boolean resizable)
Sets the value of the `RESIZABLE_PROPERTY` of the given `Node` to the given value.

Parameters:
  `node` - The `Node` whose `RESIZABLE_PROPERTY` is changed.
  `resizable` - The new value for the `RESIZABLE_PROPERTY` of the given `Node`.

### getWeight

public static Double getWeight(org.eclipse.gef.graph.Edge edge)
Returns the value of the `WEIGHT_PROPERTY` of the given `Edge`.

Parameters:
  `edge` - The `Edge` whose `WEIGHT_PROPERTY` is read.
Returns:
  The value of the `WEIGHT_PROPERTY` of the given `Edge`.

### setWeight

public static void setWeight(org.eclipse.gef.graph.Edge edge, double weight)
Sets the value of the `WEIGHT_PROPERTY` of the given `Edge` to the given value.

Parameters:
  `edge` - The `Edge` whose `WEIGHT_PROPERTY` is changed.
  `weight` - The new value for the `WEIGHT_PROPERTY` of the given `Edge`.