Package com.independentsoft.office.odf.drawing

# 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`

public class Frame extends Shape
Represents a frame and serves as the container for elements that may occur in a frame.

- ## Field Summary

  ### Fields inherited from class com.independentsoft.office.odf.drawing.Shape

  `height, id, layer, name, parent, style, textStyle, transform, width, x, y, zIndex`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Frame()`
  Initializes a new instance of the Frame class.
  `Frame​(InternalXMLStreamReader reader)`
  Instantiates a new frame.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `add​(FrameContentElement contentElement)`
  Adds FrameContentElement object to the content.
  `void`
  `add​(Image image)`
  Adds Image object to the content.
  `void`
  `add​(Object obj)`
  Adds Object object to the content.
  `void`
  `add​(OleObject oleObject)`
  Adds OleObject object to the content.
  `void`
  `add​(TextBox textBox)`
  Adds TextBox object to the content.
  `Frame`
  `clone()`
  Creates a new object that is a deep copy of the current instance.
  `String`
  `getAlternativeText()`
  Gets a prose description of a graphic object that may be used to support accessibility.
  `int`
  `getAnchorPageNumber()`
  Specifies the physical page number of an anchor if the drawing object is bound to a page within a text document.
  `AnchorType`
  `getAnchorType()`
  Specifies how a frame is bound to a text document.
  `String`
  `getClassNames()`
  Gets a white space separated list of styles with the family value.
  `List<FrameContentElement>`
  `getContent()`
  Contains a collection of FrameContentElement objects.
  `List<IContentElement>`
  `getContentElements()`
  Returns all content elements.
  `String`
  `getCopyOf()`
  Specifies that a frame displays the contents of another frame.
  `List<IEventListener>`
  `getEventListeners()`
  Contains an attachment of an event listener to a drawing shape.
  `List<GluePoint>`
  `getGluePoints()`
  Contains the designated point in the area of a drawing object to which a connector shape can connect.
  `Size`
  `getMinHeight()`
  If set, it overrides the height of a text box.
  `Size`
  `getMinWidth()`
  If set, it overrides the width of a text box.
  `IContentElement`
  `getParent()`
  Returns the parent content element.
  `String`
  `getRelativeHeight()`
  Gets height of a drawing object as a relative value within a frame.
  `String`
  `getRelativeWidth()`
  Gets width of a drawing object as a relative value within a frame.
  `void`
  `setAlternativeText​(String alternativeText)`
  Sets a prose description of a graphic object that may be used to support accessibility.
  `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.
  `void`
  `setAnchorType​(AnchorType anchorType)`
  Specifies how a frame is bound to a text document.
  `void`
  `setClassNames​(String classNames)`
  Sets a white space separated list of styles with the family value.
  `void`
  `setCopyOf​(String copyOf)`
  Specifies that a frame displays the contents of another frame.
  `void`
  `setMinHeight​(Size minHeight)`
  If set, it overrides the height of a text box.
  `void`
  `setMinWidth​(Size minWidth)`
  If set, it overrides the width of a text box.
  `void`
  `setParent​(IContentElement parent)`
  Sets the parent content element.
  `void`
  `setRelativeHeight​(String relativeHeight)`
  Sets height of a drawing object as a relative value within a frame.
  `void`
  `setRelativeWidth​(String relativeWidth)`
  Sets width of a drawing object as a relative value within a frame.
  `String`
  `toString()`
  Converts the value of the current Frame object to its equivalent string representation.

  ### Methods inherited from class com.independentsoft.office.odf.drawing.Shape

  `getHeight, getID, getLayer, getName, getStyle, getTextStyle, getTransform, getWidth, getX, getY, getZIndex, setHeight, setID, setLayer, setName, setStyle, setTextStyle, setTransform, setWidth, setX, setY, setZIndex`

  ### Methods inherited from class java.lang.Object

  `equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### Frame

    public Frame()
    Initializes a new instance of the Frame class.

  - ### Frame

    public Frame​(InternalXMLStreamReader reader) throws XMLStreamException
    Instantiates a new frame.
    Parameters:
      `reader` - the reader
    Throws:
      `XMLStreamException` - the xML stream exception

- ## Method Details

  - ### add

    public void add​(Image image)
    Adds Image object to the content.
    Parameters:
      `image` - the image

  - ### add

    public void add​(Object obj)
    Adds Object object to the content.
    Parameters:
      `obj` - the obj

  - ### add

    public void add​(TextBox textBox)
    Adds TextBox object to the content.
    Parameters:
      `textBox` - the text box

  - ### add

    public void add​(OleObject oleObject)
    Adds OleObject object to the content.
    Parameters:
      `oleObject` - the ole object

  - ### add

    public void add​(FrameContentElement contentElement)
    Adds FrameContentElement object to the content.
    Parameters:
      `contentElement` - the content element

  - ### 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 Frame 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 Frame object to its equivalent string representation.
    Overrides:
      `toString` in class `Object`
    Returns:
      the string

  - ### getContent

    public List<FrameContentElement> getContent()
    Contains a collection of FrameContentElement 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

  - ### getClassNames

    public String getClassNames()
    Gets a white space separated list of styles with the family value.
    Returns:
      the class names

  - ### setClassNames

    public void setClassNames​(String classNames)
    Sets a white space separated list of styles with the family value.
    Parameters:
      `classNames` - the new class names

  - ### getAnchorType

    public AnchorType getAnchorType()
    Specifies how a frame is bound to a text document.
    Returns:
      the anchor type

  - ### setAnchorType

    public void setAnchorType​(AnchorType anchorType)
    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

    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

  - ### getMinWidth

    public Size getMinWidth()
    If set, it overrides the width of a text box.
    Returns:
      the min width

  - ### setMinWidth

    public void setMinWidth​(Size minWidth)
    If set, it overrides the width of a text box.
    Parameters:
      `minWidth` - the new min width

  - ### getMinHeight

    public Size getMinHeight()
    If set, it overrides the height of a text box.
    Returns:
      the min height

  - ### setMinHeight

    public void setMinHeight​(Size minHeight)
    If set, it overrides the height of a text box.
    Parameters:
      `minHeight` - the new min height

  - ### getCopyOf

    public String getCopyOf()
    Specifies that a frame displays the contents of another frame. This does not effect style and position information.
    Returns:
      the copy of

  - ### setCopyOf

    public void setCopyOf​(String copyOf)
    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

    public String getAlternativeText()
    Gets a prose description of a graphic object that may be used to support accessibility.
    Returns:
      the alternative text

  - ### setAlternativeText

    public void setAlternativeText​(String alternativeText)
    Sets a prose description of a graphic object that may be used to support accessibility.
    Parameters:
      `alternativeText` - the new alternative text