|
|||||||||
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.Table
A HTML Table element
The Table Element works by calling newRow and then adding cells or headings.
Notes
Tables are implemented by nesting a cell Block within a row Block
within the table which is also a Block (see nest() on class Composite).
Once a row and cell have been created, calling add or attributes on
the table actually calls the cell.
Element
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 | |
Table()
Construct Table |
|
Table(int border)
Construct Table |
|
Table(int border,
java.lang.String attributes)
Construct Table with attributes |
Method Summary | |
Table |
addCell(java.lang.Object o)
|
Table |
addCell(java.lang.Object o,
java.lang.String attributes)
|
Table |
addHeading(java.lang.Object o)
|
Table |
addHeading(java.lang.Object o,
java.lang.String attributes)
|
Block |
cell()
Get the current cell Block element. |
Table |
cellPadding(int padding)
Set the table cell padding |
Table |
cellSpacing(int s)
Set the table cell spacing |
Block |
defaultCell()
Access the default cell template. |
Block |
defaultHead()
Access the default header cell template. |
Block |
defaultRow()
Access the default row template. |
Table |
newCell()
|
Table |
newCell(java.lang.String attributes)
|
Table |
newHeading()
|
Table |
newRow()
Create new table row. |
Table |
newRow(java.lang.String attributes)
Create new table row with attributes Attributes set after this call and before a call to newCell or newHeader are considered row attributes. |
Block |
row()
Get the current row Block element. |
static void |
setCellNestingFactory(CompositeFactory factory)
Deprecated. Use setNestingFactory or setThreadNestingFactory |
void |
setNestingFactory(CompositeFactory factory)
Add cell nesting factory for table Set the CompositeFactory for this thread. |
static void |
setThreadNestingFactory(CompositeFactory factory)
Add cell nesting factory for thread Set the CompositeFactory for this thread. |
Table |
spacing(int h,
int v)
Set horizontal and vertical spacing |
Methods inherited from class com.mortbay.HTML.Block |
write |
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 Table()
public Table(int border)
public Table(int border, java.lang.String attributes)
Method Detail |
public Table newRow()
public Table newRow(java.lang.String attributes)
public Table newCell()
public Table newCell(java.lang.String attributes)
public Table addCell(java.lang.Object o)
public Table addCell(java.lang.Object o, java.lang.String attributes)
public Table newHeading()
public Table addHeading(java.lang.Object o)
public Table addHeading(java.lang.Object o, java.lang.String attributes)
public Table cellSpacing(int s)
s
- spacing in pixelspublic Table cellPadding(int padding)
padding
- the cell padding in pixelspublic Table spacing(int h, int v)
h
- horizontal spacingv
- vertical spacingpublic Block row()
public Block cell()
public static void setCellNestingFactory(CompositeFactory factory)
factory
- The factory for this Thread. If null clear this
threads factory.public static void setThreadNestingFactory(CompositeFactory factory)
factory
- The factory for this Thread. If null clear this
threads factory.public void setNestingFactory(CompositeFactory factory)
factory
- The factory for this Thread. If null clear this
threads factory.public Block defaultRow()
public Block defaultHead()
public Block defaultCell()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |