com.guiseframework.platform
Class AbstractDepictedObject

java.lang.Object
  extended by com.globalmentor.beans.BoundPropertyObject
      extended by com.guiseframework.event.GuiseBoundPropertyObject
          extended by com.guiseframework.platform.AbstractDepictedObject
All Implemented Interfaces:
com.globalmentor.beans.PropertyBindable, com.globalmentor.beans.PropertyConstrainable, DepictedObject
Direct Known Subclasses:
Audio, PlatformFileCollector

public abstract class AbstractDepictedObject
extends GuiseBoundPropertyObject
implements DepictedObject

Abstract implementation of an object that can be depicted on some platform.

Author:
Garret Wilson

Field Summary
 
Fields inherited from class com.globalmentor.beans.BoundPropertyObject
NO_PROPERTY_CHANGE_LISTENERS, NO_VETOABLE_CHANGE_LISTENERS
 
Constructor Summary
AbstractDepictedObject()
          Default constructor.
 
Method Summary
 void depict()
          Updates the depiction of the object.
 boolean equals(java.lang.Object object)
          Indicates whether some other object is "equal to" this one.
 Transferable<?> exportTransfer()
          Exports data from the depicted object.
 long getDepictID()
           
 Depictor<? extends DepictedObject> getDepictor()
           
protected  com.globalmentor.event.EventListenerManager getEventListenerManager()
           
 int hashCode()
           
 void processEvent(PlatformEvent event)
          Processes an event from the platform.
 java.lang.String toString()
           
 
Methods inherited from class com.guiseframework.event.GuiseBoundPropertyObject
getSession
 
Methods inherited from class com.globalmentor.beans.BoundPropertyObject
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, createPostponedPropertyChangeEvent, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getForwardPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, getPropertyChangeSupport, getRepeatPropertyChangeListener, getRepeatVetoableChangeListener, getVetoableChangeListeners, getVetoableChangeListeners, getVetoableChangeSupport, hasPropertyChangeListeners, hasVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.guiseframework.platform.DepictedObject
getSession
 

Constructor Detail

AbstractDepictedObject

public AbstractDepictedObject()
Default constructor.

Throws:
java.lang.IllegalStateException - if no depictor is registered for this object type.
Method Detail

getEventListenerManager

protected com.globalmentor.event.EventListenerManager getEventListenerManager()
Returns:
The object managing event listeners.

getDepictID

public long getDepictID()
Specified by:
getDepictID in interface DepictedObject
Returns:
The object depiction identifier.

getDepictor

public Depictor<? extends DepictedObject> getDepictor()
Specified by:
getDepictor in interface DepictedObject
Returns:
The depictor for this object.

processEvent

public void processEvent(PlatformEvent event)
Processes an event from the platform. This method delegates to the currently installed depictor.

Specified by:
processEvent in interface DepictedObject
Parameters:
event - The event to be processed.
Throws:
java.lang.IllegalArgumentException - if the given event is a relevant DepictEvent with a source of a different depicted object.
See Also:
getDepictor(), Depictor.processEvent(PlatformEvent)

depict

public void depict()
            throws java.io.IOException
Updates the depiction of the object. The depiction will be marked as updated. This method delegates to the currently installed depictor.

Specified by:
depict in interface DepictedObject
Throws:
java.io.IOException - if there is an error updating the depiction.
See Also:
getDepictor(), Depictor.depict()

exportTransfer

public Transferable<?> exportTransfer()
Exports data from the depicted object. This version returns null. Each export strategy, from last to first added, will be asked to export data, until one is successful.

Specified by:
exportTransfer in interface DepictedObject
Returns:
The object to be transferred, or null if no data can be transferred.

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object
Returns:
A hash code value for the object.

equals

public boolean equals(java.lang.Object object)
Indicates whether some other object is "equal to" this one. This implementation returns whether the object is a depicted object with the same ID.

Overrides:
equals in class java.lang.Object
Parameters:
object - The reference object with which to compare.
Returns:
true if this object is equivalent to the given object.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
A string representation of this depicted object.


Copyright © 2005-2010 GlobalMentor, Inc. All Rights Reserved.