|
GWT Tk 0.2.3 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.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.ComplexPanel
com.google.gwt.user.client.ui.CellPanel
asquare.gwt.tk.client.ui.ExposedCellPanel
public abstract class ExposedCellPanel
A table-based panel which exposes the TD element
and supports:
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasHorizontalAlignment |
|---|
HasHorizontalAlignment.HorizontalAlignmentConstant |
| Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasVerticalAlignment |
|---|
HasVerticalAlignment.VerticalAlignmentConstant |
| Field Summary |
|---|
| Fields inherited from interface com.google.gwt.user.client.ui.HasHorizontalAlignment |
|---|
ALIGN_CENTER, ALIGN_LEFT, ALIGN_RIGHT |
| Fields inherited from interface com.google.gwt.user.client.ui.HasVerticalAlignment |
|---|
ALIGN_BOTTOM, ALIGN_MIDDLE, ALIGN_TOP |
| Method Summary | |
|---|---|
void |
add(Widget w)
Creates a new cell and appends to it the specified widget. |
void |
addCell()
Adds a new cell to the panel. |
void |
addCellStyleName(int cellIndex,
String styleName)
Adds a style name to the class attribute of the cell
specified by the cellIndex. |
void |
addCellStyleName(String styleName)
Adds a style name to the last cell. |
void |
addWidget(Widget w,
boolean newCell)
Adds a widget to the panel, optionally creating a new cell. |
void |
addWidgetTo(Widget w,
int cellIndex)
Adds a widget to the specified cell. |
void |
clear()
Removes all cells and child widgets from the panel. |
void |
clearCell(int cellIndex)
Removes all widgets and child elements from the cell |
int |
getCellCount()
Gets the number of cells in this panel. |
abstract Element |
getCellElement(int cellIndex)
Gets the table td element corresponding to the specified
cell. |
int |
getCellIndexOf(Widget w)
Get the index of the cell which contains the specified widget. |
String |
getCellStyleName(int cellIndex)
Gets the style name(s) for the cell specified by cellIndex. |
HasHorizontalAlignment.HorizontalAlignmentConstant |
getHorizontalAlignment()
Gets the default horizontal alignment for newly created cells. |
HasVerticalAlignment.VerticalAlignmentConstant |
getVerticalAlignment()
Gets the default vertical alignment for newly created cells. |
Widget |
getWidgetAt(int cellIndex,
int wIndex)
Gets a at the specified index in the specified cell. |
int |
getWidgetCount()
Gets the number of child widgets added to the panel |
void |
insert(Widget w,
int cellIndex)
Inserts a new cell at the specified index and appends the widget to the cell. |
void |
insertCell(int cellIndex)
Creates a new cell and inserts it at the specified index. |
protected abstract void |
insertCellStructure(int cellIndex)
A template method which creates a td and inserts it into the underlying table. |
void |
insertWidgetAt(Widget w,
int cellIndex,
int wIndex)
Inserts a widget into a an existing cell. |
boolean |
remove(Widget w)
Removes a widget from the panel. |
boolean |
remove(Widget w,
boolean removeEmptyCell)
Removes a widget from the panel, optionally removing the cell if it becomes empty. |
void |
removeCell(int cellIndex)
Removes a cell from the panel, including any child widets. |
protected abstract void |
removeCellStructure(int cellIndex)
A template method which removes a td from the underlying table. |
void |
removeCellStyleName(int cellIndex,
String styleName)
Adds a style name to the cell specified by |
void |
removeCellStyleName(String styleName)
Removes the specified style name from the last cell. |
void |
setCellHeight(int cellIndex,
String height)
Sets the height of the specified cell. |
void |
setCellHeight(String height)
Sets the height of the last cell. |
void |
setCellHorizontalAlignment(HasHorizontalAlignment.HorizontalAlignmentConstant hAlign)
Sets the horizontal alignment of the last cell. |
void |
setCellHorizontalAlignment(int cellIndex,
HasHorizontalAlignment.HorizontalAlignmentConstant hAlign)
Sets the horizontal alignment of the specified cell. |
void |
setCellStyleName(int cellIndex,
String styleName)
Sets the style name for the cell specified by cellIndex. |
void |
setCellStyleName(String styleName)
Sets the style name for the last cell. |
void |
setCellVerticalAlignment(HasVerticalAlignment.VerticalAlignmentConstant vAlign)
Sets the vertical alignment of the last cell. |
void |
setCellVerticalAlignment(int cellIndex,
HasVerticalAlignment.VerticalAlignmentConstant vAlign)
Sets the vertical alignment of the specified cell. |
void |
setCellWidth(int cellIndex,
String width)
Sets the width of the specified cell. |
void |
setCellWidth(String width)
Sets the width of the last cell. |
void |
setHorizontalAlignment(HasHorizontalAlignment.HorizontalAlignmentConstant align)
Sets the default horizontal alignment for newly created cells. |
void |
setVerticalAlignment(HasVerticalAlignment.VerticalAlignmentConstant align)
Sets the default vertical alignment for newly created cells. |
| Methods inherited from class com.google.gwt.user.client.ui.CellPanel |
|---|
getBody, getSpacing, getTable, setBorderWidth, setCellHeight, setCellHorizontalAlignment, setCellVerticalAlignment, setCellWidth, setSpacing |
| Methods inherited from class com.google.gwt.user.client.ui.ComplexPanel |
|---|
add, getChildren, insert, iterator |
| Methods inherited from class com.google.gwt.user.client.ui.Panel |
|---|
adopt, disown, onAttach, onDetach |
| Methods inherited from class com.google.gwt.user.client.ui.Widget |
|---|
getParent, isAttached, onBrowserEvent, onLoad, removeFromParent |
| Methods inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
addStyleName, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleName, getTitle, isVisible, isVisible, removeStyleName, setElement, setHeight, setPixelSize, setSize, setStyleName, setStyleName, setTitle, setVisible, setVisible, setWidth, sinkEvents, toString, unsinkEvents |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public int getCellCount()
public void addCell()
public void insertCell(int cellIndex)
cellIndex will be shifted over by 1.
cellIndex - the index where the cell will be inserted
IndexOutOfBoundsException - if cellIndex is less
than 0 or greater than the number of cellsprotected abstract void insertCellStructure(int cellIndex)
cellIndex it will be
shifted up by 1. Implementors may assume cellIndex is
greater than 0 and less than or equal to the number of cells.
cellIndex - the index at which the td will be inserted.public void removeCell(int cellIndex)
cellIndex - the index of the cell
IndexOutOfBoundsException - if the cell specified by
cellIndex does not existpublic void clearCell(int cellIndex)
cellIndex - the index of the cell
IndexOutOfBoundsException - if cellIndex does not specify a valid
cellprotected abstract void removeCellStructure(int cellIndex)
cellIndex will be
shifted down by 1. Implementors may assume cellIndex is
greater than 0 and less than the number of cells.
cellIndex - the index at which the td will be inserted.public void clear()
clear in interface HasWidgetsclear in class Panelpublic int getWidgetCount()
public Widget getWidgetAt(int cellIndex,
int wIndex)
wIndex
does not include non-widget child elements.
cellIndex - the index of the cell, starting with 0wIndex - the index of the widget in the specified cell, starting at
0
IndexOutOfBoundsException - if the cell specified by
cellIndex does not exist
IndexOutOfBoundsException - if the widget specified by
wIndex does not existpublic int getCellIndexOf(Widget w)
w - a child widget
-1 if the widget is not a child of
this panelpublic void add(Widget w)
add in interface HasWidgetsadd in class Panelw - a widget
public void addWidget(Widget w,
boolean newCell)
w - a widgetnewCell - true to create a new cell,
false to append to the last cell
IndexOutOfBoundsException - if newCell is
false and no cells exist
public void addWidgetTo(Widget w,
int cellIndex)
w will be appended
after any other widgets in the cell.
w - a widgetcellIndex - the index of the cell
IndexOutOfBoundsException - if the cell specified by
cellIndex does not exist
public void insert(Widget w,
int cellIndex)
w - a widgetcellIndex - the index of the cell
IndexOutOfBoundsException - if cellIndex is less
than 0 or greater than the number of cells
public void insertWidgetAt(Widget w,
int cellIndex,
int wIndex)
wIndex will be shifted over.
w - a widgetcellIndex - the index of the cellwIndex - the index of the widget before which w will
be inserted
IndexOutOfBoundsException - if the cell specified by
cellIndex does not exist
IndexOutOfBoundsException - if wIndex is less than 0
or greater than the number of widgets in the specified cellpublic boolean remove(Widget w)
remove in interface HasWidgetsremove in class ComplexPanelw - a child widget
w is not a child of this panel
public boolean remove(Widget w,
boolean removeEmptyCell)
w - a child widgetremoveEmptyCell - true to remove the cell if it
becomes empty
w is not a child of this panelpublic abstract Element getCellElement(int cellIndex)
td element corresponding to the specified
cell.
cellIndex - the index of the cell
td element of the specified cell
IndexOutOfBoundsException - if cellIndex does not
specify an existing cellpublic String getCellStyleName(int cellIndex)
cellIndex.
cellIndex - the index of the cell
IndexOutOfBoundsException - if the cell specified by
cellIndex does not existpublic void addCellStyleName(String styleName)
styleName - a CSS class name
IllegalStateException - if no cells exist
IllegalArgumentException - if styleName is ""
public void addCellStyleName(int cellIndex,
String styleName)
class attribute of the cell
specified by the cellIndex.
cellIndex - the index of a cellstyleName - a CSS class name
IndexOutOfBoundsException - if the cell specified by
cellIndex does not exist
IllegalArgumentException - if styleName is ""public void setCellStyleName(String styleName)
styleName - a CSS class name
IllegalStateException - if no cells exist
public void setCellStyleName(int cellIndex,
String styleName)
cellIndex. Other style names will be
overwritten.
cellIndex - the index of the cellstyleName - a CSS class name
IndexOutOfBoundsException - if the cell specified by
cellIndex does not existpublic void removeCellStyleName(String styleName)
styleName is not present.
styleName - a CSS class name
IllegalStateException - if no cells exist
IllegalArgumentException - if styleName is
""
public void removeCellStyleName(int cellIndex,
String styleName)
. Does nothing if
styleName is not present.
- Parameters:
cellIndex - the index of the cellstyleName - a CSS class name
- Throws:
IndexOutOfBoundsException - if the cell specified by
cellIndex does not exist
IllegalArgumentException - if styleName is ""
public void setCellWidth(String width)
width - a CSS measurement
public void setCellWidth(int cellIndex,
String width)
cellIndex - the index of a cellwidth - a CSS measurement
IndexOutOfBoundsException - if the cell specified by
cellIndex does not existpublic void setCellHeight(String height)
height - a CSS measurement
public void setCellHeight(int cellIndex,
String height)
cellIndex - the index of a cellheight - a CSS measurement
IndexOutOfBoundsException - if the cell specified by
cellIndex does not existpublic void setCellHorizontalAlignment(HasHorizontalAlignment.HorizontalAlignmentConstant hAlign)
hAlign - a constant representing left, center or right alignmentHasAlignment
public void setCellHorizontalAlignment(int cellIndex,
HasHorizontalAlignment.HorizontalAlignmentConstant hAlign)
cellIndex - the index of a cellhAlign - a constant representing left, center or right alignment
IndexOutOfBoundsException - if the cell specified by
cellIndex does not existHasAlignmentpublic void setCellVerticalAlignment(HasVerticalAlignment.VerticalAlignmentConstant vAlign)
vAlign - a constant representing top, middle or bottom alignmentHasAlignment
public void setCellVerticalAlignment(int cellIndex,
HasVerticalAlignment.VerticalAlignmentConstant vAlign)
cellIndex - the index of a cellvAlign - a constant representing top, middle or bottom alignment
IndexOutOfBoundsException - if the cell specified by
cellIndex does not existHasAlignmentpublic HasHorizontalAlignment.HorizontalAlignmentConstant getHorizontalAlignment()
getHorizontalAlignment in interface HasHorizontalAlignmentHasAlignmentpublic void setHorizontalAlignment(HasHorizontalAlignment.HorizontalAlignmentConstant align)
setHorizontalAlignment in interface HasHorizontalAlignmentalign - an alignment constant or nullHasAlignmentpublic HasVerticalAlignment.VerticalAlignmentConstant getVerticalAlignment()
getVerticalAlignment in interface HasVerticalAlignmentHasAlignmentpublic void setVerticalAlignment(HasVerticalAlignment.VerticalAlignmentConstant align)
setVerticalAlignment in interface HasVerticalAlignmentalign - an alignment constant or nullHasAlignment
|
GWT Tk 0.2.3 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||