com.guiseframework.platform.web
Class WebImageActionControlDepictor<C extends ImageComponent & ActionControl>
java.lang.Object
com.guiseframework.platform.AbstractDepictor<C>
com.guiseframework.platform.AbstractComponentDepictor<C>
com.guiseframework.platform.web.AbstractWebComponentDepictor<C>
com.guiseframework.platform.web.AbstractSimpleWebComponentDepictor<C>
com.guiseframework.platform.web.AbstractWebActionControlDepictor<C>
com.guiseframework.platform.web.WebLinkDepictor<C>
com.guiseframework.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 a NavigateActionListener as one of its action listeners, the generated href URI will be that of the listener,
and a target attribute will be set of the listener specifies a viewport ID.
This depictor supports PendingImageComponent.
This view uses the following attributes which are not in XHTML:
guise:originalSrc
guise:rolloverSrc
- Author:
- Garret Wilson
|
Method Summary |
protected void |
depictBody()
Renders 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 com.guiseframework.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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WebImageActionControlDepictor
public WebImageActionControlDepictor()
installed
public void installed(C component)
- Called when the depictor is installed in a depicted object.
This version requests a poll interval if the image is pending.
- Specified by:
installed in interface Depictor<C extends ImageComponent & ActionControl>- Overrides:
installed in class AbstractComponentDepictor<C extends ImageComponent & ActionControl>
- Parameters:
component - The component into which this depictor is being installed.
- Throws:
java.lang.NullPointerException - if the given depicted object is null.
java.lang.IllegalStateException - if this depictor is already installed in a depicted object.- See Also:
AbstractDepictor.depictedPropertyChangeListener
uninstalled
public void uninstalled(C component)
- Called when the depictor is uninstalled from a depicted object.
This version requests any poll interval.
- Specified by:
uninstalled in interface Depictor<C extends ImageComponent & ActionControl>- Overrides:
uninstalled in class AbstractComponentDepictor<C extends ImageComponent & ActionControl>
- Parameters:
component - The component from which this depictor is being uninstalled.
- Throws:
java.lang.NullPointerException - if the given depicted object is null.
java.lang.IllegalStateException - if this depictor is not installed in a depicted object.- 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 requests or discontinues a poll interval when the pending state changes.
- Overrides:
depictedObjectPropertyChange in class AbstractComponentDepictor<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 a
PendingImageComponent with a pending image, this version return the PendingImageComponent.getPendingImageURI() value.
Otherwise, this version returns the delegate image's ImageModel.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 returns
null.
- 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 an empty map of styles.
- Overrides:
getOuterStyles in class AbstractSimpleWebComponentDepictor<C extends ImageComponent & ActionControl>
- Returns:
- The styles for the outer element of the component, mapped to CSS property names.
- See Also:
AbstractWebComponentDepictor#getBodyStyles(XMLGuiseContext, Component)
getBodyStyles
protected java.util.Map<java.lang.String,java.lang.Object> getBodyStyles()
- Retrieves the styles for the body element of the component.
This adds layout fixes for images within tables.
- Overrides:
getBodyStyles in class AbstractWebActionControlDepictor<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
- Renders the body of the component.
This version renders the contained image element.
- Overrides:
depictBody in class WebLinkDepictor<C extends ImageComponent & ActionControl>
- Throws:
java.io.IOException - if there is an error rendering the component.- See Also:
AbstractComponentDepictor.depictChildren()
Copyright © 2005-2010 GlobalMentor, Inc. All Rights Reserved.