Package fr.igred.omero.roi
Class TextWrapper
- java.lang.Object
-
- fr.igred.omero.GenericObjectWrapper<T>
-
- fr.igred.omero.AnnotatableWrapper<T>
-
- fr.igred.omero.roi.GenericShapeWrapper<TextData>
-
- fr.igred.omero.roi.TextWrapper
-
public class TextWrapper extends GenericShapeWrapper<TextData>
Class containing an TextData.Wraps function calls to the TextData contained.
-
-
Field Summary
-
Fields inherited from class fr.igred.omero.roi.GenericShapeWrapper
ANNOTATION_LINK
-
Fields inherited from class fr.igred.omero.GenericObjectWrapper
data
-
-
Constructor Summary
Constructors Constructor Description TextWrapper()
Constructor of the TextWrapper class using a new empty ShapeData.TextWrapper(TextRoi text)
Constructor of the TextWrapper class using an ImageJ TextRoi.TextWrapper(java.lang.String text, double x, double y)
Creates a new instance of the TextWrapper, sets the centre and major, minor axes.TextWrapper(TextData text)
Constructor of the TextWrapper class using a TextData.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double[]
getCoordinates()
Gets the coordinates of the TextData shape.java.lang.String
getText()
Gets the text on the ShapeData.double
getX()
Returns the x-coordinate of the shape.double
getY()
Returns the y coordinate of the shape.void
setCoordinates(double[] coordinates)
Sets the coordinates of the TextData object.void
setCoordinates(double x, double y)
Sets the coordinates of the TextData shape.void
setText(java.lang.String text)
Sets the text on the ShapeData.void
setX(double x)
Sets the x-coordinate of the shape.void
setY(double y)
Sets the y-coordinate of the shape.java.awt.Shape
toAWTShape()
Converts the shape to anShape
.Roi
toImageJ()
Converts shape to ImageJ ROI.-
Methods inherited from class fr.igred.omero.roi.GenericShapeWrapper
annotationLinkType, asShapeData, copyFromIJRoi, copyToIJRoi, createTransformedAWTShape, getBoundingBox, getC, getFill, getFontSize, getStroke, getT, getZ, link, setC, setCZT, setFill, setFontSize, setStroke, setT, setTransform, setTransform, setZ, toAWTTransform
-
Methods inherited from class fr.igred.omero.AnnotatableWrapper
addAndReplaceFile, addAndReplaceFile, addAndReplaceTable, addAndReplaceTable, addFile, addFileAnnotation, addKeyValuePair, addMapAnnotation, addPairKeyValue, addTable, addTag, addTag, addTag, addTags, addTags, copyAnnotationLinks, getAnnotations, getFileAnnotations, getKeyValuePairs, getMapAnnotations, getMyRating, getTable, getTables, getTags, getValue, isLinked, link, link, linkIfNotLinked, rate, removeLink, unlink
-
Methods inherited from class fr.igred.omero.GenericObjectWrapper
asDataObject, canAnnotate, canChgrp, canChown, canDelete, canEdit, canLink, delete, distinct, flatten, getCreated, getGroupId, getId, getOwner, saveAndUpdate, toString, wrap, wrap
-
-
-
-
Constructor Detail
-
TextWrapper
public TextWrapper(TextData text)
Constructor of the TextWrapper class using a TextData.- Parameters:
text
- The TextData to wrap.
-
TextWrapper
public TextWrapper()
Constructor of the TextWrapper class using a new empty ShapeData.
-
TextWrapper
public TextWrapper(TextRoi text)
Constructor of the TextWrapper class using an ImageJ TextRoi.- Parameters:
text
- An ImageJ TextRoi.
-
TextWrapper
public TextWrapper(java.lang.String text, double x, double y)
Creates a new instance of the TextWrapper, sets the centre and major, minor axes.- Parameters:
text
- Object text.x
- x-coordinate of the shape.y
- y-coordinate of the shape.
-
-
Method Detail
-
getText
public java.lang.String getText()
Gets the text on the ShapeData.- Specified by:
getText
in classGenericShapeWrapper<TextData>
- Returns:
- the text
-
setText
public void setText(java.lang.String text)
Sets the text on the ShapeData.- Specified by:
setText
in classGenericShapeWrapper<TextData>
- Parameters:
text
- the text
-
toAWTShape
public java.awt.Shape toAWTShape()
Converts the shape to anShape
.- Specified by:
toAWTShape
in classGenericShapeWrapper<TextData>
- Returns:
- The converted AWT Shape.
-
getX
public double getX()
Returns the x-coordinate of the shape.- Returns:
- See above.
-
setX
public void setX(double x)
Sets the x-coordinate of the shape.- Parameters:
x
- See above.
-
getY
public double getY()
Returns the y coordinate of the shape.- Returns:
- See above.
-
setY
public void setY(double y)
Sets the y-coordinate of the shape.- Parameters:
y
- See above.
-
setCoordinates
public void setCoordinates(double x, double y)
Sets the coordinates of the TextData shape.- Parameters:
x
- x-coordinate of the TextData shape.y
- y-coordinate of the TextData shape.
-
getCoordinates
public double[] getCoordinates()
Gets the coordinates of the TextData shape.- Returns:
- Array of coordinates containing {X,Y}.
-
setCoordinates
public void setCoordinates(double[] coordinates)
Sets the coordinates of the TextData object.- Parameters:
coordinates
- Array of coordinates containing {X,Y}.
-
toImageJ
public Roi toImageJ()
Converts shape to ImageJ ROI.- Overrides:
toImageJ
in classGenericShapeWrapper<TextData>
- Returns:
- An ImageJ ROI.
-
-