Package de.digitalcollections.model.view
Class RenderingHintsPreviewImage
java.lang.Object
de.digitalcollections.model.view.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.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
getTitle()
int
hashCode()
boolean
void
setAltText
(LocalizedText altText) void
setCaption
(LocalizedText caption) void
setOpenLinkInNewWindow
(boolean openLinkInNewWindow) void
setTargetLink
(URL targetLink) void
setTitle
(LocalizedText title) toString()
-
Constructor Details
-
RenderingHintsPreviewImage
public RenderingHintsPreviewImage()
-
-
Method Details
-
equals
-
getAltText
- Returns:
- localized text that is shown as alternative if image can not be shown and for accessibility (e.g. screen-reader)
-
getCaption
- Returns:
- localized text that may be shown e.g. as "subtitle" under an image
-
getTargetLink
- Returns:
- url that is linked with the image and/or caption, e.g. used for click on image/caption as target location
-
getTitle
- Returns:
- localized text that may be shown e.g. as "mouseover" if image is rendered in an HTML page
-
hashCode
public int hashCode() -
isOpenLinkInNewWindow
public boolean isOpenLinkInNewWindow()- Returns:
- if targetLink should be opened in new window
-
setAltText
- Parameters:
altText
- localized text that is shown as alternative if image can not be shown and for accessibility (e.g. screen-reader)
-
setCaption
- Parameters:
caption
- localized text that may be shown e.g. as "subtitle" under an image
-
setOpenLinkInNewWindow
public void setOpenLinkInNewWindow(boolean openLinkInNewWindow) - Parameters:
openLinkInNewWindow
- "true" if targetLink should be opened in new window
-
setTargetLink
- Parameters:
targetLink
- url that is linked with the image and/or caption, e.g. used for click on image/caption as target location
-
setTitle
- Parameters:
title
- localized text that may be shown e.g. as "mouseover" if image is rendered in an HTML page
-
toString
-