Package io.guise.framework.platform
Interface Depictor<O extends DepictedObject>
-
- Type Parameters:
O
- The type of object being depicted.
- All Known Subinterfaces:
Audio.Depictor<A>
,ComponentDepictor<C>
,PlatformFileCollector.Depictor<F>
,ResourceCollectControl.Depictor<C>
,WebComponentDepictor<C>
,WebDepictor<O>
- All Known Implementing Classes:
AbstractComponentDepictor
,AbstractDecoratedWebComponentDepictor
,AbstractDepictor
,AbstractSimpleWebComponentDepictor
,AbstractWebActionControlDepictor
,AbstractWebComponentDepictor
,AbstractWebDepictor
,AbstractWebFrameDepictor
,AbstractWebLayoutComponentDepictor
,AbstractWebMenuDepictor
,AbstractWebPlatformFileCollectorDepictor
,DefaultWebPlatformFileCollectorDepictor
,WebAccordionMenuDepictor
,WebApplicationFrameDepictor
,WebAudioDepictor
,WebButtonDepictor
,WebCardPanelDepictor
,WebCheckControlDepictor
,WebCustomButtonDepictor
,WebDropMenuDepictor
,WebFieldsetDepictor
,WebFileInputDepictor
,WebFlashDepictor
,WebFrameDepictor
,WebHeadingDepictor
,WebHeadingLinkDepictor
,WebIFrameLikeButtonDepictor
,WebImageActionControlDepictor
,WebImageBooleanSelectActionControlViewer
,WebImageDepictor
,WebLabelDepictor
,WebLabelPanelDepictor
,WebLayoutComponentDepictor
,WebLinkDepictor
,WebListDepictor
,WebMessageDepictor
,WebPanelDepictor
,WebPictureDepictor
,WebResourceCollectDepictor
,WebScrollControlDepictor
,WebSelectableLabelDepictor
,WebSelectDepictor
,WebSelectLinkDepictor
,WebSliderDepictor
,WebTabbedPanelDepictor
,WebTabDepictor
,WebTableDepictor
,WebTextBoxDepictor
,WebTextControlDepictor
,WebToolButtonDepictor
,WebTreeControlDepictor
,WebValueSelectLinkDepictor
public interface Depictor<O extends DepictedObject>
A strategy for depicting objects on some platform.- Author:
- Garret Wilson
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
GENERAL_PROPERTY
The property indicating general depicted object changes.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
depict()
Updates the depiction of the object.DepictContext
getDepictContext()
Retrieves information and functionality related to the current depiction on the platform.O
getDepictedObject()
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.void
uninstalled(O depictedObject)
Called when the depictor is uninstalled from a depicted object.
-
-
-
Field Detail
-
GENERAL_PROPERTY
static final java.lang.String GENERAL_PROPERTY
The property indicating general depicted object changes.- See Also:
- Constant Field Values
-
-
Method Detail
-
getSession
GuiseSession getSession()
- Returns:
- The Guise session that owns this object.
-
getPlatform
Platform getPlatform()
- Returns:
- The platform on which this depictor is depicting objects.
-
getDepictContext
DepictContext getDepictContext()
Retrieves information and functionality related to the current depiction on the platform. This method delegates toPlatform.getDepictContext()
.- Returns:
- A context for the current depiction.
- Throws:
java.lang.IllegalStateException
- if no depict context can be returned in the current depiction state.
-
getDepictedObject
O getDepictedObject()
- Returns:
- The object being depicted, or
null
if this depictor is not installed in a depicted object.
-
isDepicted
boolean isDepicted()
- Returns:
- Whether this depictor's representation of the depicted object is up to date.
-
setDepicted
void setDepicted(boolean newDepicted)
Changes the depictor's updated status. If the new depicted status istrue
, all modified properties are removed. If the new depicted status isfalse
, theGENERAL_PROPERTY
property is set as modified.- Parameters:
newDepicted
- Whether this depictor's representation of the depicted object is up to date.
-
installed
void installed(O depictedObject)
Called when the depictor is installed in a depicted object.- Parameters:
depictedObject
- The depictedObject into which this depictor is being installed.- Throws:
java.lang.NullPointerException
- if the given depicted object isnull
.java.lang.IllegalStateException
- if this depictor is already installed in a depicted object.
-
uninstalled
void uninstalled(O depictedObject)
Called when the depictor is uninstalled from a depicted object.- Parameters:
depictedObject
- The depicted object from which this depictor is being uninstalled.- Throws:
java.lang.NullPointerException
- if the given depicted object isnull
.java.lang.IllegalStateException
- if this depictor is not installed in a depicted object.
-
processEvent
void processEvent(PlatformEvent event)
Processes an event from the platform.- Parameters:
event
- The event to be processed.- Throws:
java.lang.IllegalArgumentException
- if the given event is a relevantDepictEvent
with a source of a different depicted object.
-
depict
void depict() throws java.io.IOException
Updates the depiction of the object. The depiction will be marked as updated.- Throws:
java.io.IOException
- if there is an error updating the depiction.
-
-