org.odftoolkit.simple.form
Class FormControl

java.lang.Object
  extended by org.odftoolkit.simple.Component
      extended by org.odftoolkit.simple.form.FormControl
Direct Known Subclasses:
Button, CheckBox, ComboBox, Field, Label, ListBox, RadioButton, TextBox

public abstract class FormControl
extends Component

This class represents the form control, which provides the methods to get/set the control properties and style and layout properties of its binding drawing shape.

Since:
0.8

Field Summary
protected  Control drawingShape
           
protected  FormFormElement formElement
           
protected  OdfElement mElement
           
protected  FormPropertiesElement mFormProperties
           
 
Constructor Summary
FormControl()
           
 
Method Summary
 Control getDrawControl()
          Get the drawing shape binding to this control
abstract  String getId()
          Get the control id.
abstract  String getName()
          Get the control name.
 OdfElement getOdfElement()
          Get the OdfElement which represents this control
 FrameRectangle getRectangle()
          Return the rectangle used as the bounding box of this form control
 boolean remove()
          Remove the form control from the container.
 void setAnchorType(StyleTypeDefinitions.AnchorType anchorType)
          Set the anchor position how this form control is bound to a text document.
abstract  void setControlImplementation(String controlImpl)
          Set the implementation of this control.
protected  void setFormProperty(String formPropertyName, String officeValueType, String officeStringValue, Boolean officeBooleanValue, String officeDateValue, String officeTimeValue, Double officeValue, String officeCurrency)
           
abstract  void setId(String id)
          Set the control id.
abstract  void setName(String name)
          Set the control name.
 void setRectangle(FrameRectangle rectangle)
          Set the rectangle used as the bounding box of this form control
 
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

drawingShape

protected Control drawingShape

formElement

protected FormFormElement formElement

mFormProperties

protected FormPropertiesElement mFormProperties

mElement

protected OdfElement mElement
Constructor Detail

FormControl

public FormControl()
Method Detail

remove

public boolean remove()
Remove the form control from the container.

The resource is removed if it's only used by this object.

Returns:
true if the form control is successfully removed; false if otherwise.
See Also:
Control.remove()

getOdfElement

public OdfElement getOdfElement()
Get the OdfElement which represents this control

Specified by:
getOdfElement in class Component
Returns:
the OdfElement which represents this control

getDrawControl

public Control getDrawControl()
Get the drawing shape binding to this control

Returns:
the drawing shape binding to this control

setId

public abstract void setId(String id)
Set the control id.

Parameters:
id - -the control id.

getId

public abstract String getId()
Get the control id.

Returns:
the control id.

setName

public abstract void setName(String name)
Set the control name.

Parameters:
name - - the control name.

getName

public abstract String getName()
Get the control name.

Returns:
the control name.

setControlImplementation

public abstract void setControlImplementation(String controlImpl)
Set the implementation of this control.

Parameters:
controlImpl - - the implementation description of this control

setAnchorType

public void setAnchorType(StyleTypeDefinitions.AnchorType anchorType)
Set the anchor position how this form control is bound to a text document.

Parameters:
anchorType - - the anchor position

getRectangle

public FrameRectangle getRectangle()
Return the rectangle used as the bounding box of this form control

Returns:
- the rectangle

setRectangle

public void setRectangle(FrameRectangle rectangle)
Set the rectangle used as the bounding box of this form control

Parameters:
rectangle - - the rectangle

setFormProperty

protected void setFormProperty(String formPropertyName,
                               String officeValueType,
                               String officeStringValue,
                               Boolean officeBooleanValue,
                               String officeDateValue,
                               String officeTimeValue,
                               Double officeValue,
                               String officeCurrency)


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