Package org.eclipse.gef.layout
Class LayoutProperties
- java.lang.Object
-
- org.eclipse.gef.layout.LayoutProperties
-
public class LayoutProperties extends java.lang.ObjectLayoutPropertiescontains all properties which can be accessed onGraph,Edge,Node, their default values, as well as static accessor methods for those properties.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringASPECT_RATIO_PROPERTYStores the preferred aspect ratio (width / height) for this EntityLayout.static java.lang.StringBOUNDS_PROPERTYStores the bounds in which the graph elements can be placed.static java.lang.DoubleDEFAULT_ASPECT_RATIODefines the default value for theASPECT_RATIO_PROPERTY.static java.lang.IntegerDEFAULT_DIRECTIONDefines the default value for theDIRECTION_PROPERTY.static java.lang.BooleanDEFAULT_MOVABLEDefines the default value for theMOVABLE_PROPERTY.static java.lang.BooleanDEFAULT_RESIZABLEDefines the default value for theRESIZABLE_PROPERTY.static java.lang.DoubleDEFAULT_WEIGHTDefines the default value for theWEIGHT_PROPERTY.static intDIRECTION_BOTTOM_UPConstant for bottom-up direction.static intDIRECTION_LEFT_RIGHTConstant for direction from left to right.static java.lang.StringDIRECTION_PROPERTYStores the direction of this subgraph.static intDIRECTION_RIGHT_LEFTConstant for direction from right to left.static intDIRECTION_TOP_DOWNConstant for top-down direction (default).static java.lang.StringLOCATION_PROPERTYStores the location of this EntityLayout.static java.lang.StringMOVABLE_PROPERTYStores the movable state of this EntityLayout.static java.lang.StringRESIZABLE_PROPERTYStores the resizable state of this EntityLayout.static java.lang.StringSIZE_PROPERTYStores the size of this EntityLayout.static java.lang.StringWEIGHT_PROPERTYStores a weight for this connection.
-
Constructor Summary
Constructors Constructor Description LayoutProperties()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static RectanglegetBounds(org.eclipse.gef.graph.Graph graph)Returns the value of theBOUNDS_PROPERTYof the givenLayoutContext.static PointgetLocation(org.eclipse.gef.graph.Node node)Returns the value of theLOCATION_PROPERTYof the givenNode.static java.lang.DoublegetPreferredAspectRatio(org.eclipse.gef.graph.Node node)Returns the value of theASPECT_RATIO_PROPERTYof the givenNode.static DimensiongetSize(org.eclipse.gef.graph.Node node)Returns the value of theSIZE_PROPERTYof the givenNode.static java.lang.DoublegetWeight(org.eclipse.gef.graph.Edge edge)Returns the value of theWEIGHT_PROPERTYof the givenEdge.static java.lang.BooleanisMovable(org.eclipse.gef.graph.Node node)Returns the value of theMOVABLE_PROPERTYof the givenNode.static java.lang.BooleanisResizable(org.eclipse.gef.graph.Node node)Returns the value of theRESIZABLE_PROPERTYof the givenNode.static voidsetBounds(org.eclipse.gef.graph.Graph graph, Rectangle bounds)Sets the value of theBOUNDS_PROPERTYof the givenLayoutContextto the given value.static voidsetLocation(org.eclipse.gef.graph.Node node, Point location)Sets the value of theLOCATION_PROPERTYof the givenNodeto the given value.static voidsetResizable(org.eclipse.gef.graph.Node node, boolean resizable)Sets the value of theRESIZABLE_PROPERTYof the givenNodeto the given value.static voidsetSize(org.eclipse.gef.graph.Node node, Dimension size)Sets the value of theSIZE_PROPERTYof the givenNodeto the given value.static voidsetWeight(org.eclipse.gef.graph.Edge edge, double weight)Sets the value of theWEIGHT_PROPERTYof the givenEdgeto the given value.
-
-
-
Field Detail
-
BOUNDS_PROPERTY
public static final java.lang.String BOUNDS_PROPERTY
Stores the bounds in which the graph elements can be placed.- See Also:
- Constant Field Values
-
LOCATION_PROPERTY
public static final java.lang.String LOCATION_PROPERTY
Stores the location of this EntityLayout.- See Also:
- Constant Field Values
-
SIZE_PROPERTY
public static final java.lang.String SIZE_PROPERTY
Stores the size of this EntityLayout.- See Also:
- Constant Field Values
-
MOVABLE_PROPERTY
public static final java.lang.String MOVABLE_PROPERTY
Stores the movable state of this EntityLayout.- See Also:
- Constant Field Values
-
DEFAULT_MOVABLE
public static final java.lang.Boolean DEFAULT_MOVABLE
Defines the default value for theMOVABLE_PROPERTY.
-
RESIZABLE_PROPERTY
public static final java.lang.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 java.lang.Boolean DEFAULT_RESIZABLE
Defines the default value for theRESIZABLE_PROPERTY.
-
ASPECT_RATIO_PROPERTY
public static final java.lang.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 java.lang.Double DEFAULT_ASPECT_RATIO
Defines the default value for theASPECT_RATIO_PROPERTY.
-
WEIGHT_PROPERTY
public static final java.lang.String WEIGHT_PROPERTY
Stores a weight for this connection.- See Also:
- Constant Field Values
-
DEFAULT_WEIGHT
public static final java.lang.Double DEFAULT_WEIGHT
Defines the default value for theWEIGHT_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 java.lang.String DIRECTION_PROPERTY
Stores the direction of this subgraph.- See Also:
- Constant Field Values
-
DEFAULT_DIRECTION
public static final java.lang.Integer DEFAULT_DIRECTION
Defines the default value for theDIRECTION_PROPERTY.
-
-
Method Detail
-
getBounds
public static Rectangle getBounds(org.eclipse.gef.graph.Graph graph)
Returns the value of theBOUNDS_PROPERTYof the givenLayoutContext.- Parameters:
graph- TheGraphwhoseBOUNDS_PROPERTYis read.- Returns:
- The value of the
BOUNDS_PROPERTYof the givenGraph.
-
setBounds
public static void setBounds(org.eclipse.gef.graph.Graph graph, Rectangle bounds)Sets the value of theBOUNDS_PROPERTYof the givenLayoutContextto the given value.- Parameters:
graph- TheGraphwhoseBOUNDS_PROPERTYis changed.bounds- The new value for theBOUNDS_PROPERTYof the givenGraph.
-
getLocation
public static Point getLocation(org.eclipse.gef.graph.Node node)
Returns the value of theLOCATION_PROPERTYof the givenNode.- Parameters:
node- TheNodewhoseLOCATION_PROPERTYis read.- Returns:
- The value of the
LOCATION_PROPERTYof the givenNode.
-
getSize
public static Dimension getSize(org.eclipse.gef.graph.Node node)
Returns the value of theSIZE_PROPERTYof the givenNode.- Parameters:
node- TheNodewhoseSIZE_PROPERTYis read.- Returns:
- The value of the
SIZE_PROPERTYof the givenNode.
-
getPreferredAspectRatio
public static java.lang.Double getPreferredAspectRatio(org.eclipse.gef.graph.Node node)
Returns the value of theASPECT_RATIO_PROPERTYof the givenNode.- Parameters:
node- TheNodewhoseASPECT_RATIO_PROPERTYis read.- Returns:
- The value of the
ASPECT_RATIO_PROPERTYof the givenNode.
-
isResizable
public static java.lang.Boolean isResizable(org.eclipse.gef.graph.Node node)
Returns the value of theRESIZABLE_PROPERTYof the givenNode.- Parameters:
node- TheNodewhoseRESIZABLE_PROPERTYis read.- Returns:
- The value of the
RESIZABLE_PROPERTYof the givenNode.
-
isMovable
public static java.lang.Boolean isMovable(org.eclipse.gef.graph.Node node)
Returns the value of theMOVABLE_PROPERTYof the givenNode.- Parameters:
node- TheNodewhoseMOVABLE_PROPERTYis read.- Returns:
- The value of the
MOVABLE_PROPERTYof the givenNode.
-
setLocation
public static void setLocation(org.eclipse.gef.graph.Node node, Point location)Sets the value of theLOCATION_PROPERTYof the givenNodeto the given value.- Parameters:
node- TheNodewhoseLOCATION_PROPERTYis changed.location- The new location for theLOCATION_PROPERTYof the givenNode.
-
setSize
public static void setSize(org.eclipse.gef.graph.Node node, Dimension size)Sets the value of theSIZE_PROPERTYof the givenNodeto the given value.- Parameters:
node- TheNodewhoseSIZE_PROPERTYis changed.size- The new size for theSIZE_PROPERTYof the givenNode.
-
setResizable
public static void setResizable(org.eclipse.gef.graph.Node node, boolean resizable)Sets the value of theRESIZABLE_PROPERTYof the givenNodeto the given value.- Parameters:
node- TheNodewhoseRESIZABLE_PROPERTYis changed.resizable- The new value for theRESIZABLE_PROPERTYof the givenNode.
-
getWeight
public static java.lang.Double getWeight(org.eclipse.gef.graph.Edge edge)
Returns the value of theWEIGHT_PROPERTYof the givenEdge.- Parameters:
edge- TheEdgewhoseWEIGHT_PROPERTYis read.- Returns:
- The value of the
WEIGHT_PROPERTYof the givenEdge.
-
setWeight
public static void setWeight(org.eclipse.gef.graph.Edge edge, double weight)Sets the value of theWEIGHT_PROPERTYof the givenEdgeto the given value.- Parameters:
edge- TheEdgewhoseWEIGHT_PROPERTYis changed.weight- The new value for theWEIGHT_PROPERTYof the givenEdge.
-
-