|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.mortbay.HTML.Element | +--com.mortbay.HTML.Composite | +--com.mortbay.HTML.Block | +--com.mortbay.HTML.Form | +--com.mortbay.HTML.TableForm
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.
Fields inherited from class com.mortbay.HTML.Form |
encodingMultipartForm,
encodingWWWURL |
Fields inherited from class com.mortbay.HTML.Block |
Bold,
Center,
Div,
Italic,
Left,
Listing,
Plain,
Pre,
Quote,
Right,
Span,
Xmp |
Fields inherited from class com.mortbay.HTML.Composite |
elements,
nest |
Fields inherited from class com.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 |
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 com.mortbay.HTML.Form |
action,
encoding,
method,
target |
Methods inherited from class com.mortbay.HTML.Composite |
add,
contents,
nest,
replace,
reset,
setNest,
size,
unnest |
Methods inherited from class com.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 |
Constructor Detail |
public TableForm(java.lang.String target)
target
- The target url to send the form contents toMethod Detail |
public void addText(java.lang.String label, java.lang.String value)
public Input addTextField(java.lang.String tag, java.lang.String label, int length, java.lang.String value)
tag
- The form name of the elementlabel
- The label for the element in the table.public TextArea addTextArea(java.lang.String tag, java.lang.String label, int width, int height, java.lang.String value)
tag
- The form name of the elementlabel
- The label for the element in the table.public void addInfoField(java.lang.String tag, java.lang.String label, java.lang.String value)
tag
- The form name of the elementlabel
- The label for the element in the table.public void addHiddenField(java.lang.String tag, java.lang.String value)
tag
- The form name of the elementpublic void addPassword(java.lang.String tag, java.lang.String label, int length)
tag
- The form name of the elementlabel
- The label for the element in the table.public void addCheckbox(java.lang.String tag, java.lang.String label, boolean checked)
tag
- The form name of the elementlabel
- The label for the element in the table.public Select addSelect(java.lang.String tag, java.lang.String label, boolean multiple, int size)
tag
- The form name of the elementlabel
- The label for the element in the table.public Select addSelect(java.lang.String tag, java.lang.String label, boolean multiple, int size, java.util.Enumeration values)
tag
- The form name of the elementlabel
- The label for the element in the table.public void addButtonArea(java.lang.String label)
public void addButtonArea()
public void addButtonRow()
public void buttonsAtBottom()
public Input addButton(java.lang.String tag, java.lang.String label)
tag
- The form name of the elementlabel
- The label for the Buttonpublic void addReset(java.lang.String label)
tag
- The form name of the elementlabel
- The label for the element in the table.public void useAttributes(java.lang.String attr)
public Table table()
public Table outerTable()
public TableForm extendRow()
tableForm.extendRow().addField(...)
public void addField(java.lang.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(java.io.Writer out) throws java.io.IOException
out
- Writer to write the element to.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |