|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.extjs.gxt.ui.client.event.BaseObservable
com.extjs.gxt.ui.client.widget.grid.GridView
public class GridView
This class encapsulates the user interface of an Grid. Methods of
this class may be used to access user interface elements to enable special
display effects. Do not change the DOM structure of the user interface.
ListStore.
| Nested Class Summary | |
|---|---|
class |
GridView.GridViewImages
Icons used by Grid which can be overridden as needed. |
| Constructor Summary | |
|---|---|
GridView()
|
|
| Method Summary | |
|---|---|
Point |
ensureVisible(int row,
int col,
boolean hscroll)
Ensured the current row and column is visible. |
com.google.gwt.dom.client.Element |
findCell(com.google.gwt.dom.client.Element elem)
Returns the cell. |
int |
findCellIndex(com.google.gwt.dom.client.Element elem,
java.lang.String requiredStyle)
Returns the cell index. |
com.google.gwt.dom.client.Element |
findRow(com.google.gwt.dom.client.Element el)
Returns the row element. |
int |
findRowIndex(com.google.gwt.dom.client.Element elem)
Returns the row index. |
void |
focusCell(int rowIndex,
int colIndex,
boolean hscroll)
Focus the cell and scrolls into view. |
void |
focusRow(int rowIndex)
Focus the row and scrolls into view. |
El |
getBody()
Returns the grid's body element. |
com.google.gwt.dom.client.Element |
getCell(int row,
int col)
Returns the grid's <TD> HtmlElement at the specified coordinates. |
int |
getCellSelectorDepth()
Returns the cell selector depth. |
com.google.gwt.dom.client.Element |
getEditorParent()
Returns the editor parent element. |
java.lang.String |
getEmptyText()
Returns the empty text. |
ColumnHeader |
getHeader()
Returns the grid's column header. |
com.google.gwt.dom.client.Element |
getHeaderCell(int index)
Returns the <TD> HtmlElement which represents the Grid's header cell for the specified column index. |
GridView.GridViewImages |
getImages()
Returns the images used by grid. |
com.google.gwt.dom.client.Element |
getRow(int row)
Return the <TR> HtmlElement which represents a Grid row for the specified index. |
com.google.gwt.dom.client.Element |
getRow(ModelData m)
Return the <TR> HtmlElement which represents a Grid row for the specified model. |
int |
getRowSelectorDepth()
Returns the row selector depth. |
Point |
getScrollState()
Returns the current scroll state. |
GridViewConfig |
getViewConfig()
Returns the view config. |
com.google.gwt.user.client.ui.Widget |
getWidget(int rowIndex,
int colIndex)
Returns the widget at the current location. |
boolean |
isAutoFill()
Returns true if auto fill is enabled. |
boolean |
isForceFit()
Returns true if force fit is enabled. |
boolean |
isShowDirtyCells()
Returns true if dirty cell markers are enabled. |
boolean |
isSortingEnabled()
Returns true if sorting is enabled. |
void |
layout()
|
void |
refresh(boolean headerToo)
Rebuilds the grid using its current configuration and data. |
void |
scrollToTop()
Scrolls the grid to the top. |
void |
setAutoFill(boolean autoFill)
True to auto expand the columns to fit the grid when the grid is created. |
void |
setCellSelectorDepth(int cellSelectorDepth)
The number of levels to search for cells in event delegation (defaults to 4). |
void |
setEmptyText(java.lang.String emptyText)
Default text to display in the grid body when no rows are available (defaults to ''). |
void |
setForceFit(boolean forceFit)
True to auto expand/contract the size of the columns to fit the grid width and prevent horizontal scrolling. |
void |
setRowSelectorDepth(int rowSelectorDepth)
The number of levels to search for rows in event delegation (defaults to 10). |
void |
setShowDirtyCells(boolean showDirtyCells)
True to display a red triangle in the upper left corner of any cells which are "dirty" as defined by any existing records in the data store (defaults to true). |
void |
setSortingEnabled(boolean sortable)
True to allow column sorting when the user clicks a column (defaults to true). |
void |
setViewConfig(GridViewConfig viewConfig)
Sets the view config. |
| Methods inherited from class com.extjs.gxt.ui.client.event.BaseObservable |
|---|
addListener, fireEvent, fireEvent, getFiresEvents, getListeners, hasActiveEvent, hasListeners, hasListeners, removeAllListeners, removeListener, setFiresEvents |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GridView()
| Method Detail |
|---|
public Point ensureVisible(int row,
int col,
boolean hscroll)
row - the row indexcol - the column indexhscroll - true to scroll horizontally if needed
public com.google.gwt.dom.client.Element findCell(com.google.gwt.dom.client.Element elem)
elem - the cell element or a child element
public int findCellIndex(com.google.gwt.dom.client.Element elem,
java.lang.String requiredStyle)
elem - the cell or child elementrequiredStyle - an optional required style name
public com.google.gwt.dom.client.Element findRow(com.google.gwt.dom.client.Element el)
el - the row element or any child element
public int findRowIndex(com.google.gwt.dom.client.Element elem)
elem - the row or child of the row element
public void focusCell(int rowIndex,
int colIndex,
boolean hscroll)
rowIndex - the row indexcolIndex - the column indexhscroll - true to scroll horizontallypublic void focusRow(int rowIndex)
rowIndex - the row indexpublic El getBody()
public com.google.gwt.dom.client.Element getCell(int row,
int col)
row - the row index in which to find the cellcol - the column index of the cell
public int getCellSelectorDepth()
public com.google.gwt.dom.client.Element getEditorParent()
public java.lang.String getEmptyText()
public ColumnHeader getHeader()
public com.google.gwt.dom.client.Element getHeaderCell(int index)
index - the column index
public GridView.GridViewImages getImages()
public com.google.gwt.dom.client.Element getRow(int row)
row - the row index
public com.google.gwt.dom.client.Element getRow(ModelData m)
m - the model
public int getRowSelectorDepth()
public Point getScrollState()
public GridViewConfig getViewConfig()
public com.google.gwt.user.client.ui.Widget getWidget(int rowIndex,
int colIndex)
rowIndex - the row indexcolIndex - the column index
public boolean isAutoFill()
public boolean isForceFit()
public boolean isShowDirtyCells()
public boolean isSortingEnabled()
public void layout()
public void refresh(boolean headerToo)
headerToo - true to refresh the headerpublic void scrollToTop()
public void setAutoFill(boolean autoFill)
autoFill - true to expandpublic void setCellSelectorDepth(int cellSelectorDepth)
cellSelectorDepth - the cell selector depthpublic void setEmptyText(java.lang.String emptyText)
emptyText - the empty textpublic void setForceFit(boolean forceFit)
forceFit - true to force fitpublic void setRowSelectorDepth(int rowSelectorDepth)
rowSelectorDepth - the row selector depthpublic void setShowDirtyCells(boolean showDirtyCells)
showDirtyCells - true to display the dirty flagpublic void setSortingEnabled(boolean sortable)
sortable - true for sortable columnspublic void setViewConfig(GridViewConfig viewConfig)
viewConfig - the view config
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||