org.odftoolkit.simple.draw
Class Frame

java.lang.Object
  extended by org.odftoolkit.simple.Component
      extended by org.odftoolkit.simple.draw.Frame
Direct Known Subclasses:
Textbox

public class Frame
extends Component

This class presents frame object. It provides method to get/set frame properties, content, and and styles. A frame is a container for enhanced content like text boxes, images or objects. A frame may contain multiple renditions of content.

Since:
0.5

Field Summary
protected  DrawFrameElement mElement
          Attributes: draw:caption-id 19.115, draw:class-names 19.120, draw:copy-of 19.126, draw:id 19.187.3, draw:layer 19.189, draw:name 19.197.10, draw:style-name 19.219.13, draw:text-style-name 19.227, draw:transform 19.228, draw:z-index 19.231, presentation:class 19.389, presentation:class-names 19.390, presentation:placeholder 19.407, presentation:style-name 19.422, presentation:user-transformed 19.427, style:rel-height 19.509, style:rel-width 19.510.2, svg:height 19.539.8, svg:width 19.571.10, svg:x 19.573.5, svg:y 19.577.5, table:end-cell-address 19.627, table:end-x 19.632, table:end-y 19.633, table:table-background 19.728, text:anchor-page-number 19.753, text:anchor-type 19.754 xml:id 19.914.
protected  FrameContainer mFrameContainer
           
protected  Document mOwnerDocument
           
protected  FrameStyleHandler mStyleHandler
           
 
Constructor Summary
protected Frame(DrawFrameElement element)
           
 
Method Summary
 String getDesciption()
          Get the description of this text box
 DrawFrameElement getDrawFrameElement()
          Get the instance of DrawFrameElement which represents this frame.
 URI getHyperlink()
          Return the URI of hypertext reference if exists, or else, return null.
protected static Frame getInstanceof(DrawFrameElement element)
          Get a frame instance by an instance of DrawFrameElement.
 String getName()
          Get the name of this frame.
 OdfElement getOdfElement()
          Get the instance of DrawFrameElement which represents this frame.
 FrameRectangle getRectangle()
          Return the rectangle used by this frame
 FrameStyleHandler getStyleHandler()
          Return style handler for this frame
 String getTitle()
          Get the title of this text box
protected static Frame newFrame(FrameContainer container)
          Create an instance of frame
 void setBackgroundColor(Color color)
          Set the background color of this frame.
 void setDescription(String description)
          Set the description of this text box.
 void setHyperlink(URI linkto)
          Add a hypertext reference to this frame.
 Image setImage(URI uri)
          Add a image to the frame after all the contents get removed.
 void setName(String name)
          Set the name of this frame.
 void setRectangle(FrameRectangle rectangle)
          Set the rectangle used by this frame
 void setTitle(String title)
          Set the title of this text box
 
Methods inherited from class org.odftoolkit.simple.Component
getComponentByElement, getOwnerDocument, registerComponent, unregisterComponent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mElement

protected DrawFrameElement mElement
Attributes: draw:caption-id 19.115, draw:class-names 19.120, draw:copy-of 19.126, draw:id 19.187.3, draw:layer 19.189, draw:name 19.197.10, draw:style-name 19.219.13, draw:text-style-name 19.227, draw:transform 19.228, draw:z-index 19.231, presentation:class 19.389, presentation:class-names 19.390, presentation:placeholder 19.407, presentation:style-name 19.422, presentation:user-transformed 19.427, style:rel-height 19.509, style:rel-width 19.510.2, svg:height 19.539.8, svg:width 19.571.10, svg:x 19.573.5, svg:y 19.577.5, table:end-cell-address 19.627, table:end-x 19.632, table:end-y 19.633, table:table-background 19.728, text:anchor-page-number 19.753, text:anchor-type 19.754 xml:id 19.914.


mOwnerDocument

protected Document mOwnerDocument

mFrameContainer

protected FrameContainer mFrameContainer

mStyleHandler

protected FrameStyleHandler mStyleHandler
Constructor Detail

Frame

protected Frame(DrawFrameElement element)
Method Detail

getInstanceof

protected static Frame getInstanceof(DrawFrameElement element)
Get a frame instance by an instance of DrawFrameElement.

Parameters:
element - - the instance of DrawFrameElement
Returns:
an instance of frame

newFrame

protected static Frame newFrame(FrameContainer container)
Create an instance of frame

The frame will be added at the end of this container.

Parameters:
container - - the frame container that contains this frame.

setName

public void setName(String name)
Set the name of this frame.

Parameters:
name - - the name of the frame

getName

public String getName()
Get the name of this frame.

Returns:
the name of the frame

getOdfElement

public OdfElement getOdfElement()
Get the instance of DrawFrameElement which represents this frame.

Specified by:
getOdfElement in class Component
Returns:
the instance of DrawFrameElement

getDrawFrameElement

public DrawFrameElement getDrawFrameElement()
Get the instance of DrawFrameElement which represents this frame.

Returns:
the instance of DrawFrameElement

setRectangle

public void setRectangle(FrameRectangle rectangle)
Set the rectangle used by this frame

Parameters:
rectangle - - the rectangle used by this frame

getRectangle

public FrameRectangle getRectangle()
Return the rectangle used by this frame

Returns:
- the rectangle

setTitle

public void setTitle(String title)
Set the title of this text box

Parameters:
title - - the title of this text box

getTitle

public String getTitle()
Get the title of this text box

Returns:
- the title of this text box

getDesciption

public String getDesciption()
Get the description of this text box

Returns:
- the description of this text box

setDescription

public void setDescription(String description)
Set the description of this text box.

Parameters:
description - - the description of this text box

setHyperlink

public void setHyperlink(URI linkto)
Add a hypertext reference to this frame.

Parameters:
linkto - the hyperlink
Since:
0.6.5

getHyperlink

public URI getHyperlink()
Return the URI of hypertext reference if exists, or else, return null.

Returns:
the URI of hyperlink if exists

getStyleHandler

public FrameStyleHandler getStyleHandler()
Return style handler for this frame

Returns:
the style handler

setBackgroundColor

public void setBackgroundColor(Color color)
Set the background color of this frame.

If the parameter is null, there will be no background color defined for this frame. The old setting of background color will be removed.

Parameters:
color - - the background color to be set

setImage

public Image setImage(URI uri)
Add a image to the frame after all the contents get removed.

Since:
0.5.5


Copyright © 2010-2017 The Apache Software Foundation. All Rights Reserved.