Class Image
- All Implemented Interfaces:
Serializable,Cloneable,Copyable,DictionaryBean,UifDictionaryBean,Component,Ordered,ScriptEventSupport,ContentElement,LifecycleElement,org.springframework.core.Ordered
<IMG> tag- Author:
- Kuali Rice Team (rice.collab@kuali.org)
- See Also:
-
Field Summary
Fields inherited from class org.kuali.rice.krad.uif.component.ComponentBase
templateOptionsFields inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase
componentCode, namespaceCodeFields inherited from interface org.kuali.rice.krad.uif.component.Ordered
INITIAL_ORDER_VALUEFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcompleteValidation(ValidationTrace tracer) Validates different requirements of component compiling a series of reports detailing information on errors found in the component.Provides alternate information for the image elementRetrieves theHeadercomponent used to display the caption for this imageRetrieves the caption text for this imageGets theMessagecomponent used to display the cutline.Retrieves the cutline text for this imageReturns the height style attribute of this imagereturns the URL of this imagegetWidth()Returns the width style attribute of the imagebooleanSpecifies whether the image caption is to be displayed above or below the imagevoidperformApplyModel(Object model, LifecycleElement parent) Performs the following steps Set the caption header text on the caption header Set the cutline text on the cutline message The following updates are done here: Evaluate the progressive render condition (if set) and combine with the current render status to set the render status Called after the initialize phase to perform conditional logic based on the model datavoidperformInitialization(Object model) The following initialization is performed: Initializes the cutline message and caption header components if necessary The following updates are done here: Invoke performInitialize on component modifiers Initializes the componentvoidsetAltText(String altText) Sets the alternate text property for this imagevoidsetCaptionHeader(Header captionHeader) Sets the Header used to display the caption for this imagevoidsetCaptionHeaderPlacementAboveImage(boolean captionHeaderPlacementAboveImage) Sets whether the image caption is to be displayed above or below the imagevoidsetCaptionHeaderText(String captionHeaderText) Sets the text displayed as of the caption for the picturevoidsetCutlineMessage(Message cutlineMessage) Sets the Message component used to display the cutline for this imagevoidsetCutlineText(String cutlineText) Sets the cutline text that describes this imagevoidSets the height style attribute of the image.voidSets the URL of this imagevoidSets the width style attribute of the imageMethods inherited from class org.kuali.rice.krad.uif.element.ContentElementBase
afterEvaluateExpression, getComponentTypeNameMethods inherited from class org.kuali.rice.krad.uif.component.ComponentBase
addAriaAttribute, addDataAttribute, addScriptDataAttribute, addStyleClass, addWrapperCssClass, appendToStyle, checkMutable, clone, getAdditionalComponentsToRefresh, getAdditionalComponentsToRefreshJs, getAdditionalCssClasses, getAdditionalTemplates, getAlign, getAriaAttributes, getAriaAttributesAsString, getCanCopyOnReadOnly, getCellWidth, getColSpan, getComponentModifiers, getComponentSecurity, getConditionalRefresh, getConditionalRefreshConditionJs, getConditionalRefreshControlNames, getContainerIdSuffix, getContext, getCssClasses, getCssGridSizes, getDataAttributes, getEventHandlerScript, getExcludeIf, getExcludeUnless, getFieldsToSendOnRefresh, getFinalizeMethodAdditionalArguments, getFinalizeMethodInvoker, getFinalizeMethodToCall, getId, getLibraryCssClasses, getMethodToCallOnRefresh, getOnBlurScript, getOnChangeScript, getOnClickScript, getOnCloseScript, getOnDblClickScript, getOnDocumentReadyScript, getOnFocusScript, getOnInputScript, getOnKeyDownScript, getOnKeyPressScript, getOnKeyUpScript, getOnLoadScript, getOnMouseDownScript, getOnMouseMoveScript, getOnMouseOutScript, getOnMouseOverScript, getOnMouseUpScript, getOnSubmitScript, getOnUnloadScript, getOrder, getPhasePathMapping, getPostRenderContent, getPreRenderContent, getProgressiveDisclosureConditionJs, getProgressiveDisclosureControlNames, getProgressiveRender, getPropertyReplacerComponents, getPropertyReplacers, getReadOnly, getRefreshTimer, getRefreshWhenChangedPropertyNames, getRenderedHtmlOutput, getRequired, getRole, getRowSpan, getScriptDataAttributes, getScriptDataAttributesJs, getSimpleDataAttributes, getStyle, getStyleClassesAsString, getTemplate, getTemplateName, getTemplateOptions, getTemplateOptionsJSString, getTitle, getToolTip, getValign, getViewPath, getViewStatus, getWrapperCssClasses, getWrapperCssClassesAsString, getWrapperStyle, initializeComponentSecurity, isDisableSessionPersistence, isDisclosedByAction, isEditAuthz, isFinal, isForceSessionPersistence, isHidden, isInitialized, isModelApplied, isMutable, isOmitFromFormPost, isProgressiveRenderAndRefresh, isProgressiveRenderViaAJAX, isRefreshedByAction, isRender, isRendered, isResetDataOnRefresh, isRetrieveViaAjax, isSelfRendered, isSkipInTabOrder, isViewAuthz, notifyCompleted, performFinalize, pushAllToContext, pushObjectToContext, pushToPropertyReplacerContext, setAdditionalComponentsToRefresh, setAdditionalCssClasses, setAlign, setAriaAttributes, setCanCopyOnReadOnly, setCellWidth, setColSpan, setComponentModifiers, setComponentSecurity, setConditionalRefresh, setContainerIdSuffix, setContext, setCssClasses, setCssGridSizes, setDataAttributes, setDisableSessionPersistence, setDisclosedByAction, setEditAuthz, setExcludeIf, setExcludeUnless, setFieldsToSendOnRefresh, setFinalizeMethodAdditionalArguments, setFinalizeMethodInvoker, setFinalizeMethodToCall, setForceSessionPersistence, setHidden, setId, setLibraryCssClasses, setMethodToCallOnRefresh, setOmitFromFormPost, setOnBlurScript, setOnChangeScript, setOnClickScript, setOnCloseScript, setOnDblClickScript, setOnDocumentReadyScript, setOnFocusScript, setOnInputScript, setOnKeyDownScript, setOnKeyPressScript, setOnKeyUpScript, setOnLoadScript, setOnMouseDownScript, setOnMouseMoveScript, setOnMouseOutScript, setOnMouseOverScript, setOnMouseUpScript, setOnSubmitScript, setOnUnloadScript, setOrder, setPhasePathMapping, setPostRenderContent, setPreRenderContent, setProgressiveRender, setProgressiveRenderAndRefresh, setProgressiveRenderViaAJAX, setPropertyReplacers, setReadOnly, setRefreshedByAction, setRefreshTimer, setRefreshWhenChangedPropertyNames, setRender, setRenderedHtmlOutput, setRequired, setResetDataOnRefresh, setRetrieveViaAjax, setRole, setRowSpan, setScriptDataAttributes, setSelfRendered, setSkipInTabOrder, setStyle, setTemplate, setTemplateName, setTemplateOptions, setTemplateOptionsJSString, setTitle, setToolTip, setValign, setViewAuthz, setViewPath, setViewStatus, setWrapperCssClasses, setWrapperStyle, skipLifecycleMethods inherited from class org.kuali.rice.krad.datadictionary.uif.UifDictionaryBeanBase
getExpressionGraph, getPropertyExpression, getPropertyExpressions, setExpressionGraph, setPropertyExpressionsMethods inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase
copy, dataDictionaryPostProcessing, getComponentCode, getNamespaceCode, setComponentCode, setNamespaceCodeMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.kuali.rice.krad.uif.component.Component
addAriaAttribute, addDataAttribute, addScriptDataAttribute, addStyleClass, addWrapperCssClass, appendToStyle, getAdditionalComponentsToRefresh, getAdditionalComponentsToRefreshJs, getAdditionalCssClasses, getAdditionalTemplates, getAlign, getAriaAttributes, getAriaAttributesAsString, getCanCopyOnReadOnly, getCellWidth, getColSpan, getComponentModifiers, getComponentSecurity, getConditionalRefresh, getConditionalRefreshConditionJs, getConditionalRefreshControlNames, getContext, getCssClasses, getCssGridSizes, getDataAttributes, getEventHandlerScript, getExcludeIf, getExcludeUnless, getFieldsToSendOnRefresh, getFinalizeMethodAdditionalArguments, getFinalizeMethodInvoker, getFinalizeMethodToCall, getLibraryCssClasses, getMethodToCallOnRefresh, getOrder, getPostRenderContent, getPreRenderContent, getProgressiveDisclosureConditionJs, getProgressiveDisclosureControlNames, getProgressiveRender, getPropertyReplacerComponents, getPropertyReplacers, getReadOnly, getRefreshTimer, getRefreshWhenChangedPropertyNames, getRenderedHtmlOutput, getRequired, getRole, getRowSpan, getScriptDataAttributes, getScriptDataAttributesJs, getSimpleDataAttributes, getStyle, getStyleClassesAsString, getTemplate, getTemplateName, getTemplateOptions, getTemplateOptionsJSString, getTitle, getToolTip, getValign, getWrapperCssClasses, getWrapperStyle, isDisableSessionPersistence, isDisclosedByAction, isForceSessionPersistence, isHidden, isOmitFromFormPost, isProgressiveRenderAndRefresh, isProgressiveRenderViaAJAX, isRefreshedByAction, isRendered, isResetDataOnRefresh, isRetrieveViaAjax, isSelfRendered, setAdditionalComponentsToRefresh, setAdditionalCssClasses, setAlign, setAriaAttributes, setCanCopyOnReadOnly, setCellWidth, setColSpan, setComponentModifiers, setComponentSecurity, setConditionalRefresh, setContext, setCssClasses, setCssGridSizes, setDataAttributes, setDisableSessionPersistence, setDisclosedByAction, setFieldsToSendOnRefresh, setForceSessionPersistence, setHidden, setLibraryCssClasses, setOmitFromFormPost, setOrder, setPostRenderContent, setPreRenderContent, setProgressiveRender, setProgressiveRenderAndRefresh, setProgressiveRenderViaAJAX, setPropertyReplacers, setReadOnly, setRefreshedByAction, setRefreshTimer, setRefreshWhenChangedPropertyNames, setRenderedHtmlOutput, setRequired, setResetDataOnRefresh, setRetrieveViaAjax, setRole, setRowSpan, setScriptDataAttributes, setSelfRendered, setStyle, setTemplate, setTemplateName, setTemplateOptions, setTemplateOptionsJSString, setTitle, setToolTip, setValign, setViewStatus, setWrapperCssClasses, setWrapperStyleMethods inherited from interface org.kuali.rice.krad.datadictionary.DictionaryBean
dataDictionaryPostProcessing, getComponentCode, getNamespaceCodeMethods inherited from interface org.kuali.rice.krad.uif.util.LifecycleElement
checkMutable, getContainerIdSuffix, getId, getPhasePathMapping, getViewPath, getViewStatus, isFinal, isInitialized, isModelApplied, isMutable, isRender, notifyCompleted, performFinalize, pushAllToContext, pushObjectToContext, setContainerIdSuffix, setId, setPhasePathMapping, setRender, setViewPath, skipLifecycleMethods inherited from interface org.kuali.rice.krad.uif.component.ScriptEventSupport
getOnBlurScript, getOnChangeScript, getOnClickScript, getOnCloseScript, getOnDblClickScript, getOnDocumentReadyScript, getOnFocusScript, getOnInputScript, getOnKeyDownScript, getOnKeyPressScript, getOnKeyUpScript, getOnLoadScript, getOnMouseDownScript, getOnMouseMoveScript, getOnMouseOutScript, getOnMouseOverScript, getOnMouseUpScript, getOnSubmitScript, getOnUnloadScript, setOnBlurScript, setOnChangeScript, setOnClickScript, setOnCloseScript, setOnDblClickScript, setOnDocumentReadyScript, setOnFocusScript, setOnInputScript, setOnKeyDownScript, setOnKeyPressScript, setOnKeyUpScript, setOnLoadScript, setOnMouseDownScript, setOnMouseMoveScript, setOnMouseOutScript, setOnMouseOverScript, setOnMouseUpScript, setOnSubmitScript, setOnUnloadScriptMethods inherited from interface org.kuali.rice.krad.datadictionary.uif.UifDictionaryBean
getExpressionGraph, getPropertyExpression, getPropertyExpressions, setExpressionGraph, setPropertyExpressions
-
Constructor Details
-
Image
public Image()
-
-
Method Details
-
performInitialization
The following initialization is performed:- Initializes the cutline message and caption header components if necessary
- Invoke performInitialize on component modifiers
Where components can set defaults and setup other necessary state. The initialize method should only be called once per component lifecycle and is invoked within the initialize phase of the view lifecylce.
- Specified by:
performInitializationin interfaceLifecycleElement- Overrides:
performInitializationin classComponentBase- Parameters:
model- - object instance containing the view data- See Also:
-
performApplyModel
Performs the following steps- Set the caption header text on the caption header
- Set the cutline text on the cutline message
- Evaluate the progressive render condition (if set) and combine with the current render status to set the render status
Where components can perform conditional logic such as dynamically generating new fields or setting field state based on the given data
- Specified by:
performApplyModelin interfaceLifecycleElement- Overrides:
performApplyModelin classComponentBase- Parameters:
model- - Top level object containing the data (could be the form or a top level business object, dto)parent- parent lifecycle element
-
getSource
returns the URL of this image- Returns:
- the URL of this image.
-
setSource
Sets the URL of this image- Parameters:
source- the URL of this image
-
getAltText
Provides alternate information for the image elementThe altText property specifies an alternate text for an image. It is displayed by the browser if the image cannot be displayed. This is especially important for accessibility, because screen readers can't understand images, but rather will read aloud the alternative text assigned to them.
Some best practices:- spacer images, bullets, and icons should have the altText set to null or the empty string. This will prevent screen readers from announcing it.
- Make the altText message as short and succinct as possible
- Describe the content of the image and nothing more
- Returns:
- alternative information about this image
-
setAltText
Sets the alternate text property for this image- Parameters:
altText- the alternative information about the image
-
getHeight
Returns the height style attribute of this imageThe default unit of measure is pixels.
It is good practice to specify both the height and width attributes for an image. If these attributes are set, the space required for the image is reserved when the page is loaded. However, without these attributes, the browser does not know the size of the image. The effect will be that the page layout will change while the images load.- Returns:
- the height style attribute of this image
-
setHeight
Sets the height style attribute of the image.- Parameters:
height- the height of the image
-
getWidth
Returns the width style attribute of the imageThe default unit of measure is pixels.
It is good practice to specify both the height and width attributes for an image. If these attributes are set, the space required for the image is reserved when the page is loaded. However, without these attributes, the browser does not know the size of the image. The effect will be that the page layout will change while the images load.- Specified by:
getWidthin interfaceComponent- Overrides:
getWidthin classComponentBase- Returns:
- the width of this image
-
setWidth
Sets the width style attribute of the image- Specified by:
setWidthin interfaceComponent- Overrides:
setWidthin classComponentBase- Parameters:
width- the width of this image
-
getCaptionHeaderText
Retrieves the caption text for this imageThe caption text is a headline for the picture. It may be displayed either above or below the picture.
- Returns:
- the caption
-
setCaptionHeaderText
Sets the text displayed as of the caption for the picture- Parameters:
captionHeaderText- the caption text
-
getCaptionHeader
Retrieves theHeadercomponent used to display the caption for this image- Returns:
- Header component which wraps the caption text.
-
setCaptionHeader
Sets the Header used to display the caption for this image- Parameters:
captionHeader- header component which wraps the caption text
-
getCutlineText
Retrieves the cutline text for this imageThe cutline text give more detailed information about the picture. Generally it describes the who, what, where, when of this image.
- Returns:
- the cutline text.
-
setCutlineText
Sets the cutline text that describes this image- Parameters:
cutlineText- the cutline text that describes this image
-
getCutlineMessage
Gets theMessagecomponent used to display the cutline.Wrapping the cutline text with a Message component allows styling of the cutline text.
- Returns:
- Message component wrapping the cutline
-
setCutlineMessage
Sets the Message component used to display the cutline for this image- Parameters:
cutlineMessage- Message
-
isCaptionHeaderPlacementAboveImage
public boolean isCaptionHeaderPlacementAboveImage()Specifies whether the image caption is to be displayed above or below the image- Returns:
- true if the caption is to be displayed above the image. false if displayed below the image.
-
setCaptionHeaderPlacementAboveImage
public void setCaptionHeaderPlacementAboveImage(boolean captionHeaderPlacementAboveImage) Sets whether the image caption is to be displayed above or below the image- Parameters:
captionHeaderPlacementAboveImage- true displays above image, false displays below image
-
completeValidation
Validates different requirements of component compiling a series of reports detailing information on errors found in the component. Used by the RiceDictionaryValidator.- Specified by:
completeValidationin interfaceComponent- Overrides:
completeValidationin classComponentBase- Parameters:
tracer- Record of component's location
-