public class Canvas extends Resource
A virtual container that represents a page or view and has content resources associated with it or with parts of it.
The canvas provides a frame of reference for the layout of the content. The concept of a canvas is borrowed from standards like PDF and HTML, or applications like Photoshop and Powerpoint, where the display starts from a blank canvas and images, text and other resources are “painted” on to it.
| Constructor and Description |
|---|
Canvas(String identifier) |
Canvas(String identifier,
String label) |
| Modifier and Type | Method and Description |
|---|---|
Canvas |
addIIIFImage(String serviceUrl,
ImageApiProfile profile) |
Canvas |
addImage(ImageContent first,
ImageContent... rest) |
Canvas |
addOtherContent(AnnotationList first,
AnnotationList... rest) |
Integer |
getHeight() |
List<Annotation> |
getImages() |
List<AnnotationList> |
getOtherContent() |
Set<ViewingHint.Type> |
getSupportedViewingHintTypes() |
String |
getType() |
Integer |
getWidth() |
void |
setHeight(Integer height) |
void |
setImages(List<Annotation> images)
Sets the image annotations on this canvas.
|
void |
setOtherContent(List<AnnotationList> otherContent) |
void |
setWidth(Integer width) |
void |
setWidthFromImage(Annotation imageAnno) |
addAttribution, addDescription, addLabel, addLicense, addLogo, addLogo, addMetadata, addMetadata, addRelated, addRendering, addSeeAlso, addService, addThumbnail, addViewingHint, addWithin, getAttribution, getAttributionString, getDescription, getDescriptionString, getFirstLicense, getIdentifier, getLabel, getLabelString, getLicenses, getLogos, getLogoUri, getMetadata, getRelated, getRenderings, getSeeAlso, getServices, getThumbnail, getThumbnails, getViewingHints, getWithin, setAttribution, setDescription, setIdentifier, setLabel, setLicenses, setLogos, setRelated, setRenderings, setSeeAlso, setServices, setThumbnails, setViewingHints, setWithin, toString, verifyRenderingpublic static final String TYPE
public Canvas(String identifier)
public List<Annotation> getImages()
public void setImages(List<Annotation> images) throws IllegalArgumentException
Sets the image annotations on this canvas. Must all be instances of ImageContent
IllegalArgumentException - if at least one of the image annotations is not an ImageContentpublic Canvas addIIIFImage(String serviceUrl, ImageApiProfile profile)
public Canvas addImage(ImageContent first, ImageContent... rest)
public void setWidthFromImage(Annotation imageAnno)
public Integer getWidth()
public Integer getHeight()
public void setWidth(Integer width)
public void setHeight(Integer height)
public List<AnnotationList> getOtherContent()
public void setOtherContent(List<AnnotationList> otherContent)
public Canvas addOtherContent(AnnotationList first, AnnotationList... rest)
public Set<ViewingHint.Type> getSupportedViewingHintTypes()
getSupportedViewingHintTypes in class ResourceCopyright © 2018. All rights reserved.