|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tensegrity.graph.layout.LayoutUtil
This class provides a number of utility operations that
might be used by a NodeLayout class.
| Field Summary | |
static int |
EAST
Segment direction specifier. |
static int |
NONE
The segment direction cannot be specified |
static int |
NORTH
Segment direction specifier. |
static Constraint |
positiveMetricExpressionValue
A metric expression for positive values |
static int |
SOUTH
Segment direction specifier . |
static int |
WEST
Segment direction specifier. |
| Method Summary | |
static boolean |
changeAttribute(AttributeSet attrSet,
java.lang.String oldName,
java.lang.String newName)
Changes the name of an attribute within an specified attribute-set |
static int |
convertMetricValue(MetricExpression mexp)
This method converts a given MetricExpression to internal measuring unit. |
static boolean |
getAttributeBooleanValue(AttributeSet attributeSet,
java.lang.String attrName,
boolean defaultValue)
This method extracts a given AttributeSet and returns the
contained boolean value, or the specified default
value, in case of any failure. |
static double |
getAttributeDoubleValue(AttributeSet attributeSet,
java.lang.String attrName,
double defaultValue)
This method extracts a given AttributeSet and returns the
contained double value, or the specified default
value, in case of any failure. |
static int |
getAttributeIntValue(AttributeSet attributeSet,
java.lang.String attrName,
int defaultValue)
This method extracts a given AttributeSet and returns the
contained int value, or the specified default
value, in case of any failure. |
static MetricExpression |
getAttributeMetricValue(AttributeSet attributeSet,
java.lang.String attrName,
MetricExpression defaultValue)
This method extracts a given AttributeSet and returns the
contained MetricExpression. |
static java.lang.String |
getAttributeStrValue(AttributeSet attributeSet,
java.lang.String attrName,
java.lang.String defaultValue)
This method extracts a given AttributeSet and returns the
contained string, or the specified default
value, in case of any failure. |
static int |
getEdgeDirection(LayoutableEdge edge,
boolean start)
This method determines the hitting direction of an specified edge with its source or target node. |
static java.lang.String |
nodelayoutDirection2String(int direction)
|
static Constraint |
parseConstraint(ConstraintParser cp,
java.lang.String constraint)
|
static boolean |
setAttribute(AttributeSet attributeSet,
java.lang.String attrName,
java.lang.Object value)
This method can be used to change the value of an specified Attribute
within an AttributeSet. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int NONE
public static final int WEST
public static final int EAST
public static final int NORTH
public static final int SOUTH
public static final Constraint positiveMetricExpressionValue
| Method Detail |
public static final Constraint parseConstraint(ConstraintParser cp,
java.lang.String constraint)
public static int getAttributeIntValue(AttributeSet attributeSet,
java.lang.String attrName,
int defaultValue)
AttributeSet and returns the
contained int value, or the specified default
value, in case of any failure.
attributeSet - the AttributeSet which wraps the int value
specified by attrName.attrName - the name of the attribute in the attribute set.defaultValue - the value that should be returned in case the of any
failure.
int value specified by attrName.
public static double getAttributeDoubleValue(AttributeSet attributeSet,
java.lang.String attrName,
double defaultValue)
AttributeSet and returns the
contained double value, or the specified default
value, in case of any failure.
attributeSet - the AttributeSet which wraps the double value
specified by attrName.attrName - the name of the attribute in the attribute set.defaultValue - the value that should be returned in case the of any
failure.
double value specified by attrName.
public static java.lang.String getAttributeStrValue(AttributeSet attributeSet,
java.lang.String attrName,
java.lang.String defaultValue)
AttributeSet and returns the
contained string, or the specified default
value, in case of any failure.
attributeSet - the AttributeSet which wraps the string
specified by attrName.attrName - the name of the attribute in the attribute set.defaultValue - the value that should be returned in case the of any
failure.
string specified by attrName.
public static boolean getAttributeBooleanValue(AttributeSet attributeSet,
java.lang.String attrName,
boolean defaultValue)
AttributeSet and returns the
contained boolean value, or the specified default
value, in case of any failure.
attributeSet - the AttributeSet which wraps the boolean value
specified by attrName.attrName - the name of the attribute in the attribute set.defaultValue - the value that should be returned in case the of any
failure.
boolean value specified by attrName.
public static final MetricExpression getAttributeMetricValue(AttributeSet attributeSet,
java.lang.String attrName,
MetricExpression defaultValue)
AttributeSet and returns the
contained MetricExpression.
attributeSet - attributeSet the AttributeSet which wraps the boolean value
specified by attrName.attrName - the name of the attribute in the attribute set.defaultValue - the value that should be returned in case the of any
failure.
boolean value specified by attrName.
public static boolean setAttribute(AttributeSet attributeSet,
java.lang.String attrName,
java.lang.Object value)
Attribute
within an AttributeSet.
attributeSet - the main attribute set of which an attribute is to be changed.attrName - the name of the attribute withhin the attribute setvalue - the new value for the attribute specified by attrName.
true if the function was successful;public static final int convertMetricValue(MetricExpression mexp)
MetricExpression to internal measuring unit.
mexp - the MetricExpression that is to be converted.
public static int getEdgeDirection(LayoutableEdge edge,
boolean start)
public static boolean changeAttribute(AttributeSet attrSet,
java.lang.String oldName,
java.lang.String newName)
attrSet - the attribute-setoldName - the old name of the attribute which is to be changed.newName - the new name for the attribute.
public static final java.lang.String nodelayoutDirection2String(int direction)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||