|
Gnostice PDFOne
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.gnostice.pdfone.PdfAnnot
com.gnostice.pdfone.PdfProAnnot
com.gnostice.pdfone.PdfFormField
com.gnostice.pdfone.PdfFormChoiceField
com.gnostice.pdfone.PdfFormListBox
This represents a list box. A list box provides a scrollable list of text options. Options that are not displayed within the box can be accessed by scrolling.
// Create a PDF page PdfPage page = new PdfPage(); // Create a list box PdfFormListBox lb = new PdfFormListBox( new PdfRect(300, 100, 150, 50), "Country", PdfFormField.FLAG_REQUIRED, Color.BLACK, Color.YELLOW); // Add options to the list box lb.addItem("India"); lb.addItem("United States", true); lb.addItem("United Kingdom"); lb.addItem("Russia", "Russian Federation"); // Add the list box form field to the page page.addFormField(lb); page.writeText("Your location", 220, 100);
Field Summary |
Constructor Summary | |
PdfFormListBox(PdfRect rect)
Construct a list box form field with specified bounding box. |
|
PdfFormListBox(PdfRect r,
String name)
Construct a list box form field with specified bounding box and name. |
|
PdfFormListBox(PdfRect r,
String name,
Color borderColor,
Color backgroundColor)
Construct a list box form field with specified bounding box, name, border color and background color. |
|
PdfFormListBox(PdfRect r,
String name,
int fieldFlags)
Construct a list box form field with specified bounding box, name, and flags. |
|
PdfFormListBox(PdfRect r,
String name,
int fieldFlags,
Color borderColor,
Color backgroundColor)
Construct a list box form field with specified bounding box, name, flags, border color and background color. |
|
PdfFormListBox(PdfRect r,
String name,
String alternateName,
String mappingName)
Construct a list box form field with specified bounding box, name, alternate name, and mapping name. |
|
PdfFormListBox(PdfRect r,
String name,
String alternateName,
String mappingName,
Color borderColor,
Color backgroundColor)
Construct a list box form field with specified bounding box, name, alternate name, mapping name, border color, and background color. |
|
PdfFormListBox(PdfRect r,
String name,
String alternateName,
String mappingName,
int fieldFlags)
Construct a list box form field with specified bounding box, name, alternate name, mapping name, and flags. |
|
PdfFormListBox(PdfRect r,
String name,
String alternateName,
String mappingName,
int fieldFlags,
Color borderColor,
Color backgroundColor)
Construct a list box form field with specified bounding box, name, alternate name, mapping name, flags, border color and background color. |
|
PdfFormListBox(String name)
Construct a list box form field with specified name. |
|
PdfFormListBox(String name,
Color borderColor,
Color backgroundColor)
Construct a list box form field with specified name. |
|
PdfFormListBox(String name,
int fieldFlags)
Construct a list box form field with specified name and flags. |
|
PdfFormListBox(String name,
int fieldFlags,
Color borderColor,
Color backgroundColor)
Construct a list box form field with specified name and flags. |
|
PdfFormListBox(String name,
String alternateName,
String mappingName)
Construct a list box form field with specified name, alternate name, and mapping name. |
|
PdfFormListBox(String name,
String alternateName,
String mappingName,
Color borderColor,
Color backgroundColor)
Construct a list box form field with specified name, alternate name, mapping name, border color, and background color. |
|
PdfFormListBox(String name,
String alternateName,
String mappingName,
int fieldFlags)
Construct a list box form field with specified name, alternate name, mapping name, and flags. |
|
PdfFormListBox(String name,
String alternateName,
String mappingName,
int fieldFlags,
Color borderColor,
Color backgroundColor)
Construct a list box form field with specified name, alternate name, mapping name, flags, border color, and background color. |
Method Summary | |
void |
addItem(String item)
Adds a new option with specified value to this list box/combo box form field. |
void |
addItem(String item,
boolean keepSelected)
Adds a new option with specified value and selection state to this list box/combo box form field. |
void |
addItem(String item,
String exportValue)
Adds a new option with specified value and export value to this list box/combo box form field. |
void |
addItem(String item,
String exportValue,
boolean keepSelected)
Adds a new option with specified value, export value and selection state to this list box/combo box form field. |
Object |
clone()
|
int |
getAlignment()
Returns how values of the options in the combo box/list box are aligned. |
List |
getDisplayValues()
Returns display values of all options in the combo box/list box form field. |
List |
getExportValues()
Returns export values of all options in the combo box/list box form field. |
List |
getSelectedValues()
Returns a list of selected values in the list box. |
int |
getTopIndex()
Returns ordinal of the first option that is accessible to the user without the need for scrolling. |
String |
getValue()
Returns value of selected option in the combo box/list box form field. |
boolean |
isAutoAdjustTextHeight()
Returns whether the viewer application will adjust the font size to accommodate the entire value of the options in the combo box/list box form field. |
boolean |
isCommitOnSelectionChange()
Returns whether actions associated with the combo box/list box are set to be executed immediately when an option is selected. |
boolean |
isMultiselect()
Returns whether multiple options can be selected in the combo box/list box form field. |
void |
removeItem(int index)
Deletes option with specified ordinal from the combo box/list box. |
void |
removeItem(String item)
Deletes option with specified value from the combo box/list box. |
void |
removeItems(String[] items)
Deletes options with specified values from the list box. |
void |
setAlignment(int alignment)
Specifies how values of the options in the combo box/list box need to be aligned. |
void |
setAutoAdjustTextHeight(boolean autoAdjustFieldTextHeight)
Specifies whether the size of text inside the field needs to be adjusted by the viewer application so that the text is fully accommodated inside the field without any cropping. |
void |
setCommitOnSelectionChange(boolean commitOnSelectionChange)
Specifies whether actions associated with the combo box/list box need to be executed immediately when an option is selected. |
void |
setMultiselect(boolean multiselect)
Specifies whether viewer applications can allow users to select more than one item in the list box. |
void |
setTopIndex(int topIndex)
Sets option with specified ordinal as the first option that needs to be accessible to the user without the need for scrolling. |
void |
setValue(String value)
Sets specified value as the selected option. |
void |
setValues(List values)
Sets specified values as the selected options. |
Methods inherited from class com.gnostice.pdfone.PdfAnnot |
delete, getAnnotName, getBorderStyle, getBorderWidth, getBottom, getColor, getContents, getDashPattern, getFlags, getLeft, getRect, getRight, getSubject, getTitle, getTop, hashCode, isDeleted, isShowRect, setAnnotName, setBorderStyle, setBorderWidth, setColor, setContents, setDashPattern, setFlags, setRect, setRect, setRect, setRect, setRect, setShowRect, setSubject, setTitle |
Methods inherited from class java.lang.Object |
equals, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PdfFormListBox(String name, int fieldFlags)
name
- name of the list box field in the documentfieldFlags
- form field flags
public PdfFormListBox(String name, String alternateName, String mappingName, int fieldFlags)
name
- name of the list box field in the documentalternateName
- alternate name of the list box field in the documentmappingName
- mapping name of the list box field in the documentfieldFlags
- form field flags
PdfFormField
public PdfFormListBox(String name, String alternateName, String mappingName)
name
- name of the list box field in the documentalternateName
- alternate name of the list box field in the documentmappingName
- mapping name of the list box field in the documentPdfFormField
public PdfFormListBox(String name)
name
- name of the list box field in the documentPdfFormField
public PdfFormListBox(PdfRect rect)
name
is specified for it.
rect
- bounding box of the list box form fieldpublic PdfFormListBox(PdfRect r, String name, int fieldFlags)
r
- bounding box of the list box form fieldname
- name of the list box field in the documentfieldFlags
- form field flags
PdfFormField
public PdfFormListBox(PdfRect r, String name)
r
- bounding box of the list box form fieldname
- name of the list box field in the documentPdfFormField
public PdfFormListBox(PdfRect r, String name, String alternateName, String mappingName, int fieldFlags)
r
- bounding box of the list box form fieldname
- name of the list box field in the documentalternateName
- alternate name of the list box field in the documentmappingName
- mapping name of the list box field in the documentfieldFlags
- form field flags
PdfFormField
public PdfFormListBox(PdfRect r, String name, String alternateName, String mappingName)
r
- bounding box of the list box form fieldname
- name of the list box field in the documentalternateName
- alternate name of the list box field in the documentmappingName
- mapping name of the list box field in the documentPdfFormField
public PdfFormListBox(String name, int fieldFlags, Color borderColor, Color backgroundColor)
name
- name of the list box field in the documentfieldFlags
- form field flags
borderColor
- border color of the text fieldbackgroundColor
- background color of the text fieldpublic PdfFormListBox(String name, String alternateName, String mappingName, int fieldFlags, Color borderColor, Color backgroundColor)
name
- name of the list box field in the documentalternateName
- alternate name of the list box field in the documentmappingName
- mapping name of the list box field in the documentfieldFlags
- form field flags
borderColor
- border color of the text fieldbackgroundColor
- background color of the text fieldPdfFormField
public PdfFormListBox(String name, String alternateName, String mappingName, Color borderColor, Color backgroundColor)
name
- name of the list box field in the documentalternateName
- alternate name of the list box field in the documentmappingName
- mapping name of the list box field in the documentborderColor
- border color of the text fieldbackgroundColor
- background color of the text fieldPdfFormField
public PdfFormListBox(String name, Color borderColor, Color backgroundColor)
name
- name of the list box field in the documentborderColor
- border color of the text fieldbackgroundColor
- background color of the text fieldpublic PdfFormListBox(PdfRect r, String name, int fieldFlags, Color borderColor, Color backgroundColor)
r
- bounding box of the list box form fieldname
- name of the list box field in the documentfieldFlags
- form field flags
borderColor
- border color of the text fieldbackgroundColor
- background color of the text fieldPdfFormField
public PdfFormListBox(PdfRect r, String name, Color borderColor, Color backgroundColor)
r
- bounding box of the list box form fieldname
- name of the list box field in the documentborderColor
- border color of the text fieldbackgroundColor
- background color of the text fieldpublic PdfFormListBox(PdfRect r, String name, String alternateName, String mappingName, int fieldFlags, Color borderColor, Color backgroundColor)
r
- bounding box of the list box form fieldname
- name of the list box field in the documentalternateName
- alternate name of the list box field in the documentmappingName
- mapping name of the list box field in the documentfieldFlags
- form field flags
borderColor
- border color of the text fieldbackgroundColor
- background color of the text fieldPdfFormField
public PdfFormListBox(PdfRect r, String name, String alternateName, String mappingName, Color borderColor, Color backgroundColor)
r
- bounding box of the list box form fieldname
- name of the list box field in the documentalternateName
- alternate name of the list box field in the documentmappingName
- mapping name of the list box field in the documentborderColor
- border color of the text fieldbackgroundColor
- background color of the text fieldMethod Detail |
public Object clone()
public void setMultiselect(boolean multiselect)
multiselect
- whether viewer applications can allow users to
select more than one item in the list boxsetMultiselect(boolean)
public int getTopIndex()
setTopIndex(int)
public void setTopIndex(int topIndex)
topIndex
- position of the option in the list boxgetTopIndex()
public void setValues(List values)
values
- selected optionspublic List getSelectedValues()
public void removeItems(String[] items)
items
- values of options that need to be deletedpublic boolean isAutoAdjustTextHeight()
PdfFormChoiceField.setAutoAdjustTextHeight(boolean)
public void setAutoAdjustTextHeight(boolean autoAdjustFieldTextHeight)
autoAdjustFieldTextHeight
- whether the size of text inside text box, list box
and combo box form fields needs to be adjustedpublic int getAlignment()
constant
specifying the alignmentPdfFormChoiceField.setAlignment(int)
public void setAlignment(int alignment)
alignment
- constant
specifying the alignmentPdfFormChoiceField.getAlignment()
public void removeItem(String item)
item
- value of the option that needs to be deletedpublic void removeItem(int index)
index
- ordinal of the option that needs to be deletedpublic void addItem(String item)
item
- displayed value of the new option that needs to be addedpublic void addItem(String item, String exportValue)
item
- display value of the new option that needs to be
addedexportValue
- export value of the new option that needs to be
addedpublic void addItem(String item, boolean keepSelected)
item
- display value of the new option that needs to be
addedkeepSelected
- whether the option needs to be selectedpublic void addItem(String item, String exportValue, boolean keepSelected)
item
- display value of the new option that needs to be
addedexportValue
- export value of the new option that needs to be
addedkeepSelected
- whether the option needs to be selectedpublic boolean isMultiselect()
#setMultiselect(boolean)
public boolean isCommitOnSelectionChange()
PdfFormChoiceField.setCommitOnSelectionChange(boolean)
public void setCommitOnSelectionChange(boolean commitOnSelectionChange)
commitOnSelectionChange
- whether actions associated with the combo box/list
box need to be executed immediately when an option
is selectedPdfFormChoiceField.isCommitOnSelectionChange()
public void setValue(String value)
setValue
in class PdfFormField
value
- value that needs to be set as the selected optionPdfFormChoiceField.getValue()
public String getValue()
getValue
in class PdfFormField
PdfFormChoiceField.setValue(String)
public List getDisplayValues()
PdfFormChoiceField.getExportValues()
public List getExportValues()
PdfFormChoiceField.getDisplayValues()
|
Pro. Ed. v5.0.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |