Class Frame
java.lang.Object
com.independentsoft.office.odf.drawing.Shape
com.independentsoft.office.odf.drawing.Frame
- All Implemented Interfaces:
ICellContent,IContentElement,IIndexContent,IParagraphContent,ITextContent
Represents a frame and serves as the container for elements that may occur in a frame.
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionFrame()Initializes a new instance of the Frame class.Frame(InternalXMLStreamReader reader)Instantiates a new frame. -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(FrameContentElement contentElement)Adds FrameContentElement object to the content.voidAdds Image object to the content.voidAdds Object object to the content.voidAdds OleObject object to the content.voidAdds TextBox object to the content.clone()Creates a new object that is a deep copy of the current instance.Gets a prose description of a graphic object that may be used to support accessibility.intSpecifies the physical page number of an anchor if the drawing object is bound to a page within a text document.Specifies how a frame is bound to a text document.Gets a white space separated list of styles with the family value.Contains a collection of FrameContentElement objects.Returns all content elements.Specifies that a frame displays the contents of another frame.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.If set, it overrides the height of a text box.If set, it overrides the width of a text box.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.voidsetAlternativeText(String alternativeText)Sets a prose description of a graphic object that may be used to support accessibility.voidsetAnchorPageNumber(int anchorPageNumber)Specifies the physical page number of an anchor if the drawing object is bound to a page within a text document.voidsetAnchorType(AnchorType anchorType)Specifies how a frame is bound to a text document.voidsetClassNames(String classNames)Sets a white space separated list of styles with the family value.voidSpecifies that a frame displays the contents of another frame.voidsetMinHeight(Size minHeight)If set, it overrides the height of a text box.voidsetMinWidth(Size minWidth)If set, it overrides the width of 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 Frame object to its equivalent string representation.
-
Constructor Details
-
Frame
public Frame()Initializes a new instance of the Frame class. -
Frame
Instantiates a new frame.- Parameters:
reader- the reader- Throws:
XMLStreamException- the xML stream exception
-
-
Method Details
-
add
Adds Image object to the content.- Parameters:
image- the image
-
add
Adds Object object to the content.- Parameters:
obj- the obj
-
add
Adds TextBox object to the content.- Parameters:
textBox- the text box
-
add
Adds OleObject object to the content.- Parameters:
oleObject- the ole object
-
add
Adds FrameContentElement object to the content.- Parameters:
contentElement- the content element
-
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 Frame object to its equivalent string representation. -
getContent
Contains a collection of FrameContentElement 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
-
getClassNames
Gets a white space separated list of styles with the family value.- Returns:
- the class names
-
setClassNames
Sets a white space separated list of styles with the family value.- Parameters:
classNames- the new class names
-
getAnchorType
Specifies how a frame is bound to a text document.- Returns:
- the anchor type
-
setAnchorType
Specifies how a frame is bound to a text document.- Parameters:
anchorType- the new anchor type
-
getAnchorPageNumber
public int getAnchorPageNumber()Specifies the physical page number of an anchor if the drawing object is bound to a page within a text document.- Returns:
- the anchor page number
-
setAnchorPageNumber
public void setAnchorPageNumber(int anchorPageNumber)Specifies the physical page number of an anchor if the drawing object is bound to a page within a text document.- Parameters:
anchorPageNumber- the new anchor page number
-
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
-
getMinWidth
If set, it overrides the width of a text box.- Returns:
- the min width
-
setMinWidth
If set, it overrides the width of a text box.- Parameters:
minWidth- the new min width
-
getMinHeight
If set, it overrides the height of a text box.- Returns:
- the min height
-
setMinHeight
If set, it overrides the height of a text box.- Parameters:
minHeight- the new min height
-
getCopyOf
Specifies that a frame displays the contents of another frame. This does not effect style and position information.- Returns:
- the copy of
-
setCopyOf
Specifies that a frame displays the contents of another frame. This does not effect style and position information.- Parameters:
copyOf- the new copy of
-
getAlternativeText
Gets a prose description of a graphic object that may be used to support accessibility.- Returns:
- the alternative text
-
setAlternativeText
Sets a prose description of a graphic object that may be used to support accessibility.- Parameters:
alternativeText- the new alternative text
-