|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.gwtext.client.core.JsObject
com.gwtext.client.widgets.grid.ColumnModel
public class ColumnModel
The column model class for a GridPanel.
| Field Summary |
|---|
| Fields inherited from class com.gwtext.client.core.JsObject |
|---|
jsObj |
| Constructor Summary | |
|---|---|
ColumnModel(BaseColumnConfig[] columnConfigs)
Construct a new ColumnModel. |
|
ColumnModel(com.google.gwt.core.client.JavaScriptObject jsObj)
Construct a new ColumnModel using a native object. |
|
| Method Summary | |
|---|---|
void |
addListener(ColumnModelListener listener)
Add a ColumnModel listener. |
com.google.gwt.core.client.JavaScriptObject |
create(com.google.gwt.core.client.JavaScriptObject configJS)
|
GridEditor |
getCellEditor(int colIndex,
int rowIndex)
gets the GridEditor for a specific column index and row index. |
BaseColumnConfig[] |
getColumnConfigs()
|
int |
getColumnCount()
Returns the number of columns. |
java.lang.String |
getColumnHeader(int colIndex)
Returns the header for the specified column. |
java.lang.String |
getColumnHeader(java.lang.String colID)
Returns the column header. |
java.lang.String |
getColumnId(int colIndex)
Returns the column ID. |
java.lang.String |
getColumnTooltip(int colIndex)
Returns the tooltip for the specified column. |
java.lang.String |
getColumnTooltip(java.lang.String colID)
Returns the tooltip for the specified column. |
int |
getColumnWidth(int colIndex)
Returns the width for the specified column. |
int |
getColumnWidth(java.lang.String colID)
Returns the width for the specified column. |
java.lang.String |
getDataIndex(int colIndex)
Returns the dataIndex for the specified column. |
java.lang.String |
getDataIndex(java.lang.String colID)
Returns the dataIndex for the specified column. |
int |
getIndexById(java.lang.String id)
Returns the index for a specified column ID. |
int |
getTotalWidth()
|
int |
getTotalWidth(boolean includeHidden)
Returns the total width of all columns. |
boolean |
isCellEditable(int colIndex,
int rowIndex)
Returns true if the cell is editable. |
boolean |
isCellEditable(java.lang.String colID,
int rowIndex)
Returns true if the cell is editable. |
boolean |
isFixed(int colIndex)
Returns true if the column width cannot be changed |
boolean |
isFixed(java.lang.String colID)
Returns true if the column width cannot be changed. |
boolean |
isHidden(int colIndex)
Returns true if the column is hidden. |
boolean |
isHidden(java.lang.String colID)
Returns true if the column is hidden. |
boolean |
isLocked(int colIndex)
Returns if the column is locked. |
boolean |
isLocked(java.lang.String colID)
Returns true if the column is locked. |
boolean |
isResizable(int colIndex)
Returns true if the column is resizable. |
boolean |
isResizable(java.lang.String colID)
Returns true if the column is resizable. |
boolean |
isSortable(int colIndex)
Returns true if the column is sortable. |
boolean |
isSortable(java.lang.String colID)
Returns true if the column is sortable. |
void |
setColumnHeader(int colIndex,
java.lang.String header)
Sets the header for a column. |
void |
setColumnHeader(java.lang.String colID,
java.lang.String header)
Sets the header for a column. |
void |
setColumnWidth(int colIndex,
int width)
Sets the width for a column. |
void |
setColumnWidth(java.lang.String colID,
int width)
Sets the width for a column. |
void |
setDataIndex(int colIndex,
int dataIndex)
Sets the dataIndex for a column. |
void |
setDataIndex(int colIndex,
java.lang.String dataIndex)
Sets the dataIndex for a column. |
void |
setDataIndex(java.lang.String colID,
int dataIndex)
Sets the dataIndex for a column. |
void |
setDataIndex(java.lang.String colID,
java.lang.String dataIndex)
Sets the dataIndex for a column. |
void |
setDefaultSortable(boolean defaultSortable)
Default sortable of columns which have no sortable specified (defaults to false). |
void |
setDefaultWidth(int defaultWidth)
The width of columns which have no width specified (defaults to 100) |
void |
setEditable(int colIndex,
boolean editable)
Sets if a column is editable. |
void |
setEditable(java.lang.String colID,
boolean editable)
Sets if a column is editable. |
void |
setEditor(int colIndex,
GridEditor editor)
Sets the editor for a column. |
void |
setEditor(java.lang.String colID,
GridEditor editor)
Sets the editor for a column. |
void |
setHidden(int colIndex,
boolean hidden)
Sets if a column is hidden. |
void |
setHidden(java.lang.String colID,
boolean hidden)
Sets if a column is hidden. |
void |
setRenderer(int colIndex,
Renderer renderer)
Sets the rendering (formatting) function for a column. |
void |
setRenderer(java.lang.String colID,
Renderer renderer)
Sets the rendering (formatting) function for a column. |
void |
setUserCustomCellEditor(UserCustomCellEditor ucce)
This method will allow to set custom editors. |
| Methods inherited from class com.gwtext.client.core.JsObject |
|---|
getJsObj, getProperties, isCreated, setJsObj |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ColumnModel(com.google.gwt.core.client.JavaScriptObject jsObj)
jsObj - the native objectpublic ColumnModel(BaseColumnConfig[] columnConfigs)
columnConfigs - the configuration for the columns| Method Detail |
|---|
public com.google.gwt.core.client.JavaScriptObject create(com.google.gwt.core.client.JavaScriptObject configJS)
public BaseColumnConfig[] getColumnConfigs()
public void setDefaultSortable(boolean defaultSortable)
defaultSortable - true to enable sortable for all columnspublic void setDefaultWidth(int defaultWidth)
defaultWidth - the default column widthpublic void setUserCustomCellEditor(UserCustomCellEditor ucce)
ucce - The UserCustomCellEditor that overwrites getCellEditor
public GridEditor getCellEditor(int colIndex,
int rowIndex)
colIndex - Column index to identify the column selectedrowIndex - Row index to identify the column selected
public int getColumnCount()
public java.lang.String getColumnHeader(java.lang.String colID)
colID - column ID
public java.lang.String getColumnHeader(int colIndex)
colIndex - the column index
public java.lang.String getColumnId(int colIndex)
colIndex - column index
ColumnConfig.setId(String). If the
user did not set the id for the column, then the column position is returned as a String.public java.lang.String getColumnTooltip(java.lang.String colID)
colID - the column ID
public java.lang.String getColumnTooltip(int colIndex)
colIndex - the column index
public int getColumnWidth(java.lang.String colID)
colID - the column ID
public int getColumnWidth(int colIndex)
colIndex - the column index
public java.lang.String getDataIndex(java.lang.String colID)
colID - the column ID
public java.lang.String getDataIndex(int colIndex)
colIndex - the column idex
public int getIndexById(java.lang.String id)
id - column id used in ColumnConfig when defining the ColumnModel
ColumnConfig.setId(String)public int getTotalWidth()
public int getTotalWidth(boolean includeHidden)
includeHidden - true to include hidden column widths
public boolean isCellEditable(java.lang.String colID,
int rowIndex)
colID - the column IDrowIndex - the row index
public boolean isCellEditable(int colIndex,
int rowIndex)
colIndex - the column indexrowIndex - the row index
public boolean isFixed(java.lang.String colID)
colID - the column ID
public boolean isFixed(int colIndex)
colIndex - the column index
public boolean isHidden(java.lang.String colID)
colID - the column ID
public boolean isHidden(int colIndex)
colIndex - the column index
public boolean isLocked(java.lang.String colID)
colID - the column ID
public boolean isLocked(int colIndex)
colIndex - column index (0 based)
public boolean isResizable(java.lang.String colID)
colID - the column ID
public boolean isResizable(int colIndex)
colIndex - the column index
public boolean isSortable(java.lang.String colID)
colID - the column ID
public boolean isSortable(int colIndex)
colIndex - the column index
public void setColumnHeader(java.lang.String colID,
java.lang.String header)
colID - the column IDheader - the column header
public void setColumnHeader(int colIndex,
java.lang.String header)
colIndex - the column indexheader - the column header
public void setColumnWidth(java.lang.String colID,
int width)
colID - the column IDwidth - the column width
public void setColumnWidth(int colIndex,
int width)
colIndex - the column indexwidth - the column width
public void setDataIndex(java.lang.String colID,
int dataIndex)
colID - the column IDdataIndex - the Store's data index
public void setDataIndex(int colIndex,
int dataIndex)
colIndex - the column indexdataIndex - the data index
public void setDataIndex(java.lang.String colID,
java.lang.String dataIndex)
colID - the column IDdataIndex - the Store's data index
public void setDataIndex(int colIndex,
java.lang.String dataIndex)
colIndex - the column indexdataIndex - the data index
public void setEditable(java.lang.String colID,
boolean editable)
colID - the column IDeditable - true if editable
public void setEditable(int colIndex,
boolean editable)
colIndex - the column indexeditable - true if editable
public void setEditor(java.lang.String colID,
GridEditor editor)
colID - the column IDeditor - the editor
public void setEditor(int colIndex,
GridEditor editor)
colIndex - the column indexeditor - the editor
public void setHidden(java.lang.String colID,
boolean hidden)
colID - the column IDhidden - true if hidden
public void setHidden(int colIndex,
boolean hidden)
colIndex - the column indexhidden - true if hidden
public void setRenderer(java.lang.String colID,
Renderer renderer)
colID - the column IDrenderer - the column renderer
public void setRenderer(int colIndex,
Renderer renderer)
colIndex - the column idexrenderer - the column rendererpublic void addListener(ColumnModelListener listener)
listener - the listener
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||