|
|||||||||
| Home >> All >> org >> mortbay >> [ html overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.mortbay.html
Class TableForm

java.lang.Objectorg.mortbay.html.Element
org.mortbay.html.Composite
org.mortbay.html.Block
org.mortbay.html.Form
org.mortbay.html.TableForm
- public class TableForm
- extends Form
A form laid out in a Table.
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.
| Field Summary | |
private Composite |
bottomButtons
|
private Composite |
buttons
|
private Table |
column
|
private int |
columns
|
private boolean |
extendRow
|
private java.lang.String |
fieldAttributes
|
private Composite |
hidden
|
private Table |
table
|
| Fields inherited from class org.mortbay.html.Form |
encodingMultipartForm, encodingWWWURL |
| Fields inherited from class org.mortbay.html.Block |
Bold, Center, Div, Italic, Left, Listing, Plain, Pre, Quote, Right, Span, Xmp |
| Fields inherited from class org.mortbay.html.Composite |
elements, nest |
| Fields inherited from class org.mortbay.html.Element |
ALIGN, attributeMap, BGCOLOR, BOTTOM, CENTER, CLASS, COLOR, HEIGHT, ID, LEFT, MIDDLE, noAttributes, RIGHT, SIZE, STYLE, TOP, VALIGN, WIDTH |
| Constructor Summary | |
TableForm(java.lang.String target)
Create a new TableForm. |
|
| Method Summary | |
Input |
addButton(java.lang.String tag,
java.lang.String label)
Add a Submit Button. |
void |
addButtonArea()
|
void |
addButtonArea(java.lang.String label)
|
void |
addButtonRow()
|
void |
addCheckbox(java.lang.String tag,
java.lang.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(java.lang.String label,
Element field)
Add an arbitrary element to the table. |
Input |
addFileField(java.lang.String tag,
java.lang.String label)
Add a File Entry Field. |
void |
addHiddenField(java.lang.String tag,
java.lang.String value)
Add a hidden field. |
void |
addInfoField(java.lang.String tag,
java.lang.String label,
java.lang.String value)
Add an informational field which also passes the data as hidden. |
void |
addPassword(java.lang.String tag,
java.lang.String label,
int length)
Add a password field. |
void |
addReset(java.lang.String label)
Add a reset button. |
Select |
addSelect(java.lang.String tag,
java.lang.String label,
boolean multiple,
int size)
Add a Select field. |
Select |
addSelect(java.lang.String tag,
java.lang.String label,
boolean multiple,
int size,
java.util.Enumeration values)
Add a Select field initialised with fields. |
void |
addText(java.lang.String label,
java.lang.String value)
Add an informational section. |
TextArea |
addTextArea(java.lang.String tag,
java.lang.String label,
int width,
int height,
java.lang.String value)
Add a Text Area. |
Input |
addTextField(java.lang.String tag,
java.lang.String label,
int length,
java.lang.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(java.lang.String attr)
Use the given attributes on the next addXXX |
void |
write(java.io.Writer out)
Write the composite. |
| Methods inherited from class org.mortbay.html.Form |
action, encoding, method, target |
| Methods inherited from class org.mortbay.html.Composite |
add, contents, flush, flush, flush, nest, replace, reset, setNest, size, unnest |
| Methods inherited from class org.mortbay.html.Element |
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 |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
table
private Table table
column
private Table column
columns
private int columns
hidden
private Composite hidden
buttons
private Composite buttons
bottomButtons
private Composite bottomButtons
fieldAttributes
private java.lang.String fieldAttributes
extendRow
private boolean extendRow
| Constructor Detail |
TableForm
public TableForm(java.lang.String target)
- Create a new TableForm.
| Method Detail |
addText
public void addText(java.lang.String label, java.lang.String value)
- Add an informational section.
addTextField
public Input addTextField(java.lang.String tag, java.lang.String label, int length, java.lang.String value)
- Add a Text Entry Field.
addTextArea
public TextArea addTextArea(java.lang.String tag, java.lang.String label, int width, int height, java.lang.String value)
- Add a Text Area.
addFileField
public Input addFileField(java.lang.String tag, java.lang.String label)
- Add a File Entry Field.
addInfoField
public void addInfoField(java.lang.String tag, java.lang.String label, java.lang.String value)
- Add an informational field which also passes the data as hidden.
addHiddenField
public void addHiddenField(java.lang.String tag, java.lang.String value)
- Add a hidden field.
addPassword
public void addPassword(java.lang.String tag, java.lang.String label, int length)
- Add a password field.
addCheckbox
public void addCheckbox(java.lang.String tag, java.lang.String label, boolean checked)
addSelect
public Select addSelect(java.lang.String tag, java.lang.String label, boolean multiple, int size)
- Add a Select field.
addSelect
public Select addSelect(java.lang.String tag, java.lang.String label, boolean multiple, int size, java.util.Enumeration values)
- Add a Select field initialised with fields.
addButtonArea
public void addButtonArea(java.lang.String label)
addButtonArea
public void addButtonArea()
addButtonRow
public void addButtonRow()
buttonsAtBottom
public void buttonsAtBottom()
addButton
public Input addButton(java.lang.String tag, java.lang.String label)
- Add a Submit Button.
addReset
public void addReset(java.lang.String label)
- Add a reset button.
useAttributes
public void useAttributes(java.lang.String attr)
- Use the given attributes on the next addXXX
table
public Table table()
- Get the internal table
outerTable
public Table outerTable()
- Get the internal table
extendRow
public TableForm extendRow()
- Extend the usage of the current row in the form. The next
element added will be added to the same row as the form and
not have a label of it's own.
addField
public void addField(java.lang.String label, Element field)
- Add an arbitrary element to the table.
addColumn
public void addColumn()
- Create a new column in the form.
addColumn
public void addColumn(int spacing)
- Create a new column in the form.
newColumns
public void newColumns()
- Add a new sections of columns.
setColumnSpan
public void setColumnSpan(int span)
- Set the column span of the current column.
This call is needed for forms that have varying numbers
of columns in different sections. NB. and column spacing
counts as a column.
newTable
public void newTable()
- Start using a new Table.
Anything added to the Composite parent of
this object before this is called will be added between the two
tables.
write
public void write(java.io.Writer out) throws java.io.IOException
- Description copied from class:
Composite - Write the composite.
The default implementation writes the elements sequentially. May
be overridden for more specialized behaviour.
|
|||||||||
| Home >> All >> org >> mortbay >> [ html overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC