|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.dlsc.flexgantt.util.NamedObject
public class NamedObject
A named object is a simple object that only carries a name attribute. As this is a very common attribute it makes sense to create a separate class for it so that it can be used as a superclass for various other types.
Field Summary | |
---|---|
static java.lang.String |
PROPERTY_NAME
Constant used for those property change events that get triggered when the name of the object gets changed. |
Constructor Summary | |
---|---|
NamedObject()
Constructs a new named object. |
|
NamedObject(java.lang.String name)
Constructs a new named object with the given name. |
Method Summary | |
---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener l)
Adds a property change listener to the named object. |
int |
compareTo(INamedObject o)
|
protected java.beans.PropertyChangeSupport |
getChangeSupport()
Returns the property change support object so that subclasses can use it to fire property change events. |
java.lang.String |
getName()
Returns the value of the object's name attribute (the object's name). |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener l)
Removes a property change listener from the named object. |
void |
setName(java.lang.String name)
Assigns a new name to the object. |
java.lang.String |
toString()
Returns the name of the object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PROPERTY_NAME
setName(String)
,
addPropertyChangeListener(PropertyChangeListener)
,
Constant Field ValuesConstructor Detail |
---|
public NamedObject(java.lang.String name)
name
- the object's namepublic NamedObject()
setName(String)
Method Detail |
---|
public void setName(java.lang.String name)
name
- the new object namegetName()
public java.lang.String getName()
INamedObject
getName
in interface INamedObject
public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
l
- the new listenerremovePropertyChangeListener(PropertyChangeListener)
public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
l
- the listener that will be removedaddPropertyChangeListener(PropertyChangeListener)
protected java.beans.PropertyChangeSupport getChangeSupport()
public java.lang.String toString()
toString
in class java.lang.Object
getName()
public int compareTo(INamedObject o)
compareTo
in interface java.lang.Comparable<INamedObject>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |