T
- The sub-type of this AbstractGeomElement element.public abstract class AbstractGeomElement<T extends AbstractGeomElement> extends java.lang.Object implements GeomElement<T>, javolution.lang.Reusable
GeomElement
interface.
Modified by: Joseph A. Huwaldt
Modifier and Type | Field and Description |
---|---|
static java.util.ResourceBundle |
RESOURCES
The resource bundle for this package.
|
Constructor and Description |
---|
AbstractGeomElement() |
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.
|
java.lang.Object |
clone()
Returns a copy of this GeomElement instance
allocated by the calling thread
(possibly on the stack). |
int |
compareTo(java.lang.Object otherElement)
Compares this geometry element with the specified element for order (where order is
determined by the element's name).
|
boolean |
equals(java.lang.Object obj)
Compares the specified object with this object for equality.
|
java.util.Map<java.lang.Object,java.lang.Object> |
getAllUserData()
Returns a new Map containing all the user objects associated with this geometry
element.
|
long |
getID()
Return the unique ID number of this geometry element.
|
java.lang.String |
getName()
Return the name of this geometry element.
|
java.lang.Object |
getUserData(java.lang.Object key)
Return any user defined object associated with this geometry element and the
specified key.
|
int |
hashCode()
Returns the hash code for this
AbstractGeomElement . |
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 |
reset()
Resets the internal state of this object to its default values.
|
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). |
java.lang.String |
toString()
Returns a string representation of this geometry element.
|
javolution.text.Text |
toText()
Returns the text representation of this geometry element.
|
copy, copyToReal, getBoundsMax, getBoundsMin, getLimitPoint, getParDimension, getPhyDimension, getUnit, isValid, size, to, toDimension
public static final java.util.ResourceBundle RESOURCES
public AbstractGeomElement()
public long getID()
getID
in interface GeomElement<T extends AbstractGeomElement>
public java.lang.String getName()
null
is returned.getName
in interface GeomElement<T extends AbstractGeomElement>
public void setName(java.lang.String name)
null
to clear the name and make it undefined).setName
in interface GeomElement<T extends AbstractGeomElement>
name
- The name of this geometry element.public void addChangeListener(javax.swing.event.ChangeListener listener)
addChangeListener
in interface GeomElement<T extends AbstractGeomElement>
listener
- The listener to be notified of changes to the state of this
element.public void removeChangeListener(javax.swing.event.ChangeListener listener)
removeChangeListener
in interface GeomElement<T extends AbstractGeomElement>
listener
- The listener to be removed from those being notified of changes to
the state of this element.public java.lang.Object clone() throws java.lang.CloneNotSupportedException
allocated
by the calling thread
(possibly on the stack).clone
in class java.lang.Object
java.lang.CloneNotSupportedException
- Never thrown.GeomElement.copy()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- the object to compare with.true
if this object is identical to that object;
false
otherwise.public int hashCode()
AbstractGeomElement
.hashCode
in class java.lang.Object
public javolution.text.Text toText()
toText
in interface GeomElement<T extends AbstractGeomElement>
public java.lang.String toString()
toString
in class java.lang.Object
public int compareTo(java.lang.Object otherElement)
compareTo
in interface java.lang.Comparable
otherElement
- The geometry element this one is being compared to.public java.lang.Object getUserData(java.lang.Object key)
null
is returned.getUserData
in interface GeomElement<T extends AbstractGeomElement>
key
- the key whose associated value is to be returned. May not be null.public java.util.Map<java.lang.Object,java.lang.Object> getAllUserData()
getAllUserData
in interface GeomElement<T extends AbstractGeomElement>
public void putUserData(java.lang.Object key, java.lang.Object value)
putUserData
in interface GeomElement<T extends AbstractGeomElement>
key
- the key with which the specified value is to be associated. May not be
null.value
- the value to be associated with the specified key. May not be null.public void putAllUserData(java.util.Map data)
putAllUserData
in interface GeomElement<T extends AbstractGeomElement>
data
- The Map of user defined data to be added to this object's map of user
defined data.public void removeUserData(java.lang.Object key)
removeUserData
in interface GeomElement<T extends AbstractGeomElement>
key
- the key whose mapping is to be removed from the map. May not be null.public void reset()
super.reset();
to ensure that the state
is reset properly.reset
in interface javolution.lang.Reusable