Class Rectangle
java.lang.Object
com.independentsoft.office.odf.drawing.Shape
com.independentsoft.office.odf.drawing.Rectangle
- All Implemented Interfaces:
ICellContent,IContentElement,IIndexContent,IParagraphContent,ITextContent
Represents a rectangular drawing shape.
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionInitializes a new instance of the Rectangle class.Rectangle(InternalXMLStreamReader reader)Instantiates a new rectangle. -
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.Gets the radius of the circle used to round off the corners of a caption, rectangle, or a text-box.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.voidsetCornerRadius(Size cornerRadius)Sets the radius of the circle used to round off the corners of a caption, rectangle, or a text-box.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 Rectangle object to its equivalent string representation.
-
Constructor Details
-
Rectangle
public Rectangle()Initializes a new instance of the Rectangle class. -
Rectangle
Instantiates a new rectangle.- 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 Rectangle 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
-
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
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
-