Class Annotation

java.lang.Object
com.independentsoft.office.odf.Annotation
All Implemented Interfaces:
ICellContent, IContentElement, IParagraphContent

public class Annotation extends Object implements IParagraphContent, ICellContent
Represents an OpenDocument annotation.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Initializes a new instance of the Annotation class.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add​(List list)
    Adds a List object to the content.
    void
    add​(Paragraph paragraph)
    Adds a Paragraph object to the content.
    Creates a new object that is a deep copy of the current instance.
    Gets the position of a point that is captioned.
    Gets the position of a point that is captioned.
    Contains a collection of ITextContent objects.
    Returns all content elements.
    Gets the radius of the circle used to round off the corners of a caption, rectangle, or a text-box.
    Gets the date and time when the document was last modified, when an annotation was created, when a change was made.
    Gets the date entered by a user that is of type String and not a date type.
    Gets the name of the person who last modified a document, who created an annotation, who authored a change.
    Gets the height of the rectangular which displays the annotation.
    Gets unrestricted identifiers to draw elements.
    Gets the name of a layer.
    Gets the name of the annotation.
    Returns the parent content element.
    Gets the height of a drawing object as a relative value within a frame.
    Gets the width of a drawing object as a relative value within a frame.
    Gets the name of a style that defines a style with the family value of graphic.
    Gets the style for formatting of text in a shape.
    Gets a list of transform definitions, which are applied to the drawing shape in the order in which they are listed.
    Gets the width of the rectangular which displays the annotation.
    Gets the horizontal position of the annotation.
    Gets the position where the annotation is displayed.
    int
    Gets the rendering order for shapes in a document instance.
    boolean
    Contains true if an annotation is visible otherwise is false.
    void
    setCaptionPointX​(Size captionPointX)
    Sets the position of a point that is captioned.
    void
    setCaptionPointY​(Size captionPointY)
    Sets the position of a point that is captioned.
    void
    setCornerRadius​(Size cornerRadius)
    Sets the radius of the circle used to round off the corners of a caption, rectangle, or a text-box.
    void
    setCreationDate​(Date creationDate)
    Sets the date and time when the document was last modified, when an annotation was created, when a change was made.
    void
    setCreationDateString​(String creationDateString)
    Sets the date entered by a user that is of type String and not a date type.
    void
    setCreator​(String creator)
    Sets the name of the person who last modified a document, who created an annotation, who authored a change.
    void
    setHeight​(Size height)
    Sets the height of the rectangular which displays the annotation.
    void
    setID​(String id)
    Sets unrestricted identifiers to draw elements.
    void
    setLayer​(String layer)
    Sets the name of a layer.
    void
    setName​(String name)
    Sets the name of the annotation.
    void
    Sets the parent content element.
    void
    setRelativeHeight​(String relativeHeight)
    Sets the height of a drawing object as a relative value within a frame.
    void
    setRelativeWidth​(String relativeWidth)
    Sets the width of a drawing object as a relative value within a frame.
    void
    setShow​(boolean show)
    Contains true if an annotation is visible otherwise is false.
    void
    setStyle​(String style)
    Sets the name of a style that defines a style with the family value of graphic.
    void
    setTextStyle​(String textStyle)
    Sets the style for formatting of text in a shape.
    void
    setTransform​(String transform)
    Sets a list of transform definitions, which are applied to the drawing shape in the order in which they are listed.
    void
    setWidth​(Size width)
    Sets the width of the rectangular which displays the annotation.
    void
    setX​(Size x)
    Sets the horizontal position of the annotation.
    void
    setY​(Size y)
    Sets the position where the annotation is displayed.
    void
    setZIndex​(int zIndex)
    Sets the rendering order for shapes in a document instance.
    Converts the value of the current Annotation object to its equivalent string representation.

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Annotation

      public Annotation()
      Initializes a new instance of the Annotation class.
  • Method Details

    • add

      public void add(List list)
      Adds a List object to the content.
      Parameters:
      list - the list
    • add

      public void add(Paragraph paragraph)
      Adds a Paragraph object to the content.
      Parameters:
      paragraph - the paragraph
    • getContentElements

      public List<IContentElement> getContentElements()
      Returns all content elements.
      Specified by:
      getContentElements in interface IContentElement
      Returns:
      A collection of content elements.
    • getParent

      public IContentElement getParent()
      Returns the parent content element.
      Specified by:
      getParent in interface IContentElement
      Returns:
      the parent
    • setParent

      public void setParent(IContentElement parent)
      Sets the parent content element.
      Specified by:
      setParent in interface IContentElement
      Parameters:
      parent - the new parent
    • clone

      public Annotation clone()
      Creates a new object that is a deep copy of the current instance.
      Specified by:
      clone in interface ICellContent
      Specified by:
      clone in interface IContentElement
      Specified by:
      clone in interface IParagraphContent
      Overrides:
      clone in class Object
      Returns:
      A new object that is a copy of this instance.
    • toString

      public String toString()
      Converts the value of the current Annotation object to its equivalent string representation.
      Overrides:
      toString in class Object
      Returns:
      the string
    • getContent

      public List<ITextContent> getContent()
      Contains a collection of ITextContent objects.
      Returns:
      the content
    • getCreator

      public String getCreator()
      Gets the name of the person who last modified a document, who created an annotation, who authored a change.
      Returns:
      the creator
    • setCreator

      public void setCreator(String creator)
      Sets the name of the person who last modified a document, who created an annotation, who authored a change.
      Parameters:
      creator - the new creator
    • getCreationDate

      public Date getCreationDate()
      Gets the date and time when the document was last modified, when an annotation was created, when a change was made.
      Returns:
      the creation date
    • setCreationDate

      public void setCreationDate(Date creationDate)
      Sets the date and time when the document was last modified, when an annotation was created, when a change was made.
      Parameters:
      creationDate - the new creation date
    • getCreationDateString

      public String getCreationDateString()
      Gets the date entered by a user that is of type String and not a date type. This value is used only for display as entered.
      Returns:
      the creation date string
    • setCreationDateString

      public void setCreationDateString(String creationDateString)
      Sets the date entered by a user that is of type String and not a date type. This value is used only for display as entered.
      Parameters:
      creationDateString - the new creation date string
    • isShow

      public boolean isShow()
      Contains true if an annotation is visible otherwise is false.
      Returns:
      true, if is show
    • setShow

      public void setShow(boolean show)
      Contains true if an annotation is visible otherwise is false.
      Parameters:
      show - the new show
    • getID

      public String getID()
      Gets unrestricted identifiers to draw elements.
      Returns:
      the id
    • setID

      public void setID(String id)
      Sets unrestricted identifiers to draw elements.
      Parameters:
      id - the new id
    • getLayer

      public String getLayer()
      Gets the name of a layer.
      Returns:
      the layer
    • setLayer

      public void setLayer(String layer)
      Sets the name of a layer.
      Parameters:
      layer - the new layer
    • getStyle

      public String getStyle()
      Gets the name of a style that defines a style with the family value of graphic.
      Returns:
      the style
    • setStyle

      public void setStyle(String style)
      Sets the name of a style that defines a style with the family value of graphic.
      Parameters:
      style - the new style
    • getTextStyle

      public String getTextStyle()
      Gets the style for formatting of text in a shape.
      Returns:
      the text style
    • setTextStyle

      public void setTextStyle(String textStyle)
      Sets the style for formatting of text in a shape.
      Parameters:
      textStyle - the new text style
    • getName

      public String getName()
      Gets the name of the annotation.
      Returns:
      the name
    • setName

      public void setName(String name)
      Sets the name of the annotation.
      Parameters:
      name - the new name
    • getZIndex

      public int getZIndex()
      Gets the rendering order for shapes in a document instance.
      Returns:
      the z index
    • setZIndex

      public void setZIndex(int zIndex)
      Sets the rendering order for shapes in a document instance.
      Parameters:
      zIndex - the new z index
    • getTransform

      public String getTransform()
      Gets a list of transform definitions, which are applied to the drawing shape in the order in which they are listed. The transform definitions in the list shall be separated by a white space and/or a comma.
      Returns:
      the transform
    • setTransform

      public void setTransform(String transform)
      Sets a list of transform definitions, which are applied to the drawing shape in the order in which they are listed. The transform definitions in the list shall be separated by a white space and/or a comma.
      Parameters:
      transform - the new transform
    • getX

      public Size getX()
      Gets the horizontal position of the annotation.
      Returns:
      the x
    • setX

      public void setX(Size x)
      Sets the horizontal position of the annotation.
      Parameters:
      x - the new x
    • getY

      public Size getY()
      Gets the position where the annotation is displayed.
      Returns:
      the y
    • setY

      public void setY(Size y)
      Sets the position where the annotation is displayed.
      Parameters:
      y - the new y
    • getWidth

      public Size getWidth()
      Gets the width of the rectangular which displays the annotation.
      Returns:
      the width
    • setWidth

      public void setWidth(Size width)
      Sets the width of the rectangular which displays the annotation.
      Parameters:
      width - the new width
    • getHeight

      public Size getHeight()
      Gets the height of the rectangular which displays the annotation.
      Returns:
      the height
    • setHeight

      public void setHeight(Size height)
      Sets the height of the rectangular which displays the annotation.
      Parameters:
      height - the new height
    • getRelativeWidth

      public String getRelativeWidth()
      Gets the width of a drawing object as a relative value within a frame.
      Returns:
      the relative width
    • setRelativeWidth

      public void setRelativeWidth(String relativeWidth)
      Sets the width of a drawing object as a relative value within a frame.
      Parameters:
      relativeWidth - the new relative width
    • getRelativeHeight

      public String getRelativeHeight()
      Gets the height of a drawing object as a relative value within a frame.
      Returns:
      the relative height
    • setRelativeHeight

      public void setRelativeHeight(String relativeHeight)
      Sets the height of a drawing object as a relative value within a frame.
      Parameters:
      relativeHeight - the new relative height
    • getCornerRadius

      public Size getCornerRadius()
      Gets the radius of the circle used to round off the corners of a caption, rectangle, or a text-box.
      Returns:
      the corner radius
    • setCornerRadius

      public void setCornerRadius(Size cornerRadius)
      Sets the radius of the circle used to round off the corners of a caption, rectangle, or a text-box.
      Parameters:
      cornerRadius - the new corner radius
    • getCaptionPointX

      public Size getCaptionPointX()
      Gets the position of a point that is captioned. A set of lines are rendered to that point from the caption area.
      Returns:
      the caption point x
    • setCaptionPointX

      public void setCaptionPointX(Size captionPointX)
      Sets the position of a point that is captioned. A set of lines are rendered to that point from the caption area.
      Parameters:
      captionPointX - the new caption point x
    • getCaptionPointY

      public Size getCaptionPointY()
      Gets the position of a point that is captioned. A set of lines are rendered to that point from the caption area.
      Returns:
      the caption point y
    • setCaptionPointY

      public void setCaptionPointY(Size captionPointY)
      Sets the position of a point that is captioned. A set of lines are rendered to that point from the caption area.
      Parameters:
      captionPointY - the new caption point y