DynamicPDF by ceTe Software

com.cete.dynamicpdf.pageelements.forms
Class ListBoxField

java.lang.Object
  |
  +--com.cete.dynamicpdf.PageElement
        |
        +--com.cete.dynamicpdf.pageelements.forms.FormElement
              |
              +--com.cete.dynamicpdf.pageelements.forms.ListBoxField
Direct Known Subclasses:
ComboBox, ListBox

public abstract class ListBoxField
extends FormElement

Represents the choice field of a interactive forms. A base class for all form field of type choice form field.

A choice field contains several text items, one or more of which may be selected as the field value.

Licensing:
This class is a DynamicPDF Generator Enterprise Edition feature. One of the following licenses is required for non-evaluation usage:


Constructor Summary
protected ListBoxField(java.lang.String name, float x, float y, float width, float height)
          Creates a new instance of ListBoxField class.
 
Method Summary
 void addItem(java.lang.String item)
          Adds the item to the list.
 java.lang.String getDefaultChoice()
          Gets the default choice of a choice field.
 java.lang.String getExportValue()
          Gets the value entry identifies the item currently selected in the choice field.
 FormFont getFont()
          Gets the font of the field.
 float getFontSize()
          Gets the font size of the field.
 int getIndexOf(java.lang.String item)
          Gets the index of a item.
 java.lang.String getItem(int index)
          Gets the item from the items list with a given index.
 boolean isNoExport()
          Gets the export state of a choice field.
 void remove(int index)
          Removes the item from the list.
 void setDefaultChoice(java.lang.String defaultChoice)
          Sets the default choice of a choice field.
 void setExportValue(java.lang.String value)
          Sets the value entry identifies the item currently selected in the choice field.
 void setFont(FormFont font)
          Sets the font for the field.
 void setFontSize(float fontSize)
          Sets the font size for the field.
 void setNoExport(boolean value)
          Sets the export state of a choice field.
 int size()
          Gets the number of items available in the item list.
 
Methods inherited from class com.cete.dynamicpdf.pageelements.forms.FormElement
getBackgroundColor, getBorderColor, getBorderStyle, getHeight, getMappingName, getName, getRotate, getTextColor, getToolTip, getWidth, getX, getY, isPrintable, isReadOnly, isVisible, setBackgroundColor, setBorderColor, setBorderStyle, setHeight, setMappingName, setName, setPrintable, setReadOnly, setRotate, setTextColor, setToolTip, setVisible, setWidth, setX, setY
 
Methods inherited from class com.cete.dynamicpdf.PageElement
draw, getRequiredLicenseLevel, getStrID, setRequiredLicenseLevel, setStrID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ListBoxField

protected ListBoxField(java.lang.String name,
                       float x,
                       float y,
                       float width,
                       float height)
Creates a new instance of ListBoxField class.

Parameters:
name - Name of a choice field.
x - X coordinate of a choice field.
y - Y coordinate of a choice field.
width - Width of a choice field.
height - Height of a choice field.
Method Detail

setFont

public void setFont(FormFont font)
Sets the font for the field.


getFont

public FormFont getFont()
Gets the font of the field.


setFontSize

public void setFontSize(float fontSize)
Sets the font size for the field.


getFontSize

public float getFontSize()
Gets the font size of the field.


isNoExport

public boolean isNoExport()
Gets the export state of a choice field.


setNoExport

public void setNoExport(boolean value)
Sets the export state of a choice field.

If set, the field will not be exported by a submit-form action.


addItem

public void addItem(java.lang.String item)
Adds the item to the list. No duplicate items are allowed.

Parameters:
item - Item to be added to the list.

getItem

public java.lang.String getItem(int index)
Gets the item from the items list with a given index.

Throws:
GeneratorException - if index is out of range.
Parameters:
index - Index of the item.

getIndexOf

public int getIndexOf(java.lang.String item)
Gets the index of a item.

Parameters:
item - An item.

remove

public void remove(int index)
Removes the item from the list.

Throws:
GeneratorException - if index is out of range.
Parameters:
index - Item index to be removed from the list.

size

public int size()
Gets the number of items available in the item list.


setDefaultChoice

public void setDefaultChoice(java.lang.String defaultChoice)
Sets the default choice of a choice field. The choice set, should be one of the item in the item list. If not the last item will be the default choice.


getDefaultChoice

public java.lang.String getDefaultChoice()
Gets the default choice of a choice field. If it is not set or if the set choice not present in the item list, then the last item will be the default choice.


setExportValue

public void setExportValue(java.lang.String value)
Sets the value entry identifies the item currently selected in the choice field.


getExportValue

public java.lang.String getExportValue()
Gets the value entry identifies the item currently selected in the choice field.


DynamicPDF by ceTe Software

API Reference for DynamicPDFTM v4.0.3 for Java generated on March 22, 2007
© Copyright 2007, ceTe Software