|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.guiseframework.platform.AbstractDepictor<O>
O - The type of object being depicted.public abstract class AbstractDepictor<O extends DepictedObject>
An abstract strategy for depicting objects on some platform.
The Depictor.GENERAL_PROPERTY is used to indicate that some general property has changed.
| Nested Class Summary | |
|---|---|
protected class |
AbstractDepictor.DepictedPropertyChangeListener
A listener that marks this depiction as dirty if changes occur. |
| Field Summary |
|---|
| Fields inherited from interface com.guiseframework.platform.Depictor |
|---|
GENERAL_PROPERTY |
| Constructor Summary | |
|---|---|
AbstractDepictor()
Default constructor. |
|
| Method Summary | |
|---|---|
void |
depict()
Updates the depiction of the object. |
protected void |
depictedObjectPropertyChange(java.beans.PropertyChangeEvent propertyChangeEvent)
Called when a depicted object bound property is changed. |
DepictContext |
getDepictContext()
Retrieves information and functionality related to the current depiction on the platform. |
O |
getDepictedObject()
|
protected AbstractDepictor.DepictedPropertyChangeListener |
getDepictedPropertyChangeListener()
|
protected java.util.Set<java.lang.String> |
getIgnoredProperties()
|
protected java.util.Set<java.lang.String> |
getModifiedProperties()
|
Platform |
getPlatform()
|
GuiseSession |
getSession()
|
void |
installed(O depictedObject)
Called when the depictor is installed in a depicted object. |
boolean |
isDepicted()
|
void |
processEvent(PlatformEvent event)
Processes an event from the platform. |
void |
setDepicted(boolean newDepicted)
Changes the depictor's updated status. |
protected void |
setPropertyModified(java.lang.String property,
boolean modified)
Calls when a property has been modified to sets whether a property has been modified. |
void |
uninstalled(O depictedObject)
Called when the depictor is uninstalled from a depicted object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractDepictor()
| Method Detail |
|---|
public GuiseSession getSession()
getSession in interface Depictor<O extends DepictedObject>public Platform getPlatform()
getPlatform in interface Depictor<O extends DepictedObject>public DepictContext getDepictContext()
Platform.getDepictContext().
getDepictContext in interface Depictor<O extends DepictedObject>java.lang.IllegalStateException - if no depict context can be returned in the current depiction state.protected java.util.Set<java.lang.String> getIgnoredProperties()
protected java.util.Set<java.lang.String> getModifiedProperties()
protected void setPropertyModified(java.lang.String property,
boolean modified)
true, the depictor's isDepicted() status is changed to false.
If the property's modified status is set to false and there are no other modified properties, the depictor's isDepicted() status is set to true.
property - The property that has been modified.setDepicted(boolean)protected AbstractDepictor.DepictedPropertyChangeListener getDepictedPropertyChangeListener()
public O getDepictedObject()
getDepictedObject in interface Depictor<O extends DepictedObject>null if this depictor is not installed in a depicted object.public boolean isDepicted()
isDepicted in interface Depictor<O extends DepictedObject>public void setDepicted(boolean newDepicted)
true, all modified properties are removed.
If the new depicted status is false, the Depictor.GENERAL_PROPERTY property is set as modified.
setDepicted in interface Depictor<O extends DepictedObject>newDepicted - Whether this depictor's representation of the depicted object is up to date.public void installed(O depictedObject)
PropertyBindable object.
This version listens for list changes of a ListListenable object.
installed in interface Depictor<O extends DepictedObject>depictedObject - The depictedObject into which this depictor is being installed.
java.lang.NullPointerException - if the given depicted object is null.
java.lang.IllegalStateException - if this depictor is already installed in a depicted object.depictedPropertyChangeListenerpublic void uninstalled(O depictedObject)
PropertyBindable object.
This version stops listening for list changes of a ListListenable object.
uninstalled in interface Depictor<O extends DepictedObject>depictedObject - The depicted object from which this depictor is being uninstalled.
java.lang.NullPointerException - if the given depicted object is null.
java.lang.IllegalStateException - if this depictor is not installed in a depicted object.depictedPropertyChangeListenerpublic void processEvent(PlatformEvent event)
processEvent in interface Depictor<O extends DepictedObject>event - The event to be processed.
java.lang.IllegalArgumentException - if the given event is a relevant DepictEvent with a source of a different depicted object.
public void depict()
throws java.io.IOException
depict in interface Depictor<O extends DepictedObject>java.io.IOException - if there is an error updating the depiction.protected void depictedObjectPropertyChange(java.beans.PropertyChangeEvent propertyChangeEvent)
propertyChangeEvent - An event object describing the event source and the property that has changed.getIgnoredProperties(),
setPropertyModified(String, boolean)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||