T
- The type of this geometry element.public interface GeomElement<T extends GeomElement> extends java.lang.Cloneable, java.lang.Comparable, javolution.xml.XMLSerializable
Modified by: Joseph A. Huwaldt
Modifier and Type | Method and Description |
---|---|
void |
addChangeListener(javax.swing.event.ChangeListener listener)
Add a listener that is notified of changes to the state of this element.
|
T |
copy()
Returns a copy of this GeomElement instance
allocated by the calling thread
(possibly on the stack). |
T |
copyToReal()
Return a copy of this object with any transformations or subranges removed
(applied).
|
java.util.Map |
getAllUserData()
Returns a new Map containing all the user objects associated with this geometry
element.
|
Point |
getBoundsMax()
Return the coordinate point representing the maximum bounding box corner of this
geometry element (e.g.: max X, max Y, max Z).
|
Point |
getBoundsMin()
Return the coordinate point representing the minimum bounding box corner of this
geometry element (e.g.: min X, min Y, min Z).
|
long |
getID()
Return the unique ID number of this geometry element.
|
GeomPoint |
getLimitPoint(int dim,
boolean max,
double tol)
Returns the most extreme point, either minimum or maximum, in the specified
coordinate direction on this geometry element.
|
java.lang.String |
getName()
Return the name of this geometry element.
|
int |
getParDimension()
Returns the number of parametric dimensions of this geometry element.
|
int |
getPhyDimension()
Returns the number of physical dimensions of this geometry element.
|
Unit<Length> |
getUnit()
Returns the unit in which the geometry in this element are stated.
|
java.lang.Object |
getUserData(java.lang.Object key)
Return any user defined object associated with this geometry element and the
specified key.
|
boolean |
isValid()
Return
true if this GeomElement contains valid and finite numerical
components. |
void |
putAllUserData(java.util.Map data)
Add all the user defined data in the supplied Map to this objects map of user
defined data.
|
void |
putUserData(java.lang.Object key,
java.lang.Object value)
Set the user defined object associated with this geometry element and the specified
key.
|
void |
removeChangeListener(javax.swing.event.ChangeListener listener)
Remove a listener from receiving notifications of changes to the state of this
element.
|
void |
removeUserData(java.lang.Object key)
Removes the entry for the specified user object key if present.
|
void |
setName(java.lang.String name)
Change the name of this geometry element to the specified name (may be
null to clear the name and make it undefined). |
int |
size()
Returns the number of child-elements that make up this geometry element.
|
T |
to(Unit<Length> unit)
Returns the equivalent to this element but stated in the specified unit.
|
T |
toDimension(int newDim)
Return a copy of this element converted to the specified number of physical
dimensions.
|
javolution.text.Text |
toText()
Returns the text representation of this geometry element.
|
long getID()
java.lang.String getName()
null
is returned.void setName(java.lang.String name)
null
to clear the name and make it undefined).name
- The name of this geometry element.int size()
javolution.text.Text toText()
int getPhyDimension()
T toDimension(int newDim)
newDim
- The dimension of the element to return.int getParDimension()
Point getBoundsMin()
Point getBoundsMax()
GeomPoint getLimitPoint(int dim, boolean max, double tol)
getBoundsMax
& getBoundsMin
, but also typically takes
longer to compute.dim
- An index indicating the dimension to find the min/max point for (0=X,
1=Y, 2=Z, etc).max
- Set to true
to return the maximum value, false
to return the minimum.tol
- Fractional tolerance to refine the min/max point position to if
necessary.getBoundsMin()
,
getBoundsMax()
boolean isValid()
true
if this GeomElement contains valid and finite numerical
components. A value of false
will be returned if any of the
evaluations of this element are NaN or Inf.Unit<Length> getUnit()
T to(Unit<Length> unit) throws ConversionException
unit
- the length unit of the element to be returned.ConversionException
- if the the input unit is not a length unit.T copy()
allocated
by the calling thread
(possibly on the stack).T copyToReal()
java.lang.Object getUserData(java.lang.Object key)
null
is returned.key
- the key whose associated value is to be returned or null
if
the specified key could not be found.java.lang.NullPointerException
- if key
is null
.java.util.Map getAllUserData()
void putUserData(java.lang.Object key, java.lang.Object value)
key
- the key with which the specified value is to be associated.value
- the value to be associated with the specified key.java.lang.NullPointerException
- if the key
is null
.void putAllUserData(java.util.Map data)
data
- The Map of user defined data to be added to this object's map of user
defined data.void removeUserData(java.lang.Object key)
key
- the key whose mapping is to be removed from the map.java.lang.NullPointerException
- if the key
is null
.void addChangeListener(javax.swing.event.ChangeListener listener)
listener
- The listener to be notified of changes to the state of this
element.void removeChangeListener(javax.swing.event.ChangeListener listener)
listener
- The listener to be removed from those being notified of changes to
the state of this element.