com.extjs.gxt.ui.client.widget.grid
Class RowExpander
java.lang.Object
com.extjs.gxt.ui.client.event.BaseObservable
com.extjs.gxt.ui.client.widget.grid.ColumnConfig
com.extjs.gxt.ui.client.widget.grid.RowExpander
- All Implemented Interfaces:
- Observable, ComponentPlugin
public class RowExpander
- extends ColumnConfig
- implements ComponentPlugin
A ColumnConfig subclass and a ComponentPlugin
that
adds the ability for each row to be expanded, showing custom content that
spans all the rows columns.
- Events:
- BeforeExpand : RowExpanderEvent(rowExpander, model, rowIndex,
bodyElement)
- rowExpander : this
- model : the model
- rowIndex : the row index
- bodyElement : the body element
- Expand : RowExpanderEvent(rowExpander, model, rowIndex,
bodyElement)
Fires after a row is expanded.
- rowExpander : this
- model : the model
- rowIndex : the row index
- bodyElement : the body element
- BeforeCollapse : RowExpanderEvent(rowExpander, model, rowIndex,
bodyElement)
- rowExpander : this
- model : the model
- rowIndex : the row index
- bodyElement : the body element
- Collapse : RowExpanderEvent(rowExpander, model, rowIndex,
bodyElement)
Fires after a row is collapsed.
- rowExpander : this
- model : the model
- rowIndex : the row index
- bodyElement : the body element
Methods inherited from class com.extjs.gxt.ui.client.widget.grid.ColumnConfig |
getAlignment, getColumnStyleName, getDataIndex, getDateTimeFormat, getEditor, getHeader, getId, getNumberFormat, getRenderer, getStyle, getToolTip, getWidget, getWidth, isFixed, isGroupable, isHidden, isMenuDisabled, isResizable, isRowHeader, isSortable, setAlignment, setColumnStyleName, setDataIndex, setDateTimeFormat, setEditor, setFixed, setGroupable, setHeader, setHidden, setId, setMenuDisabled, setNumberFormat, setRenderer, setResizable, setRowHeader, setSortable, setStyle, setToolTip, setWidget, setWidth |
Methods inherited from class com.extjs.gxt.ui.client.event.BaseObservable |
addListener, callListener, fireEvent, fireEvent, getFiresEvents, getListeners, hasActiveEvent, hasListeners, hasListeners, removeAllListeners, removeListener, setFiresEvents |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
grid
protected Grid<ModelData> grid
RowExpander
public RowExpander()
- Creates a new row expander.
RowExpander
public RowExpander(XTemplate template)
- Creates a new row expander with the given template.
- Parameters:
template
- the template
collapseRow
public void collapseRow(int rowIndex)
- Collapses the given row.
- Parameters:
rowIndex
- the rowIndex
expandRow
public void expandRow(int rowIndex)
- Expands the given row.
- Parameters:
rowIndex
- the row index
getGrid
public Grid<?> getGrid()
- Returns the source grid.
- Returns:
- the source grid
getTemplate
public XTemplate getTemplate()
- Returns the template.
- Returns:
- the template
init
public void init(Component component)
- Description copied from interface:
ComponentPlugin
- Initializes the plugin when the component is created.
- Specified by:
init
in interface ComponentPlugin
- Parameters:
component
- the source component
setTemplate
public void setTemplate(XTemplate template)
- Sets the template.
- Parameters:
template
- the template
beforeExpand
protected boolean beforeExpand(ModelData model,
com.google.gwt.user.client.Element body,
El row,
int rowIndex)
isExpanded
protected boolean isExpanded(El row)
collapseRow
protected void collapseRow(El row)
expandRow
protected void expandRow(El row)
getBodyContent
protected java.lang.String getBodyContent(ModelData model,
int rowIndex)
onKeyLeft
protected void onKeyLeft(GridEvent<?> ce)
onKeyRight
protected void onKeyRight(GridEvent<?> ce)
onMouseDown
protected void onMouseDown(GridEvent<?> e)
toggleRow
protected void toggleRow(El row)