public class LayoutProperties
extends java.lang.Object
LayoutProperties contains all properties which can be accessed on
ILayoutContext, IEdgeLayout, INodeLayout, their
default values, as well as static accessor methods for those properties.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ASPECT_RATIO_PROPERTY
Stores the preferred aspect ratio (width / height) for this EntityLayout.
|
static java.lang.String |
BOUNDS_PROPERTY
Stores the bounds in which the graph elements can be placed.
|
static java.lang.Double |
DEFAULT_ASPECT_RATIO
Defines the default value for the
ASPECT_RATIO_PROPERTY. |
static Rectangle |
DEFAULT_BOUNDS
Defines the default value for the
BOUNDS_PROPERTY. |
static java.lang.Integer |
DEFAULT_DIRECTION
Defines the default value for the
DIRECTION_PROPERTY. |
static Point |
DEFAULT_LOCATION
Defines the default value for the
LOCATION_PROPERTY. |
static java.lang.Boolean |
DEFAULT_MOVABLE
Defines the default value for the
MOVABLE_PROPERTY. |
static java.lang.Boolean |
DEFAULT_RESIZABLE
Defines the default value for the
RESIZABLE_PROPERTY. |
static Dimension |
DEFAULT_SIZE
Defines the default value for the
SIZE_PROPERTY. |
static java.lang.Double |
DEFAULT_WEIGHT
Defines the default value for the
WEIGHT_PROPERTY. |
static int |
DIRECTION_BOTTOM_UP
Constant for bottom-up direction.
|
static int |
DIRECTION_LEFT_RIGHT
Constant for direction from left to right.
|
static java.lang.String |
DIRECTION_PROPERTY
Stores the direction of this subgraph.
|
static int |
DIRECTION_RIGHT_LEFT
Constant for direction from right to left.
|
static int |
DIRECTION_TOP_DOWN
Constant for top-down direction (default).
|
static java.lang.String |
LOCATION_PROPERTY
Stores the location of this EntityLayout.
|
static java.lang.String |
MOVABLE_PROPERTY
Stores the movable state of this EntityLayout.
|
static java.lang.String |
RESIZABLE_PROPERTY
Stores the resizable state of this EntityLayout.
|
static java.lang.String |
SIZE_PROPERTY
Stores the size of this EntityLayout.
|
static java.lang.String |
WEIGHT_PROPERTY
Stores a weight for this connection.
|
| Constructor and Description |
|---|
LayoutProperties() |
| Modifier and Type | Method and Description |
|---|---|
static Rectangle |
getBounds(ILayoutContext context)
Returns the value of the
BOUNDS_PROPERTY of the given
ILayoutContext. |
static Point |
getLocation(INodeLayout node)
Returns the value of the
LOCATION_PROPERTY of the given
INodeLayout. |
static java.lang.Double |
getPreferredAspectRatio(INodeLayout node)
Returns the value of the
ASPECT_RATIO_PROPERTY of the given
INodeLayout. |
static Dimension |
getSize(INodeLayout node)
Returns the value of the
SIZE_PROPERTY of the given
INodeLayout. |
static java.lang.Double |
getWeight(IEdgeLayout edge)
Returns the value of the
WEIGHT_PROPERTY of the given
IEdgeLayout. |
static java.lang.Boolean |
isMovable(INodeLayout node)
Returns the value of the
MOVABLE_PROPERTY of the given
INodeLayout. |
static java.lang.Boolean |
isResizable(INodeLayout node)
Returns the value of the
RESIZABLE_PROPERTY of the given
INodeLayout. |
static void |
setBounds(ILayoutContext context,
Rectangle bounds)
Sets the value of the
BOUNDS_PROPERTY of the given
ILayoutContext to the given value. |
static void |
setLocation(INodeLayout node,
double x,
double y)
Sets the value of the
LOCATION_PROPERTY of the given
INodeLayout to the given value. |
static void |
setResizable(INodeLayout node,
boolean resizable)
Sets the value of the
RESIZABLE_PROPERTY of the given
INodeLayout to the given value. |
static void |
setSize(INodeLayout node,
double w,
double h)
Sets the value of the
SIZE_PROPERTY of the given
INodeLayout to the given value. |
static void |
setWeight(IEdgeLayout edge,
double weight)
Sets the value of the
WEIGHT_PROPERTY of the given
IEdgeLayout to the given value. |
public static final java.lang.String BOUNDS_PROPERTY
public static final Rectangle DEFAULT_BOUNDS
BOUNDS_PROPERTY.public static final java.lang.String LOCATION_PROPERTY
public static final Point DEFAULT_LOCATION
LOCATION_PROPERTY.public static final java.lang.String SIZE_PROPERTY
public static final Dimension DEFAULT_SIZE
SIZE_PROPERTY.public static final java.lang.String MOVABLE_PROPERTY
public static final java.lang.Boolean DEFAULT_MOVABLE
MOVABLE_PROPERTY.public static final java.lang.String RESIZABLE_PROPERTY
public static final java.lang.Boolean DEFAULT_RESIZABLE
RESIZABLE_PROPERTY.public static final java.lang.String ASPECT_RATIO_PROPERTY
public static final java.lang.Double DEFAULT_ASPECT_RATIO
ASPECT_RATIO_PROPERTY.public static final java.lang.String WEIGHT_PROPERTY
public static final java.lang.Double DEFAULT_WEIGHT
WEIGHT_PROPERTY.public static final int DIRECTION_TOP_DOWN
public static final int DIRECTION_BOTTOM_UP
public static final int DIRECTION_LEFT_RIGHT
public static final int DIRECTION_RIGHT_LEFT
public static final java.lang.String DIRECTION_PROPERTY
public static final java.lang.Integer DEFAULT_DIRECTION
DIRECTION_PROPERTY.public static Rectangle getBounds(ILayoutContext context)
BOUNDS_PROPERTY of the given
ILayoutContext.context - The ILayoutContext whose BOUNDS_PROPERTY is
read.BOUNDS_PROPERTY of the given
ILayoutContext.public static void setBounds(ILayoutContext context, Rectangle bounds)
BOUNDS_PROPERTY of the given
ILayoutContext to the given value.context - The ILayoutContext whose BOUNDS_PROPERTY is
changed.bounds - The new value for the BOUNDS_PROPERTY of the given
ILayoutContext.public static Point getLocation(INodeLayout node)
LOCATION_PROPERTY of the given
INodeLayout.node - The INodeLayout whose LOCATION_PROPERTY is
read.LOCATION_PROPERTY of the given
INodeLayout.public static Dimension getSize(INodeLayout node)
SIZE_PROPERTY of the given
INodeLayout.node - The INodeLayout whose SIZE_PROPERTY is read.SIZE_PROPERTY of the given
INodeLayout.public static java.lang.Double getPreferredAspectRatio(INodeLayout node)
ASPECT_RATIO_PROPERTY of the given
INodeLayout.node - The INodeLayout whose ASPECT_RATIO_PROPERTY
is read.ASPECT_RATIO_PROPERTY of the given
INodeLayout.public static java.lang.Boolean isResizable(INodeLayout node)
RESIZABLE_PROPERTY of the given
INodeLayout.node - The INodeLayout whose RESIZABLE_PROPERTY is
read.RESIZABLE_PROPERTY of the given
INodeLayout.public static java.lang.Boolean isMovable(INodeLayout node)
MOVABLE_PROPERTY of the given
INodeLayout.node - The INodeLayout whose MOVABLE_PROPERTY is
read.MOVABLE_PROPERTY of the given
INodeLayout.public static void setLocation(INodeLayout node, double x, double y)
LOCATION_PROPERTY of the given
INodeLayout to the given value.node - The INodeLayout whose LOCATION_PROPERTY is
changed.x - The new x coordinate for the LOCATION_PROPERTY of the
given INodeLayout.y - The new y coordinate for the LOCATION_PROPERTY of the
given INodeLayout.public static void setSize(INodeLayout node, double w, double h)
SIZE_PROPERTY of the given
INodeLayout to the given value.node - The INodeLayout whose SIZE_PROPERTY is
changed.w - The new width for the SIZE_PROPERTY of the given
INodeLayout.h - The new height for the SIZE_PROPERTY of the given
INodeLayout.public static void setResizable(INodeLayout node, boolean resizable)
RESIZABLE_PROPERTY of the given
INodeLayout to the given value.node - The INodeLayout whose RESIZABLE_PROPERTY is
changed.resizable - The new value for the RESIZABLE_PROPERTY of the given
INodeLayout.public static java.lang.Double getWeight(IEdgeLayout edge)
WEIGHT_PROPERTY of the given
IEdgeLayout.edge - The IEdgeLayout whose WEIGHT_PROPERTY is
read.WEIGHT_PROPERTY of the given
IEdgeLayout.public static void setWeight(IEdgeLayout edge, double weight)
WEIGHT_PROPERTY of the given
IEdgeLayout to the given value.edge - The IEdgeLayout whose WEIGHT_PROPERTY is
changed.weight - The new value for the WEIGHT_PROPERTY of the given
IEdgeLayout.Copyright (c) 2014 itemis AG and others. All rights reserved.