public class WidgetTable
extends com.google.gwt.user.client.ui.Panel
| Modifier and Type | Field and Description |
|---|---|
protected List<com.google.gwt.user.client.ui.Widget> |
children |
protected Map<Integer,String> |
columnClasses
Extra class information for the data column TD's.
|
protected int |
columnCount |
protected List<com.google.gwt.user.client.Element> |
rowElements |
protected com.google.gwt.user.client.Element |
tbody |
protected com.google.gwt.user.client.Element |
thead |
protected Map<com.google.gwt.user.client.ui.Widget,com.google.gwt.user.client.Element> |
wrapperMap
Map of widget to td element.
|
| Constructor and Description |
|---|
WidgetTable()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
com.google.gwt.user.client.Element |
add(int rowIndex,
int colIndex,
com.google.gwt.user.client.ui.Widget widget)
Adds a single widget to the table, at the right row and column.
|
void |
add(com.google.gwt.user.client.ui.Widget widget) |
void |
clear() |
com.google.gwt.user.client.Element |
getRow(int rowIndex)
Gets the row element at a given index.
|
int |
getRowCount() |
protected void |
init()
Init the thead and tbody.
|
Iterator<com.google.gwt.user.client.ui.Widget> |
iterator() |
boolean |
remove(com.google.gwt.user.client.ui.Widget w) |
void |
setColumnClasses(int columnIndex,
String classes)
Add extra class information that will be added to the TD for all data
rows (at the given column index).
|
void |
setColumnLabels(String... labels)
Creates the thead and th elements, with the given labels.
|
add, adopt, adopt, disown, doAttachChildren, doDetachChildren, orphan, removeaddAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEventsaddStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString, unsinkEventsprotected List<com.google.gwt.user.client.ui.Widget> children
protected Map<com.google.gwt.user.client.ui.Widget,com.google.gwt.user.client.Element> wrapperMap
protected int columnCount
protected com.google.gwt.user.client.Element thead
protected com.google.gwt.user.client.Element tbody
protected List<com.google.gwt.user.client.Element> rowElements
protected void init()
public void setColumnLabels(String... labels)
labels - public void add(com.google.gwt.user.client.ui.Widget widget)
add in interface com.google.gwt.user.client.ui.HasWidgetsadd in class com.google.gwt.user.client.ui.PanelPanel.add(com.google.gwt.user.client.ui.Widget)public com.google.gwt.user.client.Element add(int rowIndex,
int colIndex,
com.google.gwt.user.client.ui.Widget widget)
rowIndex - which row to add to (0 based, excluding thead)colIndex - which column to add to (0 based)widget - the widget to add to the tablepublic com.google.gwt.user.client.Element getRow(int rowIndex)
rowIndex - public void clear()
clear in interface com.google.gwt.user.client.ui.HasWidgetsclear in class com.google.gwt.user.client.ui.PanelPanel.clear()public Iterator<com.google.gwt.user.client.ui.Widget> iterator()
HasWidgets.iterator()public boolean remove(com.google.gwt.user.client.ui.Widget w)
remove in interface com.google.gwt.user.client.ui.HasWidgetsremove in class com.google.gwt.user.client.ui.PanelPanel.remove(com.google.gwt.user.client.ui.Widget)public int getRowCount()
public void setColumnClasses(int columnIndex,
String classes)
columnIndex - 0 based column indexclasses - additional html class informationCopyright © 2012-2013 JBoss, a division of Red Hat. All Rights Reserved.