Interface RenderingHintsPreviewImage
- All Known Implementing Classes:
RenderingHintsPreviewImageImpl
public interface RenderingHintsPreviewImage
Contains hints for rendering a preview image, e.g. in a webpage as HTML.
These are related to an
This makes it possible to use/embed an image in several projects and locations, each time rendered individually.
The rendering hints therefore are kept separate in an own rendering hints object and have to be stored in conjunction with each specific use case.
These are related to an
ImageFileResource but there may exist more
than one rendering hints container, each per individual use case.This makes it possible to use/embed an image in several projects and locations, each time rendered individually.
The rendering hints therefore are kept separate in an own rendering hints object and have to be stored in conjunction with each specific use case.
Example:
A person object has a portrait photo as preview image. On the detail page of this person (= use
case) specific caption and link are defined.
So at the person storage an ImageFileResource is defined as preview
image and individual filled rendering hints are stored beside at the person object (and not
"centrally" at the reusable ImageFileResource).
This makes it possible to reuse an image in different use cases but with individual alt-text, caption, (mouseover) title and link.
-
Method Summary
Modifier and Type Method Description LocalizedTextgetAltText()LocalizedTextgetCaption()java.net.URLgetTargetLink()LocalizedTextgetTitle()booleanisOpenLinkInNewWindow()voidsetAltText(LocalizedText altText)voidsetCaption(LocalizedText caption)voidsetOpenLinkInNewWindow(boolean openLinkInNewWindow)voidsetTargetLink(java.net.URL targetLink)voidsetTitle(LocalizedText title)
-
Method Details
-
getAltText
LocalizedText getAltText()- Returns:
- localized text that is shown as alternative if image can not be shown and for accessibility (e.g. screen-reader)
-
setAltText
- Parameters:
altText- localized text that is shown as alternative if image can not be shown and for accessibility (e.g. screen-reader)
-
getCaption
LocalizedText getCaption()- Returns:
- localized text that may be shown e.g. as "subtitle" under an image
-
setCaption
- Parameters:
caption- localized text that may be shown e.g. as "subtitle" under an image
-
getTitle
LocalizedText getTitle()- Returns:
- localized text that may be shown e.g. as "mouseover" if image is rendered in an HTML page
-
setTitle
- Parameters:
title- localized text that may be shown e.g. as "mouseover" if image is rendered in an HTML page
-
getTargetLink
java.net.URL getTargetLink()- Returns:
- url that is linked with the image and/or caption, e.g. used for click on image/caption as target location
-
setTargetLink
void setTargetLink(java.net.URL targetLink)- Parameters:
targetLink- url that is linked with the image and/or caption, e.g. used for click on image/caption as target location
-
isOpenLinkInNewWindow
boolean isOpenLinkInNewWindow()- Returns:
- if targetLink should be opened in new window
-
setOpenLinkInNewWindow
void setOpenLinkInNewWindow(boolean openLinkInNewWindow)- Parameters:
openLinkInNewWindow- "true" if targetLink should be opened in new window
-