public class TableForm extends Form
This class creates a form and lays out all the elements within a table. Each element added has a label part and a element part. The label is displayed in the form beside the element. All buttons are shown at the bottom.
encodingMultipartForm, encodingWWWURL
Constructor and Description |
---|
TableForm(String target)
Create a new TableForm.
|
Modifier and Type | Method and Description |
---|---|
Input |
addButton(String tag,
String label)
Add a Submit Button.
|
void |
addButtonArea() |
void |
addButtonArea(String label) |
void |
addButtonRow() |
void |
addCheckbox(String tag,
String label,
boolean checked) |
void |
addColumn()
Create a new column in the form.
|
void |
addColumn(int spacing)
Create a new column in the form.
|
void |
addField(String label,
Element field)
Add an arbitrary element to the table.
|
Input |
addFileField(String tag,
String label)
Add a File Entry Field.
|
void |
addHiddenField(String tag,
String value)
Add a hidden field.
|
void |
addInfoField(String tag,
String label,
String value)
Add an informational field which also passes the data as hidden.
|
void |
addPassword(String tag,
String label,
int length)
Add a password field.
|
void |
addReset(String label)
Add a reset button.
|
Select |
addSelect(String tag,
String label,
boolean multiple,
int size)
Add a Select field.
|
Select |
addSelect(String tag,
String label,
boolean multiple,
int size,
Enumeration values)
Add a Select field initialised with fields.
|
void |
addText(String label,
String value)
Add an informational section.
|
TextArea |
addTextArea(String tag,
String label,
int width,
int height,
String value)
Add a Text Area.
|
Input |
addTextField(String tag,
String label,
int length,
String value)
Add a Text Entry Field.
|
void |
buttonsAtBottom() |
TableForm |
extendRow()
Extend the usage of the current row in the form.
|
void |
newColumns()
Add a new sections of columns.
|
void |
newTable()
Start using a new Table.
|
Table |
outerTable()
Get the internal table
|
void |
setColumnSpan(int span)
Set the column span of the current column.
|
Table |
table()
Get the internal table
|
void |
useAttributes(String attr)
Use the given attributes on the next addXXX
|
void |
write(Writer out)
Write the composite.
|
action, encoding, method, target
add, contents, nest, replace, reset, setNest, size, unnest
attribute, attribute, attribute, attributes, attributes, bgColor, bottom, center, color, cssClass, cssID, height, height, height, left, middle, right, setAttributesFrom, size, size, style, top, toString, width, width, width, write, write
public TableForm(String target)
target
- The target url to send the form contents topublic Input addTextField(String tag, String label, int length, String value)
tag
- The form name of the elementlabel
- The label for the element in the table.public TextArea addTextArea(String tag, String label, int width, int height, String value)
tag
- The form name of the elementlabel
- The label for the element in the table.public Input addFileField(String tag, String label)
tag
- The form name of the elementlabel
- The label for the element in the table.public void addInfoField(String tag, String label, String value)
tag
- The form name of the elementlabel
- The label for the element in the table.public void addHiddenField(String tag, String value)
tag
- The form name of the elementpublic void addPassword(String tag, String label, int length)
tag
- The form name of the elementlabel
- The label for the element in the table.public void addCheckbox(String tag, String label, boolean checked)
tag
- The form name of the elementlabel
- The label for the element in the table.public Select addSelect(String tag, String label, boolean multiple, int size)
tag
- The form name of the elementlabel
- The label for the element in the table.public Select addSelect(String tag, String label, boolean multiple, int size, Enumeration values)
tag
- The form name of the elementlabel
- The label for the element in the table.public void addButtonArea(String label)
public void addButtonArea()
public void addButtonRow()
public void buttonsAtBottom()
public Input addButton(String tag, String label)
tag
- The form name of the elementlabel
- The label for the Buttonpublic void addReset(String label)
label
- The label for the element in the table.public void useAttributes(String attr)
public Table table()
public Table outerTable()
public TableForm extendRow()
tableForm.extendRow().addField(...)
public void addField(String label, Element field)
label
- The label for the element in the table.public void addColumn()
public void addColumn(int spacing)
public void newColumns()
public void setColumnSpan(int span)
span
- public void newTable()
public void write(Writer out) throws IOException
Composite
write
in class Form
out
- Writer to write the element to.IOException
Copyright © 2016. All Rights Reserved.