com.extjs.gxt.ui.client.widget.table
Class TableItem

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.extjs.gxt.ui.client.widget.Component
              extended by com.extjs.gxt.ui.client.widget.table.TableItem
All Implemented Interfaces:
Observable, com.google.gwt.user.client.EventListener

public class TableItem
extends Component

A row in a Table.


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
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
TableItem(java.lang.Object[] values)
          Creates a new table item.
 
Method Summary
 java.lang.String[] getCellStyles()
           
 ToolTip getCellToolTip()
          Returns the item's cell tooltip.
 Table getTable()
          Returns the item's parent table.
 java.lang.Object getValue(int index)
          Returns a cell value.
 java.lang.Object[] getValues()
          Returns the item's values.
 void onComponentEvent(ComponentEvent ce)
          Any events a component receives will be forwarded to this method.
 void setCellStyle(int index, java.lang.String style)
          Sets the style for a cell.
 void setCellToolTip(int index, java.lang.String text)
          Sets a cell tooltip.
 void setCellToolTips(java.lang.String[] toolTips)
          Sets all of the cell tooltips
 void setText(int index, java.lang.String text)
          Sets a cell value.
 void setValue(int index, java.lang.Object value)
          Sets a cell value.
 void setWidget(int index, com.google.gwt.user.client.ui.Widget widget)
          Sets a widget as a cell value.
 
Methods inherited from class com.extjs.gxt.ui.client.widget.Component
addListener, addStyleName, addWidgetListener, disable, disableEvents, disableTextSelection, el, enable, enableEvents, fireEvent, fireEvent, fireEvent, fly, focus, getBaseStyle, getBorders, getData, getData, getElement, getId, getItemId, getModel, getState, getToolTip, hide, hideToolTip, isEnabled, isRendered, isVisible, onBrowserEvent, recalculate, removeAllListeners, removeFromParent, removeListener, removeStyleName, removeWidgetListener, render, render, saveState, setBorders, setData, setData, setElement, setEnabled, setEnableState, setHeight, setId, setIntStyleAttribute, setItemId, setPixelSize, setSize, setStyleAttribute, setStyleName, setTitle, setToolTip, setToolTip, setVisible, setWidth, show, toString
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
getParent, isAttached
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleName, getStylePrimaryName, getTitle, isVisible, removeStyleDependentName, setStylePrimaryName, setVisible, sinkEvents, unsinkEvents
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TableItem

public TableItem(java.lang.Object[] values)
Creates a new table item.

Parameters:
values - the cell values
Method Detail

getCellToolTip

public ToolTip getCellToolTip()
Returns the item's cell tooltip.

Returns:
the tooltip

getTable

public Table getTable()
Returns the item's parent table.

Returns:
the table

getValue

public java.lang.Object getValue(int index)
Returns a cell value.

Parameters:
index - the cell index
Returns:
the value

getValues

public java.lang.Object[] getValues()
Returns the item's values.

Returns:
the values

onComponentEvent

public void onComponentEvent(ComponentEvent ce)
Description copied from class: Component
Any events a component receives will be forwarded to this method. Subclasses should override as needed. The Component.onBrowserEvent(com.google.gwt.user.client.Event) method should not be overridden or modified.

Overrides:
onComponentEvent in class Component
Parameters:
ce - the base event

setCellStyle

public void setCellStyle(int index,
                         java.lang.String style)
Sets the style for a cell.

Parameters:
index - the column index
style - the new style

getCellStyles

public java.lang.String[] getCellStyles()

setCellToolTip

public void setCellToolTip(int index,
                           java.lang.String text)
Sets a cell tooltip.

Parameters:
index - the column index
text - the text of the tool tip

setCellToolTips

public void setCellToolTips(java.lang.String[] toolTips)
Sets all of the cell tooltips

Parameters:
toolTips - the tool tips to use

setText

public void setText(int index,
                    java.lang.String text)
Sets a cell value.

Parameters:
index - the column index
text - the text

setValue

public void setValue(int index,
                     java.lang.Object value)
Sets a cell value.

Parameters:
index - the column index
value - the value

setWidget

public void setWidget(int index,
                      com.google.gwt.user.client.ui.Widget widget)
Sets a widget as a cell value. When using widgets in cells, bulk rendering must be disabled.

Parameters:
index - the column index
widget - the widget