|
|||||||||
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.extjs.gxt.ui.client.widget.Component
com.extjs.gxt.ui.client.widget.BoxComponent
com.extjs.gxt.ui.client.widget.Container<TableItem>
com.extjs.gxt.ui.client.widget.table.Table
Grid
public class Table
The table is used to display two-dimensional table of cells.
When using custom cell renderers or nested widgets within cells it may be nesseccary to increase the cell selector depth to account for the new nested elements within each cell. For example, if nesting a table structure in a cell, the selector depth should be increased to at least a value of 10 (@seeTableView.setCellSelectorDepth(int)
.
BaseEvent.setCancelled(boolean)
.BaseEvent.setCancelled(boolean)
.BaseEvent.setCancelled(boolean)
.BaseEvent.setCancelled(boolean)
.BaseEvent.setCancelled(boolean)
.BaseEvent.setCancelled(boolean)
.
TableColumn
,
TableColumnModel
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject |
---|
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled |
Field Summary | |
---|---|
protected boolean |
bulkRender
Deprecated. |
protected TableColumnModel |
cm
Deprecated. The table's column model. |
protected TableHeader |
header
Deprecated. The table header. |
protected TableSelectionModel |
sm
Deprecated. The selection model. |
Fields inherited from class com.extjs.gxt.ui.client.widget.Container |
---|
attachChildren, enableLayout, layoutExecuted, layoutNeeded, layoutOnAttach, layoutOnChange |
Fields inherited from class com.extjs.gxt.ui.client.widget.BoxComponent |
---|
adjustSize, cacheSizes, ensureVisibilityOnSizing, height, layer, shim, width |
Fields inherited from class com.extjs.gxt.ui.client.widget.Component |
---|
afterRender, attachables, baseStyle, disabled, disabledStyle, disableTextSelection, dummy, focusable, hidden, mask, maskMessage, maskMessageStyleName, monitorWindowResize, rendered, resizeHandler, setElementRender, stateId, swallowEvents, toolTip, windowResizeDelay, windowResizeTask |
Fields inherited from class com.google.gwt.user.client.ui.UIObject |
---|
DEBUG_ID_PREFIX |
Constructor Summary | |
---|---|
Table()
Deprecated. Creates a new single select table. |
|
Table(TableColumnModel cm)
Deprecated. Creates a new table. |
Method Summary | |
---|---|
boolean |
add(TableItem item)
Deprecated. Adds a item to the container. |
void |
addTableListener(TableListener listener)
Deprecated. Adds a table listener. |
protected ComponentEvent |
createComponentEvent(com.google.gwt.user.client.Event event)
Deprecated. |
protected ContainerEvent |
createContainerEvent(TableItem item)
Deprecated. |
protected void |
doAttachChildren()
Deprecated. |
protected void |
doDetachChildren()
Deprecated. |
TableItem |
findItem(com.google.gwt.user.client.Element elem)
Deprecated. Returns the component whose element, or child element, matches the given element. |
boolean |
getBulkRender()
Deprecated. Returns true if bulk rendering is enabled. |
TableColumn |
getColumn(int index)
Deprecated. Returns the column at the specified index. |
TableColumn |
getColumn(java.lang.String id)
Deprecated. Returns the column with the given id. |
boolean |
getColumnContextMenu()
Deprecated. Returns the column context menu enabed state. |
int |
getColumnCount()
Deprecated. Returns the number of columns contained in the table. |
TableColumnModel |
getColumnModel()
Deprecated. Returns the table's column model. |
Menu |
getContextMenu()
Deprecated. Returns the component's context menu. |
boolean |
getHighlight()
Deprecated. Returns true if highlights are enabled. |
boolean |
getHorizontalScroll()
Deprecated. Returns true if horizontal scrolling is enabled |
protected java.lang.String |
getRenderedValue(TableItem item,
int column,
java.lang.Object value)
Deprecated. |
TableItem |
getSelectedItem()
Deprecated. Returns the selected item. |
java.util.List<TableItem> |
getSelectedItems()
Deprecated. Returns the selected items. |
Style.SelectionMode |
getSelectionMode()
Deprecated. |
TableSelectionModel |
getSelectionModel()
Deprecated. Returns the table's selection model. |
TableHeader |
getTableHeader()
Deprecated. Returns the table's header. |
boolean |
getVerticalLines()
Deprecated. Returns true if vertical lines are enabled. |
TableView |
getView()
Deprecated. Returns the table's view. |
boolean |
insert(TableItem item,
int index)
Deprecated. Adds a item into the container. |
boolean |
isStripeRows()
Deprecated. Returns true if row striping is enabled. |
void |
onAttach()
Deprecated. |
void |
onBrowserEvent(com.google.gwt.user.client.Event event)
Deprecated. Components delegate event handling to Component.onComponentEvent(ComponentEvent) . |
void |
onComponentEvent(ComponentEvent ce)
Deprecated. Any events a component receives will be forwarded to this method. |
protected void |
onKeyPress(TableEvent te)
Deprecated. |
protected void |
onRender(com.google.gwt.user.client.Element target,
int index)
Deprecated. Subclasses must override and ensure setElement is called for lazy rendered components. |
protected void |
onResize(int width,
int height)
Deprecated. Called after the component is resized, this method is empty by default but can be implemented by any subclass that needs to perform custom logic after a resize occurs. |
void |
onSelectChange(TableItem item,
boolean select)
Deprecated. Called when the visual state of a item is changed. |
protected void |
onShowContextMenu(int x,
int y)
Deprecated. |
protected ComponentEvent |
previewEvent(EventType type,
ComponentEvent ce)
Deprecated. |
void |
recalculate()
Deprecated. Called when the component is in a LayoutContainer and the container's layout executes. |
boolean |
remove(TableItem item)
Deprecated. Removes the item from the container. |
void |
removeTableLisetener(TableListener listener)
Deprecated. Remvoves a table listener. |
void |
scrollIntoView(TableItem item)
Deprecated. Scrolls the item into view. |
void |
setBulkRender(boolean bulkRender)
Deprecated. True to bulk render the table when first rendered (defaults to true). |
void |
setColumnContextMenu(boolean columnContextMenu)
Deprecated. Sets whether the table header context menu is displayed (defaults to true). |
void |
setColumnModel(TableColumnModel cm)
Deprecated. Sets the table's column model. |
void |
setContextMenu(Menu menu)
Deprecated. Sets the component's context menu. |
void |
setHighlight(boolean highlight)
Deprecated. True to highlight the current row (defaults to true). |
void |
setHorizontalScroll(boolean horizontalScroll)
Deprecated. True to display a horizonatal scroll bar when needed (defaults to true). |
void |
setSelectedItem(TableItem item)
Deprecated. Selects the item. |
void |
setSelectedItems(java.util.List<TableItem> items)
Deprecated. Selects the items. |
void |
setSelectionMode(Style.SelectionMode mode)
Deprecated. Sets the table's selection mode. |
void |
setSelectionModel(TableSelectionModel sm)
Deprecated. Sets the table's selection model. |
void |
setStripeRows(boolean stripeRows)
Deprecated. True to stripe the rows (defaults to false). |
void |
setTableHeader(TableHeader header)
Deprecated. Sets the table's header. |
void |
setVerticalLines(boolean verticalLines)
Deprecated. True to display vertical borders on the table data (defaults to false). |
void |
setView(TableView view)
Deprecated. Sets the table's view. |
void |
sort(int index,
Style.SortDir sortDir)
Deprecated. Sorts the table using the specified column index. |
Methods inherited from class com.extjs.gxt.ui.client.widget.Container |
---|
adjustIndex, adopt, disable, doLayout, doLayout, enable, getItem, getItemByItemId, getItemCount, getItems, getLayout, getLayoutTarget, getWidget, indexOf, isLayoutNeeded, iterator, layout, layout, notifyHide, notifyShow, onAfterLayout, onBeforeLayoutExcecuted, onInsert, onLayoutExcecuted, onRemove, orphan, remove, removeAll, removeAll, setLayout, setLayoutNeeded, setLayoutOnChange, wrapWidget |
Methods inherited from class com.extjs.gxt.ui.client.widget.BoxComponent |
---|
adjustPosition, adjustSize, afterRender, getBounds, getHeight, getHeight, getPosition, getPositionEl, getResizeEl, getShadow, getShadowOffset, getShadowPosition, getSize, getWidth, getWidth, hideShadow, hideShim, hideUnders, isAutoHeight, isAutoWidth, isDeferHeight, isShim, onHide, onPosition, onShow, onUnload, setAutoHeight, setAutoWidth, setBounds, setBounds, setDeferHeight, setHeight, setHeight, setPagePosition, setPagePosition, setPixelSize, setPosition, setShadow, setShadowOffset, setShadowPosition, setShim, setSize, setSize, setWidth, setWidth, sync, syncSize |
Methods inherited from class com.google.gwt.user.client.ui.Widget |
---|
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, setLayoutData |
Methods inherited from class com.google.gwt.user.client.ui.UIObject |
---|
addStyleDependentName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, removeStyleDependentName, setElement, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkBitlessEvent, unsinkEvents |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected TableColumnModel cm
protected TableSelectionModel sm
protected TableHeader header
protected boolean bulkRender
Constructor Detail |
---|
public Table()
public Table(TableColumnModel cm)
cm
- the column modelMethod Detail |
---|
public boolean add(TableItem item)
Container
add
in class Container<TableItem>
item
- the item to be addedpublic void addTableListener(TableListener listener)
listener
- thet able listenerpublic TableItem findItem(com.google.gwt.user.client.Element elem)
Container
findItem
in class Container<TableItem>
elem
- the element
null
if no matchpublic boolean getBulkRender()
public TableColumn getColumn(int index)
getColumn
in interface BaseTable
index
- the column index
public TableColumn getColumn(java.lang.String id)
id
- the column id
public boolean getColumnContextMenu()
getColumnContextMenu
in interface BaseTable
true
if enabled, false
otherwise.public int getColumnCount()
public TableColumnModel getColumnModel()
getColumnModel
in interface BaseTable
public Menu getContextMenu()
Component
getContextMenu
in class Component
public boolean getHighlight()
public boolean getHorizontalScroll()
public TableItem getSelectedItem()
Selectable
getSelectedItem
in interface Selectable<TableItem>
public java.util.List<TableItem> getSelectedItems()
Selectable
getSelectedItems
in interface Selectable<TableItem>
public Style.SelectionMode getSelectionMode()
public TableSelectionModel getSelectionModel()
public TableHeader getTableHeader()
getTableHeader
in interface BaseTable
public boolean getVerticalLines()
public TableView getView()
public boolean insert(TableItem item, int index)
Container
insert
in class Container<TableItem>
item
- the item to insertindex
- the insert locationpublic boolean isStripeRows()
public void onAttach()
onAttach
in class Container<TableItem>
public void onBrowserEvent(com.google.gwt.user.client.Event event)
Component
Component.onComponentEvent(ComponentEvent)
. Subclasses should not override.
onBrowserEvent
in interface com.google.gwt.user.client.EventListener
onBrowserEvent
in class Component
event
- the dom eventpublic void onComponentEvent(ComponentEvent ce)
Component
Component.onBrowserEvent(com.google.gwt.user.client.Event)
method
should not be overridden or modified.
onComponentEvent
in class Component
ce
- the base eventpublic void onSelectChange(TableItem item, boolean select)
Selectable
onSelectChange
in interface Selectable<TableItem>
item
- the itemselect
- the select statepublic void recalculate()
Component
recalculate
in class Component
public boolean remove(TableItem item)
Container
remove
in class Container<TableItem>
item
- the item to remove
true
if the item was removedpublic void removeTableLisetener(TableListener listener)
listener
- the table listenerpublic void scrollIntoView(TableItem item)
Container
scrollIntoView
in class Container<TableItem>
item
- the itempublic void setBulkRender(boolean bulkRender)
bulkRender
- true for bulk renderingpublic void setColumnContextMenu(boolean columnContextMenu)
columnContextMenu
- the column context menu satepublic void setColumnModel(TableColumnModel cm)
cm
- the column modelpublic void setContextMenu(Menu menu)
Component
setContextMenu
in class Component
menu
- the context menupublic void setHighlight(boolean highlight)
highlight
- the highlight statepublic void setHorizontalScroll(boolean horizontalScroll)
horizontalScroll
- the horizontal scroll statepublic void setSelectedItem(TableItem item)
Selectable
setSelectedItem
in interface Selectable<TableItem>
item
- the item to selectpublic void setSelectedItems(java.util.List<TableItem> items)
Selectable
setSelectedItems
in interface Selectable<TableItem>
items
- the items to selectpublic void setSelectionMode(Style.SelectionMode mode)
mode
- the selection modepublic void setSelectionModel(TableSelectionModel sm)
sm
- the selection modelpublic void setStripeRows(boolean stripeRows)
stripeRows
- true to strip rowspublic void setTableHeader(TableHeader header)
header
- the table headerpublic void setVerticalLines(boolean verticalLines)
verticalLines
- true for vertical linespublic void setView(TableView view)
view
- the viewpublic void sort(int index, Style.SortDir sortDir)
sort
in interface BaseTable
index
- the column indexsortDir
- the direction to sort (NONE, ASC, DESC)protected ComponentEvent createComponentEvent(com.google.gwt.user.client.Event event)
createComponentEvent
in class BoxComponent
protected ContainerEvent createContainerEvent(TableItem item)
createContainerEvent
in class Container<TableItem>
protected void doAttachChildren()
doAttachChildren
in class Container<TableItem>
protected void doDetachChildren()
doDetachChildren
in class Container<TableItem>
protected java.lang.String getRenderedValue(TableItem item, int column, java.lang.Object value)
protected void onKeyPress(TableEvent te)
protected void onRender(com.google.gwt.user.client.Element target, int index)
Component
onRender
in class Component
target
- the target elementindex
- the insert locationprotected void onResize(int width, int height)
BoxComponent
onResize
in class BoxComponent
width
- the widthheight
- the heightprotected void onShowContextMenu(int x, int y)
onShowContextMenu
in class Component
protected ComponentEvent previewEvent(EventType type, ComponentEvent ce)
previewEvent
in class Component
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |