|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object wheel.components.Component wheel.components.RenderableComponent wheel.components.Table
public class Table
An XHTML-table that uses thead, tbody and tfoot. Supports all table-features like colgroups, caption, headers and footers.
An example:
table().attribute("border", "2"). caption().label("Table caption").up(2). thead(). tr(). th().label("column1").up(2). th().label("column2").up(2). th().label("column3").up(4). tbody(). tr(). td().p("Column1 content").up(2). td().p("Column2 content").up(2). td().p("Column3 content").up(4). tfoot(). tr(). td().label("footer text");Note that you can insert any component you like (as long as following xhtml rules) at any point. Here's a brief example of creating a traditional (and not so recommended) border table layout:
table(). tbody(). tr(). td().placeholder("north").up(3). tr(). td().placeholder("west").up(2). td().placeholder("center").up(2). td().placeholder("east").up(3). tr(). td().placeholder("south");To access the layout you can do this:
get("center")Its also easy to store the placeholder in a variable and pass it around or make it inheritable.
Method Summary | |
---|---|
void |
_clear()
Inteded for internal use. |
Component |
caption()
|
TableBlock |
colgroup()
Adds a colgroup-element to a surrounding Table-component. |
java.lang.String |
defaultTagName()
Subclasses must implement this. |
Table |
id(java.lang.String componentId)
Changes the componentId. |
void |
renderComponent(org.xmlpull.v1.XmlSerializer serializer)
Default implementation that will render all renderable child components that this component has. |
Table |
renderHint(java.lang.CharSequence renderHint)
Adds a rendering hint to this component. |
TableBlock |
tbody()
Adds a tbody-element to a surrounding Table-component. |
TableBlock |
tfoot()
Adds a tfoot-element to a surrounding Table-component. |
TableBlock |
thead()
Adds a thead-element to a surrounding Table-component. |
Methods inherited from class wheel.components.RenderableComponent |
---|
_classReferenceFromHints, _getRenderAfterMe, _getRenderBeforeMe, _render, _renderActions, _renderClassReferenceFromHints, _renderTagStart, _renderXhtmlAttributes, addRenderAfter, addRenderBefore, config, defaultDomEvent, getTagName, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public TableBlock thead()
Component
thead
in class Component
public TableBlock tfoot()
Component
tfoot
in class Component
public TableBlock tbody()
Component
tbody
in class Component
public Component caption()
caption
in class Component
public TableBlock colgroup()
Component
colgroup
in class Component
public java.lang.String defaultTagName()
RenderableComponent
defaultTagName
in class RenderableComponent
public void renderComponent(org.xmlpull.v1.XmlSerializer serializer) throws java.io.IOException
RenderableComponent
renderComponent
in class RenderableComponent
java.io.IOException
public Table id(java.lang.String componentId)
Component
id
in class Component
componentId
- New component id.
public Table renderHint(java.lang.CharSequence renderHint)
Component
renderHint
in class Component
public void _clear()
Component
_clear
in class RenderableComponent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |