|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.savarese.unicorn.ui.AbstractObjectPanelModel<O>
public abstract class AbstractObjectPanelModel<O>
An abstract class implementing most of the methods declared by the
ObjectPanelModel
interface. It simplifies the implementation of
the ObjectPanelModel
interface.
Field Summary | |
---|---|
protected java.util.LinkedList<ObjectPanelModelListener<O>> |
_listeners_
A list of ObjectPanelModelListener instances that are notified
each time setObject(O) is called with a new object. |
protected O |
_object_
The object wrapped by the model. |
Constructor Summary | |
---|---|
protected |
AbstractObjectPanelModel()
Initializes _listeners_ . |
Method Summary | |
---|---|
protected void |
_notifyListeners_()
Invokes ObjectPanelModelListener.modelChanged(org.savarese.unicorn.ui.ObjectPanelModel for each
ObjectPanelModelListener in _listeners_ . |
void |
addObjectPanelModelListener(ObjectPanelModelListener<O> listener)
Adds an ObjectPanelModelListener to the model. |
O |
getObject()
Retrieves the object adapted to the interface. |
java.lang.String |
getObjectName()
Returns a string that identifies the object. |
boolean |
isValid()
Determines if the model is in a valid state. |
void |
removeObjectPanelModelListener(ObjectPanelModelListener<O> listener)
Removes an ObjectPanelModelListener from the model. |
void |
setObject(O obj)
Sets the object to be adapted to the interface. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.savarese.unicorn.ui.ObjectPanelModel |
---|
getAttribute, getObjectInfo, invoke, setAttribute |
Field Detail |
---|
protected O _object_
setObject(O)
and getObject()
.
protected java.util.LinkedList<ObjectPanelModelListener<O>> _listeners_
ObjectPanelModelListener
instances that are notified
each time setObject(O)
is called with a new object.
Constructor Detail |
---|
protected AbstractObjectPanelModel()
_listeners_
.
Method Detail |
---|
protected void _notifyListeners_()
ObjectPanelModelListener.modelChanged(org.savarese.unicorn.ui.ObjectPanelModel)
for each
ObjectPanelModelListener
in _listeners_
.
public void setObject(O obj)
ObjectPanelModel
setObject
in interface ObjectPanelModel<O>
obj
- The object to be adapted.public O getObject()
ObjectPanelModel
getObject
in interface ObjectPanelModel<O>
public java.lang.String getObjectName()
ObjectPanelModel
getObjectName
in interface ObjectPanelModel<O>
public boolean isValid()
ObjectPanelModel
isValid
in interface ObjectPanelModel<O>
public void addObjectPanelModelListener(ObjectPanelModelListener<O> listener)
ObjectPanelModel
ObjectPanelModelListener
to the model. The
listener is notifiied whenever the model changes.
addObjectPanelModelListener
in interface ObjectPanelModel<O>
listener
- The listener to add.public void removeObjectPanelModelListener(ObjectPanelModelListener<O> listener)
ObjectPanelModel
ObjectPanelModelListener
from the model.
removeObjectPanelModelListener
in interface ObjectPanelModel<O>
listener
- The listener to remove.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |