Class WebImageActionControlDepictor<C extends ImageComponent & ActionControl>
- java.lang.Object
-
- io.guise.framework.platform.AbstractDepictor<C>
-
- io.guise.framework.platform.AbstractComponentDepictor<C>
-
- io.guise.framework.platform.web.AbstractWebComponentDepictor<C>
-
- io.guise.framework.platform.web.AbstractSimpleWebComponentDepictor<C>
-
- io.guise.framework.platform.web.AbstractWebActionControlDepictor<C>
-
- io.guise.framework.platform.web.WebLinkDepictor<C>
-
- io.guise.framework.platform.web.WebImageActionControlDepictor<C>
-
- Type Parameters:
C
- The type of component being controlled.
- All Implemented Interfaces:
ComponentDepictor<C>
,Depictor<C>
,WebComponentDepictor<C>
,WebDepictor<C>
- Direct Known Subclasses:
WebImageBooleanSelectActionControlViewer
public class WebImageActionControlDepictor<C extends ImageComponent & ActionControl> extends WebLinkDepictor<C>
Strategy for rendering an image action control as an XHTML<img>
inside a<a>
element. If a link has aNavigateActionListener
as one of its action listeners, the generatedhref
URI will be that of the listener, and atarget
attribute will be set of the listener specifies a viewport ID. This depictor supportsPendingImageComponent
.This view uses the following attributes which are not in XHTML:
guise:originalSrc
guise:rolloverSrc
- Author:
- Garret Wilson
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class io.guise.framework.platform.AbstractComponentDepictor
AbstractComponentDepictor.DepictedCompositeComponentListener
-
Nested classes/interfaces inherited from class io.guise.framework.platform.AbstractDepictor
AbstractDepictor.DepictedPropertyChangeListener
-
-
Field Summary
-
Fields inherited from class io.guise.framework.platform.web.AbstractWebComponentDepictor
BODY_END_PATTERN, BODY_START_PATTERN
-
Fields inherited from class io.guise.framework.platform.AbstractComponentDepictor
childPropertyChangeListener
-
Fields inherited from interface io.guise.framework.platform.Depictor
GENERAL_PROPERTY
-
-
Constructor Summary
Constructors Constructor Description WebImageActionControlDepictor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
depictBody()
Depicts the body of the component.protected void
depictedObjectPropertyChange(java.beans.PropertyChangeEvent propertyChangeEvent)
Called when a depicted object bound property is changed.protected java.util.Map<java.lang.String,java.lang.Object>
getBodyStyles()
Retrieves the styles for the body element of the component.protected java.net.URI
getImageURI()
Determines the image URI to use for this component.protected java.util.Map<java.lang.String,java.lang.Object>
getOuterStyles()
Retrieves the styles for the outer element of the component.protected java.net.URI
getRolloverImageURI()
Determines the rollover image URI to use for this component.void
installed(C component)
Called when the depictor is installed in a depicted object.void
uninstalled(C component)
Called when the depictor is uninstalled from a depicted object.-
Methods inherited from class io.guise.framework.platform.web.WebLinkDepictor
depictBegin, getNavigateActionListener, writeSupplementaryIcons
-
Methods inherited from class io.guise.framework.platform.web.AbstractWebActionControlDepictor
getBaseStyleIDs, processEvent
-
Methods inherited from class io.guise.framework.platform.web.AbstractWebComponentDepictor
addFlowStyleIDs, decorateID, depict, depictEnd, getBackgroundColor, getBodyStyleIDs, getColor, getDepictContext, getDepictName, getLabelStyles, getLabelStyles, getLabelStyles, getLocalName, getNamespaceURI, getPlatform, hasLabelContent, hasLabelContent, hasLabelContent, hasLabelContent, isEmptyElementAllowed, isMouseListener, writeBodyIDClassAttributes, writeClassAttribute, writeDirectionAttribute, writeDirectionAttribute, writeErrorMessage, writeFloatClear, writeIDAttribute, writeIDClassAttributes, writeLabel, writeLabelContent, writeLabelContent, writeLabelContent, writeLabelContent, writeLabelContent, writeLabelContent, writeParameterInputs, writeStyleAttribute, writeText
-
Methods inherited from class io.guise.framework.platform.AbstractComponentDepictor
depictChild, depictChildren, getDepictedCompositeComponentListener, getErrorMessage
-
Methods inherited from class io.guise.framework.platform.AbstractDepictor
getDepictedObject, getDepictedPropertyChangeListener, getIgnoredProperties, getModifiedProperties, getSession, isDepicted, setDepicted, setPropertyModified
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.guise.framework.platform.Depictor
getDepictedObject, getSession, isDepicted, setDepicted
-
-
-
-
Method Detail
-
installed
public void installed(C component)
Called when the depictor is installed in a depicted object.This version listens for property changes of a
PropertyBindable
object.This version listens for list changes of a
ListListenable
object.If the component is a container, this version listens for container events and marks the view as needing updated.
This version requests a poll interval if the image is pending.
- Specified by:
installed
in interfaceDepictor<C extends ImageComponent & ActionControl>
- Overrides:
installed
in classAbstractComponentDepictor<C extends ImageComponent & ActionControl>
- Parameters:
component
- The depictedObject into which this depictor is being installed.- See Also:
AbstractDepictor.depictedPropertyChangeListener
-
uninstalled
public void uninstalled(C component)
Called when the depictor is uninstalled from a depicted object.This version stop listening for property changes of a
PropertyBindable
object.This version stops listening for list changes of a
ListListenable
object.If the component is a container, this version stops listening for container events.
This version requests any poll interval.
- Specified by:
uninstalled
in interfaceDepictor<C extends ImageComponent & ActionControl>
- Overrides:
uninstalled
in classAbstractComponentDepictor<C extends ImageComponent & ActionControl>
- Parameters:
component
- The depicted object from which this depictor is being uninstalled.- See Also:
AbstractDepictor.depictedPropertyChangeListener
-
depictedObjectPropertyChange
protected void depictedObjectPropertyChange(java.beans.PropertyChangeEvent propertyChangeEvent)
Called when a depicted object bound property is changed.This method may also be called for objects related to the depicted object, so if specific properties are checked the event source should be verified to be the depicted object.
This implementation marks the property as being modified if the property is not an ignored property.
This implementation marks the property as being modified if the property is not an ignored property.
This implementation requests or discontinues a poll interval when the pending state changes.
- Overrides:
depictedObjectPropertyChange
in classAbstractComponentDepictor<C extends ImageComponent & ActionControl>
- Parameters:
propertyChangeEvent
- An event object describing the event source and the property that has changed.- See Also:
PendingImageModel.isImagePending()
-
getImageURI
protected java.net.URI getImageURI()
Determines the image URI to use for this component. If the delegate image is aPendingImageComponent
with a pending image, this version return thePendingImageComponent.getPendingImageURI()
value. Otherwise, this version returns the delegate image'sImageModel.getImageURI()
value.- Returns:
- The image to use for the component, or
null
if there should not be an image.
-
getRolloverImageURI
protected java.net.URI getRolloverImageURI()
Determines the rollover image URI to use for this component. This implementation returnsnull
.- Returns:
- The rollover image to use for the component, or
null
if there should be no rollover image.
-
getOuterStyles
protected java.util.Map<java.lang.String,java.lang.Object> getOuterStyles()
Retrieves the styles for the outer element of the component.This version returns the style for color.
This version combines the body styles with the outer styles.
This version returns an empty map of styles.
- Overrides:
getOuterStyles
in classAbstractSimpleWebComponentDepictor<C extends ImageComponent & ActionControl>
- Returns:
- The styles for the outer element of the component, mapped to CSS property names.
-
getBodyStyles
protected java.util.Map<java.lang.String,java.lang.Object> getBodyStyles()
Retrieves the styles for the body element of the component.This version returns the style for background color.
This version lowers the opacity if the control is disabled.
This adds layout fixes for images within tables.
- Overrides:
getBodyStyles
in classAbstractWebActionControlDepictor<C extends ImageComponent & ActionControl>
- Returns:
- The styles for the body element of the component, mapped to CSS property names.
-
depictBody
protected void depictBody() throws java.io.IOException
Depicts the body of the component.This version depicts the children of the component.
This version increases and decreases the indention level before and after depicting the children, respectively.
This version renders any label information.
This version renders the contained image element.
- Overrides:
depictBody
in classWebLinkDepictor<C extends ImageComponent & ActionControl>
- Throws:
java.io.IOException
- if there is an error updating the depiction.- See Also:
AbstractComponentDepictor.depictChildren()
-
-