public class Annotation
extends java.lang.Object
AlgorithmStep
.
AnnotationImagesList
.// create an empty images list final AnnotationImagesList ail = new AnnotationImagesList(); // and add our image resource files, e.g. by using the resource loader of the plugin ail.add("img1", resLoader.getResource("main/resources/image1.png"); ail.add("img2", resLoader.getResource("main/resources/image2.png"); // create the annotation text final String text = "<b>My Annotation</b><br>This is image one: <img src=\"img1\"><br>And this is image two: <img src=\"img2\">"; // finally create the annotation final Annotation a = new Annotation(text, ail);
Constructor and Description |
---|
Annotation(java.lang.String text)
Creates a new annotation.
|
Annotation(java.lang.String text,
AnnotationImagesList images)
Creates a new annotation.
|
Modifier and Type | Method and Description |
---|---|
AnnotationImagesList |
getImagesList()
Gets the images list of the annotation.
|
java.lang.String |
getText()
Gets the text of the annotation.
|
public Annotation(java.lang.String text) throws java.lang.IllegalArgumentException
Annotation(String, AnnotationImagesList)
to integrate images into the annotation.text
- the text of the annotation (can contain html tags to format the text, for further information see the class documentation too)java.lang.IllegalArgumentException
- public Annotation(java.lang.String text, AnnotationImagesList images) throws java.lang.IllegalArgumentException
text
- the text of the annotation (can contain html tags to format the text, for further information see the class documentation too)images
- the list of images that are used in the annotation text by using <img src="imgKey">
or null
if there are no images in the textjava.lang.IllegalArgumentException
- public java.lang.String getText()
public AnnotationImagesList getImagesList()
null