java.lang.Object | ||||
↳ | com.google.gwt.user.client.ui.UIObject | |||
↳ | com.google.gwt.user.client.ui.Widget | |||
↳ | com.google.gwt.user.client.ui.Panel | |||
↳ | com.google.gwt.user.client.ui.HTMLTable |
Known Direct Subclasses |
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
HTMLTable.Cell | Return value for getCellForEvent(ClickEvent) . |
||||||||||
HTMLTable.CellFormatter | This class contains methods used to format a table's cells. | ||||||||||
HTMLTable.ColumnFormatter | This class contains methods used to format a table's columns. | ||||||||||
HTMLTable.RowFormatter | This class contains methods used to format a table's rows. |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.google.gwt.user.client.ui.UIObject
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Create a new empty HTML Table.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Adds a
ClickEvent handler. | |||||||||||
Adds a
DoubleClickEvent handler. | |||||||||||
This method is deprecated.
add a click handler instead and use
getCellForEvent(ClickEvent) to get the cell
information (remember to check for a null return value)
| |||||||||||
Removes all widgets from this table, but does not remove other HTML or text
contents of cells.
| |||||||||||
Removes all widgets from this table, optionally clearing the inner HTML of
each cell.
| |||||||||||
Clears the cell at the given row and column.
| |||||||||||
Gets the number of cells in a given row.
| |||||||||||
Given a click event, return the Cell that was clicked, or null if the event
did not hit this table.
| |||||||||||
Gets the
HTMLTable.CellFormatter associated with this table. | |||||||||||
Gets the amount of padding that is added around all cells.
| |||||||||||
Gets the amount of spacing that is added around all cells.
| |||||||||||
Gets the column formatter.
| |||||||||||
Gets the HTML contents of the specified cell.
| |||||||||||
Gets the number of rows present in this table.
| |||||||||||
Gets the RowFormatter associated with this table.
| |||||||||||
Gets the text within the specified cell.
| |||||||||||
Gets the widget in the specified cell.
| |||||||||||
Determines whether the specified cell exists.
| |||||||||||
Returns an iterator containing all the widgets in this table.
| |||||||||||
Remove the specified widget from the table.
| |||||||||||
This method is deprecated.
Use the
removeHandler()
method on the object returned by an add*Handler method instead
| |||||||||||
Sets the width of the table's border.
| |||||||||||
Sets the amount of padding to be added around all cells.
| |||||||||||
Sets the amount of spacing to be added around all cells.
| |||||||||||
Sets the HTML contents of the specified cell.
| |||||||||||
Sets the HTML contents of the specified cell.
| |||||||||||
Sets the text within the specified cell.
| |||||||||||
Sets the widget within the specified cell.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Bounds checks that the cell exists at the specified location.
| |||||||||||
Checks that the row is within the correct bounds.
| |||||||||||
Creates a new cell.
| |||||||||||
Gets the table's TBODY element.
| |||||||||||
Directly ask the underlying DOM what the cell count on the given row is.
| |||||||||||
Directly ask the underlying DOM what the cell count on the given row is.
| |||||||||||
Directly ask the underlying DOM what the row count is.
| |||||||||||
Determines the TD associated with the specified event.
| |||||||||||
Inserts a new cell into the specified row.
| |||||||||||
Inserts a number of cells before the specified cell.
| |||||||||||
Inserts a new row into the table.
| |||||||||||
Does actual clearing, used by clearCell and cleanCell.
| |||||||||||
Affected Elements:
| |||||||||||
Subclasses must implement this method.
| |||||||||||
Subclasses can implement this method.
| |||||||||||
Subclasses must implement this method.
| |||||||||||
Removes the specified cell from the table.
| |||||||||||
Removes the specified row from the table.
| |||||||||||
Sets the table's CellFormatter.
| |||||||||||
Sets the table's RowFormatter.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.google.gwt.user.client.ui.Panel
| |||||||||||
From class
com.google.gwt.user.client.ui.Widget
| |||||||||||
From class
com.google.gwt.user.client.ui.UIObject
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
com.google.gwt.event.dom.client.HasClickHandlers
| |||||||||||
From interface
com.google.gwt.event.dom.client.HasDoubleClickHandlers
| |||||||||||
From interface com.google.gwt.event.logical.shared.HasAttachHandlers | |||||||||||
From interface com.google.gwt.event.shared.HasHandlers | |||||||||||
From interface
com.google.gwt.user.client.EventListener
| |||||||||||
From interface
com.google.gwt.user.client.ui.HasWidgets
| |||||||||||
From interface
com.google.gwt.user.client.ui.HasWidgets.ForIsWidget
| |||||||||||
From interface
com.google.gwt.user.client.ui.IsWidget
| |||||||||||
From interface
com.google.gwt.user.client.ui.SourcesTableEvents
| |||||||||||
From interface
java.lang.Iterable
|
Create a new empty HTML Table.
Adds a ClickEvent
handler.
handler | the click handler |
---|
HandlerRegistration
used to remove this handler
Adds a DoubleClickEvent
handler.
handler | the double click handler |
---|
HandlerRegistration
used to remove this handler
This method is deprecated.
add a click handler instead and use
getCellForEvent(ClickEvent)
to get the cell
information (remember to check for a null return value)
Adds a listener to the current table.
listener | listener to add |
---|
Removes all widgets from this table, but does not remove other HTML or text contents of cells.
Removes all widgets from this table, optionally clearing the inner HTML of each cell. Note that this method does not remove any cells or rows.
clearInnerHTML | should the cell's inner html be cleared? |
---|
Clears the cell at the given row and column. If it contains a Widget, it will be removed from the table. If not, its contents will simply be cleared.
row | the widget's row |
---|---|
column | the widget's column |
IndexOutOfBoundsException |
---|
Gets the number of cells in a given row.
row | the row whose cells are to be counted |
---|
Given a click event, return the Cell that was clicked, or null if the event did not hit this table. The cell can also be null if the click event does not occur on a specific cell.
event | A click event of indeterminate origin |
---|
Gets the HTMLTable.CellFormatter
associated with this table. Use casting to
get subclass-specific functionality
Gets the amount of padding that is added around all cells.
Gets the amount of spacing that is added around all cells.
Gets the column formatter.
Gets the HTML contents of the specified cell.
row | the cell's row |
---|---|
column | the cell's column |
IndexOutOfBoundsException |
---|
Gets the number of rows present in this table.
Gets the RowFormatter associated with this table.
Gets the text within the specified cell.
row | the cell's row |
---|---|
column | the cell's column |
IndexOutOfBoundsException |
---|
Gets the widget in the specified cell.
row | the cell's row |
---|---|
column | the cell's column |
null
if none is
presentIndexOutOfBoundsException |
---|
Determines whether the specified cell exists.
row | the cell's row |
---|---|
column | the cell's column |
true
if the specified cell exists
Returns an iterator containing all the widgets in this table.
Remove the specified widget from the table.
widget | widget to remove |
---|
This method is deprecated.
Use the removeHandler()
method on the object returned by an add*Handler method instead
Removes the specified table listener.
listener | listener to remove |
---|
Sets the width of the table's border. This border is displayed around all cells in the table.
width | the width of the border, in pixels |
---|
Sets the amount of padding to be added around all cells.
padding | the cell padding, in pixels |
---|
Sets the amount of spacing to be added around all cells.
spacing | the cell spacing, in pixels |
---|
Sets the HTML contents of the specified cell.
row | the cell's row |
---|---|
column | the cell's column |
html | the cell's safe html contents |
IndexOutOfBoundsException |
---|
Sets the HTML contents of the specified cell.
row | the cell's row |
---|---|
column | the cell's column |
html | the cell's HTML contents |
IndexOutOfBoundsException |
---|
Sets the text within the specified cell.
row | the cell's row |
---|---|
column | cell's column |
text | the cell's text contents |
IndexOutOfBoundsException |
---|
Sets the widget within the specified cell.
Inherited implementations may either throw IndexOutOfBounds exception if the cell does not exist, or allocate a new cell to store the content.
FlexTable will automatically allocate the cell at the correct location and then set the widget. Grid will set the widget if and only if the cell is within the Grid's bounding box.
row | the cell's row |
---|---|
column | the cell's column |
widget | The widget to be added |
IndexOutOfBoundsException |
---|
Bounds checks that the cell exists at the specified location.
row | cell's row |
---|---|
column | cell's column |
IndexOutOfBoundsException |
---|
Checks that the row is within the correct bounds.
row | row index to check |
---|
IndexOutOfBoundsException |
---|
Creates a new cell. Override this method if the cell should have initial contents.
Directly ask the underlying DOM what the cell count on the given row is.
row | the row |
---|
Directly ask the underlying DOM what the cell count on the given row is.
tableBody | the element |
---|---|
row | the row |
Directly ask the underlying DOM what the row count is.
Determines the TD associated with the specified event.
event | the event to be queried |
---|
null
if none is
found.
Inserts a new cell into the specified row.
row | the row into which the new cell will be inserted |
---|---|
column | the column before which the cell will be inserted |
IndexOutOfBoundsException |
---|
Inserts a number of cells before the specified cell.
row | the row into which the new cells will be inserted |
---|---|
column | the column before which the new cells will be inserted |
count | number of cells to be inserted |
IndexOutOfBoundsException |
---|
Inserts a new row into the table.
beforeRow | the index before which the new row will be inserted |
---|
IndexOutOfBoundsException |
---|
Does actual clearing, used by clearCell and cleanCell. All HTMLTable methods should use internalClearCell rather than clearCell, as clearCell may be overridden in subclasses to format an empty cell.
td | element to clear |
---|---|
clearInnerHTML | should the cell's inner html be cleared? |
Affected Elements:
baseID | the base ID used by the main element |
---|
Subclasses must implement this method. It allows them to decide what to do
just before a cell is accessed. If the cell already exists, this method
must do nothing. Otherwise, a subclass must either ensure that the cell
exists or throw an IndexOutOfBoundsException
.
row | the cell's row |
---|---|
column | the cell's column |
Subclasses can implement this method. It allows them to decide what to do
just before a column is accessed. For classes, such as
FlexTable
, that do not have a concept of a global column
length can ignore this method.
column | the cell's column |
---|
IndexOutOfBoundsException |
---|
Subclasses must implement this method. If the row already exists, this
method must do nothing. Otherwise, a subclass must either ensure that the
row exists or throw an IndexOutOfBoundsException
.
row | the cell's row |
---|
Removes the specified cell from the table.
row | the row of the cell to remove |
---|---|
column | the column of cell to remove |
IndexOutOfBoundsException |
---|
Removes the specified row from the table.
row | the index of the row to be removed |
---|
IndexOutOfBoundsException |
---|
Sets the table's CellFormatter.
cellFormatter | the table's cell formatter |
---|
Sets the table's RowFormatter.
rowFormatter | the table's row formatter |
---|