java.io.Serializable
, java.lang.Cloneable
, javax.swing.tree.TreeNode
, TreeNodeWithChangeSupport
public class RelAbsVector extends AbstractTreeNode
Constructor | Description |
---|---|
RelAbsVector() |
|
RelAbsVector(double absolute) |
Set only the absolute, but not the relative part, to an initial value
|
RelAbsVector(double absolute,
double relative) |
Set both the relative and absolute parts to initial values
|
RelAbsVector(java.lang.String coordinate) |
Set from a XML-String in the format "a" or "r%" or "a+r%" or "a-r%", as
described in the render-specification
|
RelAbsVector(RelAbsVector original) |
Copy-constructor
|
Modifier and Type | Method | Description |
---|---|---|
RelAbsVector |
clone() |
|
boolean |
equals(java.lang.Object obj) |
|
double |
getAbsoluteValue() |
|
boolean |
getAllowsChildren() |
|
javax.swing.tree.TreeNode |
getChildAt(int childIndex) |
|
int |
getChildCount() |
|
java.lang.String |
getCoordinate() |
Produces a string of the format "a" or "r%" or "a+r%" or "a-r%" as
specified in the render-documentation.
|
double |
getRelativeValue() |
|
int |
hashCode() |
|
boolean |
isSetAbsoluteValue() |
|
boolean |
isSetRelativeValue() |
|
void |
setAbsoluteValue(double absolute) |
Sets absolute part to new value and fires appropriate event
|
boolean |
setCoordinate(java.lang.String coordinates) |
Sets the relative and absolute value based on a String-encoding (like "1",
"30%" or "50-20%"; as defined in the render-specification)
If the String does not represent a valid value, relative and absolute value are set to NaN |
void |
setRelativeValue(double relative) |
Sets relative part to new value and fires appropriate event
|
java.lang.String |
toString() |
Produces a string for debugging etc.
|
boolean |
unsetAbsoluteValue() |
Tries to unset the absolute value
|
boolean |
unsetRelativeValue() |
Tries to unset the relative value
|
addAllChangeListeners, addAllChangeListeners, addTreeNodeChangeListener, addTreeNodeChangeListener, children, clearUserObjects, containsUserObjectKey, filter, filter, filter, fireNodeAddedEvent, fireNodeRemovedEvent, firePropertyChange, getIndex, getListOfTreeNodeChangeListeners, getNumChildren, getParent, getRoot, getTreeNodeChangeListenerCount, getUserObject, indexOf, isLeaf, isRoot, isSetParent, isSetUserObjects, putUserObject, removeAllTreeNodeChangeListeners, removeAllTreeNodeChangeListeners, removeFromParent, removeTreeNodeChangeListener, removeTreeNodeChangeListener, removeUserObject, setParent, userObjectKeySet
public RelAbsVector()
public RelAbsVector(RelAbsVector original)
original
- public RelAbsVector(double absolute)
absolute
- coordinate-value (in pt)public RelAbsVector(double absolute, double relative)
absolute
- coordinate-value (in pt)relative
- in % of some reference size (of the enclosing BoundingBox
),
relative=75 means 75% (i.e. 0.75)public RelAbsVector(java.lang.String coordinate)
coordinate
- String encoding of a RelAbsVector. If invalid, both absolute and
relative part are set to NaN (i.e. unset)public RelAbsVector clone()
clone
in class AbstractTreeNode
public boolean equals(java.lang.Object obj)
equals
in class AbstractTreeNode
public double getAbsoluteValue()
public double getRelativeValue()
public void setAbsoluteValue(double absolute)
absolute
- the new absolute value to be takenpublic void setRelativeValue(double relative)
relative
- the new relative value to be taken (in percent, i.e. relative=100d
means 100%)public boolean isSetAbsoluteValue()
public boolean isSetRelativeValue()
public boolean unsetAbsoluteValue()
public boolean unsetRelativeValue()
public boolean setCoordinate(java.lang.String coordinates)
coordinates
- a RelAbsVector stringpublic java.lang.String getCoordinate()
public java.lang.String toString()
getCoordinate()
toString
in class AbstractTreeNode
public int hashCode()
hashCode
in class AbstractTreeNode
public javax.swing.tree.TreeNode getChildAt(int childIndex)
public int getChildCount()
public boolean getAllowsChildren()