Class RegularPolygon

java.lang.Object
com.independentsoft.office.odf.drawing.Shape
com.independentsoft.office.odf.drawing.RegularPolygon
All Implemented Interfaces:
ICellContent, IContentElement, IIndexContent, IParagraphContent, ITextContent

public class RegularPolygon extends Shape
Represents a regular polygon. A regular polygon is a polygon that is specified by its number of edges (that is equal to the number of its corners), rather than by arbitrary points.
  • Constructor Details

    • RegularPolygon

      public RegularPolygon()
      Initializes a new instance of the RegularPolygon class.
    • RegularPolygon

      public RegularPolygon(InternalXMLStreamReader reader) throws XMLStreamException
      Instantiates a new regular polygon.
      Parameters:
      reader - the reader
      Throws:
      XMLStreamException - the xML stream exception
  • 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
    • add

      public void add(IDrawText drawText)
      Adds a IDrawText object to the content.
      Parameters:
      drawText - the draw text
    • getContentElements

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

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

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

      public RegularPolygon 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 IIndexContent
      Specified by:
      clone in interface IParagraphContent
      Specified by:
      clone in interface ITextContent
      Specified by:
      clone in class Shape
      Returns:
      A new object that is a copy of this instance.
    • toString

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

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

      public List<IEventListener> getEventListeners()
      Contains an attachment of an event listener to a drawing shape.
      Returns:
      the event listeners
    • getGluePoints

      public List<GluePoint> getGluePoints()
      Contains the designated point in the area of a drawing object to which a connector shape can connect.
      Returns:
      the glue points
    • getRelativeWidth

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

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

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

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

      public boolean isConcave()
      Specifies whether a regular polygon is convex or concave.
      Returns:
      true, if is concave
    • setConcave

      public void setConcave(boolean isConcave)
      Specifies whether a regular polygon is convex or concave.
      Parameters:
      isConcave - the new concave
    • getCornerCount

      public int getCornerCount()
      Gets the number of polygon corners on a polygon shape.
      Returns:
      the corner count
    • setCornerCount

      public void setCornerCount(int cornerCount)
      Sets the number of polygon corners on a polygon shape.
      Parameters:
      cornerCount - the new corner count