|
|||||||||
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.gwtext.client.widgets.Component
com.gwtext.client.widgets.BoxComponent
com.gwtext.client.widgets.Container
com.gwtext.client.widgets.Panel
com.gwtext.client.widgets.grid.GridPanel
public class GridPanel
A Grid widget.
Common Problems:
.x-grid3-cell-inner { overflow: visible; white-space: normal !important; }To wrap cell contents on a certain table only, set an ID to the Grid panel (say company-grid) and then use the CSS
#company-grid .x-grid3-cell-inner { overflow: visible; white-space: normal !important; }To wrap long header titles For all grids
.x-grid3-hd-inner { overflow: visible; white-space: normal; }For specific grid
#company-grid .x-grid3-hd-inner { overflow: visible; white-space: normal; }For specific column
.x-grid3-hd-company { overflow: visible; white-space: normal !important; }
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.gwtext.client.widgets.Component |
---|
config, id |
Fields inherited from class com.google.gwt.user.client.ui.UIObject |
---|
DEBUG_ID_PREFIX |
Constructor Summary | |
---|---|
GridPanel()
|
|
GridPanel(com.google.gwt.core.client.JavaScriptObject jsObj)
|
|
GridPanel(Store store,
ColumnModel columnModel)
Creates a new Grid. |
|
GridPanel(java.lang.String id,
int width,
int height,
Store store,
ColumnModel columnModel)
Creates a new Grid. |
Method Summary | |
---|---|
void |
addGridCellListener(GridCellListener listener)
Add a Grid Cell listener. |
void |
addGridColumnListener(GridColumnListener listener)
Add a Grid Column listener. |
void |
addGridHeaderListener(GridHeaderListener listener)
Add a Grid Header listener. |
void |
addGridListener(GridListener listener)
Add a Grid Cell listener. |
void |
addGridMouseListener(GridMouseListener listener)
Add a Grid mouse listener. |
void |
addGridRowListener(GridRowListener listener)
Add a Grid row listener. |
void |
clearSortState(boolean reload)
Clear the sort state of the grid. |
protected com.google.gwt.core.client.JavaScriptObject |
create(com.google.gwt.core.client.JavaScriptObject configJS)
|
ColumnModel |
getColumnModel()
Returns the grid's ColumnModel. |
protected com.google.gwt.core.client.JavaScriptObject |
getConfigPrototype()
|
java.lang.String |
getDragDropText()
Called to get Grid's drag proxy text. |
RowSelectionModel |
getSelectionModel()
Returns the Grid's row selection model |
com.google.gwt.core.client.JavaScriptObject |
getSelectionModelAsJavaScriptObject()
Returns the Grid's selection model, as a raw JavaScriptObject |
Store |
getStore()
Returns the Grid's Store |
GridView |
getView()
Returns the grid's GridView object. |
java.lang.String |
getXType()
Gets the xtype for this component as registered with ComponentMgr. |
void |
hideColumn(int colIndex)
Hides the specified column. |
void |
hideColumn(java.lang.String colID)
Hides the specified column. |
void |
hideColumnHeader()
Hides the column header of the grid. |
protected void |
initComponent()
This template method is called after the Component has been instantiated but before it's rendered. |
static GridPanel |
instance(com.google.gwt.core.client.JavaScriptObject jsObj)
Static method which returns the GridPanel instance based on the JavaScriptObject |
void |
reconfigure(Store store,
ColumnModel columnModel)
Reconfigures the grid to use a different Store and Column Model. |
void |
render(com.google.gwt.core.client.JavaScriptObject grid)
|
void |
setAutoExpandColumn(int autoExpandColumn)
The id of a column in this grid that should expand to fill unused space. |
void |
setAutoExpandColumn(java.lang.String autoExpandColumn)
The id of a column in this grid that should expand to fill unused space. |
void |
setAutoExpandMax(int autoExpandMax)
The maximum width the autoExpandColumn can have (if enabled). |
void |
setAutoExpandMin(int autoExpandMin)
The minimum width the autoExpandColumn can have (if enabled). |
void |
setAutoHeight(boolean autoHeight)
True to fit the height of the grid container to the height of the data. |
void |
setColumnModel(ColumnModel columnModel)
The ColumnModel to use when rendering the grid (required). |
void |
setDdGroup(java.lang.String ddGroup)
The DD group this GridPanel belongs to (defaults to 'GridDD'). |
void |
setDisableSelection(boolean disableSelection)
True to disable selections in the grid (defaults to false). |
void |
setDragDropText(java.lang.String text)
Sets the Grid's drag drop text |
void |
setEnableColumnHide(boolean enableColumnHide)
True to enable hiding of columns with the header context menu. |
void |
setEnableColumnMove(boolean enableColumnMove)
True to enable drag and drop reorder of columns. |
void |
setEnableColumnResize(boolean enableColumnResize)
True to enable column resize. |
void |
setEnableDragDrop(boolean enableDragDrop)
True to enable drag and drop of rows. |
void |
setEnableHdMenu(boolean enableHdMenu)
True to enable the drop down button for menu in the headers. |
void |
setHideColumnHeader(boolean hideColumnHeader)
Hides the column header of the grid if passed true. |
void |
setLoadMask(boolean loadMask)
True to mask the grid while loading. |
void |
setLoadMask(java.lang.String message)
Sets the load mask message for the grid. |
void |
setLoadMask(java.lang.String message,
java.lang.String messageCls)
Sets the LoadMask to mask the grid while loading. |
void |
setMaxRowsToMeasure(int maxRowsToMeasure)
If autoSizeColumns is on, maxRowsToMeasure can be used to limit the number of rows measured to get a columns size. |
void |
setMinColumnWidth(int minColumnWidth)
The minimum width a column can be resized to. |
void |
setMonitorWindowResize(boolean monitorWindowResize)
True to autoSize the grid when the window resizes. |
void |
setSelectionModel(AbstractSelectionModel selectionModel)
Set the GridPanel's selection model. |
void |
setStore(Store store)
The Store the grid should use as its data source (required). |
void |
setStripeRows(boolean stripeRows)
True to stripe the rows. |
void |
setTrackMouseOver(boolean trackMouseOver)
True to highlight rows when the mouse is over. |
void |
setView(GridView view)
Sets the GridView used by the grid. |
void |
showColumn(int colIndex)
Shows the specified column. |
void |
showColumn(java.lang.String colID)
Show the specified column. |
void |
stripeRows(boolean stripeRows)
True to stripe the rows. |
Methods inherited from class com.gwtext.client.widgets.Container |
---|
add, add, add, add, addListener, bubble, cascade, clear, doLayout, doLayout, findBy, findByID, findByType, getActiveItem, getActiveItemID, getAutoDestroy, getBufferResize, getComponent, getComponent, getComponents, getHideBorders, getItems, getLayout, getMonitorResize, insert, iterator, remove, remove, remove, remove, removeAll, removeAll, setActiveItem, setActiveItemID, setAutoDestroy, setBufferResize, setDefaults, setHideBorders, setLayout, setMonitorResize |
Methods inherited from class com.gwtext.client.widgets.BoxComponent |
---|
addListener, doOnRender, doOnRender, getAutoHeight, getAutoWidth, getBox, getBox, getHeight, getPosition, getPosition, getSize, getWidth, setAutoWidth, setHeight, setHeight, setPagePosition, setPosition, setSize, setSize, setWidth, setWidth, syncSize, updateBox |
Methods inherited from class com.google.gwt.user.client.ui.Widget |
---|
doAttachChildren, doDetachChildren, getParent, isAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent |
Methods inherited from class com.google.gwt.user.client.ui.UIObject |
---|
ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, onEnsureDebugId, setElement, setPixelSize, setStyleName, setStyleName, setStylePrimaryName, setVisible, sinkEvents, unsinkEvents |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public GridPanel(com.google.gwt.core.client.JavaScriptObject jsObj)
public GridPanel()
public GridPanel(Store store, ColumnModel columnModel)
store
- the Grid's data storecolumnModel
- the Grid's column modelpublic GridPanel(java.lang.String id, int width, int height, Store store, ColumnModel columnModel)
id
- the Grid IDwidth
- the Grid widthheight
- the Grid heightstore
- the Grid's data storecolumnModel
- the Grid's column modelMethod Detail |
---|
protected com.google.gwt.core.client.JavaScriptObject getConfigPrototype()
getConfigPrototype
in class Panel
public java.lang.String getXType()
Component
TextField field = new TextField();
field.getXType() returns "textfield"
getXType
in class Panel
public static GridPanel instance(com.google.gwt.core.client.JavaScriptObject jsObj)
jsObj
- the JavaScript Object that represents the GridPanel
protected com.google.gwt.core.client.JavaScriptObject create(com.google.gwt.core.client.JavaScriptObject configJS)
create
in class Panel
protected void initComponent()
Component
initComponent
in class Component
public void clearSortState(boolean reload)
reload
- true to reload the store after clearing the sort statepublic ColumnModel getColumnModel()
public Store getStore()
public java.lang.String getDragDropText()
public void setDragDropText(java.lang.String text)
text
- the drag drop textpublic RowSelectionModel getSelectionModel()
public com.google.gwt.core.client.JavaScriptObject getSelectionModelAsJavaScriptObject()
public GridView getView()
public void hideColumn(java.lang.String colID)
colID
- the column IDpublic void hideColumn(int colIndex)
colIndex
- the column indexpublic void hideColumnHeader()
public void render(com.google.gwt.core.client.JavaScriptObject grid)
public void reconfigure(Store store, ColumnModel columnModel)
store
- the new StorecolumnModel
- the new ColumnModelpublic void setLoadMask(java.lang.String message)
message
- the load mask textpublic void showColumn(java.lang.String colID)
colID
- the column IDpublic void showColumn(int colIndex)
colIndex
- the column indexpublic void addGridCellListener(GridCellListener listener)
listener
- the listenerpublic void addGridColumnListener(GridColumnListener listener)
listener
- the listenerpublic void addGridHeaderListener(GridHeaderListener listener)
listener
- the listenerpublic void addGridListener(GridListener listener)
listener
- the listenerpublic void addGridMouseListener(GridMouseListener listener)
listener
- the listenerpublic void addGridRowListener(GridRowListener listener)
listener
- the listenerpublic void setDdGroup(java.lang.String ddGroup) throws java.lang.IllegalStateException
ddGroup
- the DD group
java.lang.IllegalStateException
- this property cannot be changed after the Component has been renderedpublic void setMinColumnWidth(int minColumnWidth) throws java.lang.IllegalStateException
minColumnWidth
- the min column width
java.lang.IllegalStateException
- this property cannot be changed after the Component has been renderedpublic void setMonitorWindowResize(boolean monitorWindowResize) throws java.lang.IllegalStateException
monitorWindowResize
- true to monitor window resize
java.lang.IllegalStateException
- this property cannot be changed after the Component has been renderedpublic void setMaxRowsToMeasure(int maxRowsToMeasure) throws java.lang.IllegalStateException
maxRowsToMeasure
- max rows to measure
java.lang.IllegalStateException
- this property cannot be changed after the Component has been renderedpublic void setTrackMouseOver(boolean trackMouseOver) throws java.lang.IllegalStateException
trackMouseOver
- true to highlight rows when mouse over
java.lang.IllegalStateException
- this property cannot be changed after the Component has been renderedpublic void setEnableHdMenu(boolean enableHdMenu) throws java.lang.IllegalStateException
enableHdMenu
- true to enable the drop down button for menu in the headers.
java.lang.IllegalStateException
- this property cannot be changed after the Component has been renderedpublic void setEnableColumnResize(boolean enableColumnResize) throws java.lang.IllegalStateException
enableColumnResize
- true to enable column resize
java.lang.IllegalStateException
- this property cannot be changed after the Component has been renderedpublic void setEnableDragDrop(boolean enableDragDrop) throws java.lang.IllegalStateException
enableDragDrop
- true to enable drag drop of rows
java.lang.IllegalStateException
- this property cannot be changed after the Component has been renderedpublic void setEnableColumnMove(boolean enableColumnMove) throws java.lang.IllegalStateException
enableColumnMove
- true to enable column move
java.lang.IllegalStateException
- this property cannot be changed after the Component has been renderedpublic void setEnableColumnHide(boolean enableColumnHide) throws java.lang.IllegalStateException
enableColumnHide
- true to enable column hide
java.lang.IllegalStateException
- this property cannot be changed after the Component has been renderedpublic void setStripeRows(boolean stripeRows) throws java.lang.IllegalStateException
stripeRows
- true to stripe rows
java.lang.IllegalStateException
- this property cannot be changed after the Component has been renderedpublic void setSelectionModel(AbstractSelectionModel selectionModel) throws java.lang.IllegalStateException
selectionModel
- the selection model/
java.lang.IllegalStateException
- this property cannot be changed after the Component has been renderedpublic void setAutoHeight(boolean autoHeight) throws java.lang.IllegalStateException
setAutoHeight
in class BoxComponent
autoHeight
- true to fit the height of the grid container to the height of the data
java.lang.IllegalStateException
- this property cannot be changed after the Component has been renderedpublic void setAutoExpandColumn(java.lang.String autoExpandColumn) throws java.lang.IllegalStateException
autoExpandColumn
- the column id
java.lang.IllegalStateException
- this property cannot be changed after the Component has been renderedColumnConfig.setId(String)
public void setAutoExpandColumn(int autoExpandColumn) throws java.lang.IllegalStateException
autoExpandColumn
- the column id
java.lang.IllegalStateException
- this property cannot be changed after the Component has been renderedpublic void setAutoExpandMin(int autoExpandMin) throws java.lang.IllegalStateException
autoExpandMin
- the min expand value
java.lang.IllegalStateException
- this property cannot be changed after the Component has been renderedpublic void setAutoExpandMax(int autoExpandMax) throws java.lang.IllegalStateException
autoExpandMax
- the max expand value
java.lang.IllegalStateException
- this property cannot be changed after the Component has been renderedpublic void setDisableSelection(boolean disableSelection) throws java.lang.IllegalStateException
disableSelection
- true to disable selections in the grid (defaults to false). - ignored a SelectionModel is specified
java.lang.IllegalStateException
- this property cannot be changed after the Component has been renderedpublic void setHideColumnHeader(boolean hideColumnHeader)
hideColumnHeader
- true to hide the column headerspublic void setView(GridView view) throws java.lang.IllegalStateException
GridView
used by the grid.
view
- the grid view
java.lang.IllegalStateException
- this property cannot be changed after the Component has been renderedpublic void setLoadMask(boolean loadMask) throws java.lang.IllegalStateException
loadMask
- true to mask grid
java.lang.IllegalStateException
- this property cannot be changed after the Component has been renderedpublic void setLoadMask(java.lang.String message, java.lang.String messageCls) throws java.lang.IllegalStateException
LoadMask
to mask the grid while loading. Default is disable masking.
message
- the load mask messagemessageCls
- the load mask message CSS class
java.lang.IllegalStateException
- this property cannot be changed after the Component has been renderedpublic void setStore(Store store) throws java.lang.IllegalStateException
store
- the store
java.lang.IllegalStateException
- this property cannot be changed after the Component has been renderedpublic void setColumnModel(ColumnModel columnModel) throws java.lang.IllegalStateException
ColumnModel
to use when rendering the grid (required).
columnModel
- the grids column model
java.lang.IllegalStateException
- this property cannot be changed after the Component has been renderedpublic void stripeRows(boolean stripeRows) throws java.lang.IllegalStateException
stripeRows
- true to stripe the rows. Default is false.
java.lang.IllegalStateException
- this property cannot be changed after the Component has been rendered
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |