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
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.
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionInitializes a new instance of the RegularPolygon class.RegularPolygon(InternalXMLStreamReader reader)Instantiates a new regular polygon. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a IDrawText object to the content.voidAdds a List object to the content.voidAdds a Paragraph object to the content.clone()Creates a new object that is a deep copy of the current instance.Contains a collection of IDrawText objects.Returns all content elements.intGets the number of polygon corners on a polygon shape.Contains an attachment of an event listener to a drawing shape.Contains the designated point in the area of a drawing object to which a connector shape can connect.Returns the parent content element.Gets height of a drawing object as a relative value within a frame.Gets width of a drawing object as a relative value within a frame.booleanSpecifies whether a regular polygon is convex or concave.voidsetConcave(boolean isConcave)Specifies whether a regular polygon is convex or concave.voidsetCornerCount(int cornerCount)Sets the number of polygon corners on a polygon shape.voidsetParent(IContentElement parent)Sets the parent content element.voidsetRelativeHeight(String relativeHeight)Sets height of a drawing object as a relative value within a frame.voidsetRelativeWidth(String relativeWidth)Sets width of a drawing object as a relative value within a frame.toString()Converts the value of the current RegularPolygon object to its equivalent string representation.
-
Constructor Details
-
RegularPolygon
public RegularPolygon()Initializes a new instance of the RegularPolygon class. -
RegularPolygon
Instantiates a new regular polygon.- Parameters:
reader- the reader- Throws:
XMLStreamException- the xML stream exception
-
-
Method Details
-
add
Adds a List object to the content.- Parameters:
list- the list
-
add
Adds a Paragraph object to the content.- Parameters:
paragraph- the paragraph
-
add
Adds a IDrawText object to the content.- Parameters:
drawText- the draw text
-
getContentElements
Returns all content elements.- Specified by:
getContentElementsin interfaceIContentElement- Specified by:
getContentElementsin classShape- Returns:
- A collection of content elements.
-
getParent
Returns the parent content element.- Specified by:
getParentin interfaceIContentElement- Overrides:
getParentin classShape- Returns:
- the parent
-
setParent
Sets the parent content element.- Specified by:
setParentin interfaceIContentElement- Overrides:
setParentin classShape- Parameters:
parent- the new parent
-
clone
Creates a new object that is a deep copy of the current instance.- Specified by:
clonein interfaceICellContent- Specified by:
clonein interfaceIContentElement- Specified by:
clonein interfaceIIndexContent- Specified by:
clonein interfaceIParagraphContent- Specified by:
clonein interfaceITextContent- Specified by:
clonein classShape- Returns:
- A new object that is a copy of this instance.
-
toString
Converts the value of the current RegularPolygon object to its equivalent string representation. -
getContent
Contains a collection of IDrawText objects.- Returns:
- the content
-
getEventListeners
Contains an attachment of an event listener to a drawing shape.- Returns:
- the event listeners
-
getGluePoints
Contains the designated point in the area of a drawing object to which a connector shape can connect.- Returns:
- the glue points
-
getRelativeWidth
Gets width of a drawing object as a relative value within a frame.- Returns:
- the relative width
-
setRelativeWidth
Sets width of a drawing object as a relative value within a frame.- Parameters:
relativeWidth- the new relative width
-
getRelativeHeight
Gets height of a drawing object as a relative value within a frame.- Returns:
- the relative height
-
setRelativeHeight
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
-