com.sage.swt.client.widget
Interface HasWidgetsInCells

All Superinterfaces:
com.google.gwt.user.client.ui.HasWidgets, java.lang.Iterable<com.google.gwt.user.client.ui.Widget>
All Known Subinterfaces:
HasCellSpan, HasWidgetsInGrid
All Known Implementing Classes:
SwtFlexTable, SwtGridPanel

public interface HasWidgetsInCells
extends com.google.gwt.user.client.ui.HasWidgets

Interface for cell-type widgets (usually panels) that contain child widgets in grid cells. Those children are accessible by their row and column coordinates. In addition to the HasWidgets methods, this interfaces includes row and column related methods (such as for accessing a child widget by its row and column coordinate).


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasWidgets
com.google.gwt.user.client.ui.HasWidgets.ForIsWidget
 
Method Summary
 boolean clearCell(int row, int column)
          Clears the specified cell, removing its widget (if any).
 int getCellCount(int row)
          Gets the number of cells in the specified row.
 int getRowCount()
          Gets the number of rows in the grid.
 com.google.gwt.user.client.ui.Widget getWidget(int row, int column)
          Gets the widget located in the specified cell.
 boolean isCellPresent(int row, int column)
          Returns whether or not the specified cell exists (not necessarily whether or not it contains a widget).
 void setRowCount(int rows)
          Sets the number of rows in the grid, resizing the grid to have that number of rows.
 void setWidget(int row, int column, com.google.gwt.user.client.ui.Widget widget)
          Sets the widget within the specified cell, removing any existing widget that was located in that cell.
 
Methods inherited from interface com.google.gwt.user.client.ui.HasWidgets
add, clear, iterator, remove
 

Method Detail

getRowCount

int getRowCount()
Gets the number of rows in the grid.

Returns:
The number of rows in the grid.

setRowCount

void setRowCount(int rows)
Sets the number of rows in the grid, resizing the grid to have that number of rows.

Parameters:
rows - The new number of rows in the grid.

clearCell

boolean clearCell(int row,
                  int column)
Clears the specified cell, removing its widget (if any).

Parameters:
row - The cell's 0-based row
column - The cell's 0-based column
Returns:
true if the widget was removed.

getCellCount

int getCellCount(int row)
Gets the number of cells in the specified row.

Parameters:
row - The 0-based row
Returns:
The number of cells in the specified row.

isCellPresent

boolean isCellPresent(int row,
                      int column)
Returns whether or not the specified cell exists (not necessarily whether or not it contains a widget).

Parameters:
row - The cell's 0-based row
column - The cell's 0-based column
Returns:
Whether or not there is a cell at the specified row and column.

getWidget

com.google.gwt.user.client.ui.Widget getWidget(int row,
                                               int column)
Gets the widget located in the specified cell.

Parameters:
row - The cell's 0-based row
column - The cell's 0-based column
Returns:
The widget located at the specified row and column.

setWidget

void setWidget(int row,
               int column,
               com.google.gwt.user.client.ui.Widget widget)
Sets the widget within the specified cell, removing any existing widget that was located in that cell.

Parameters:
row - The cell's 0-based row
column - The cell's 0-based column
widget - The widget to set in that cell.


Copyright © 2011 Sage Software, Inc. All rights reserved.