|
|||||||||
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.ColumnModel
public class ColumnModel
This is the default implementation of a ColumnModel.
Field Summary | |
---|---|
protected java.util.List<ColumnConfig> |
configs
|
protected Grid<ModelData> |
grid
|
protected java.util.List<HeaderGroupConfig> |
groups
|
protected java.util.List<AggregationRowConfig<?>> |
rows
|
Constructor Summary | |
---|---|
ColumnModel(java.util.List<ColumnConfig> columns)
Creates a new column model. |
Method Summary | |
---|---|
void |
addAggregationRow(AggregationRowConfig<?> row)
Adds an aggregation row config to the column model. |
void |
addHeaderGroup(int row,
int column,
HeaderGroupConfig config)
Adds a group to the column model. |
int |
findColumnIndex(java.lang.String dataIndex)
Finds the index of the first matching column for the given dataIndex. |
AggregationRowConfig<?> |
getAggregationRow(int rowIndex)
Returns the aggregation row. |
java.util.List<AggregationRowConfig<?>> |
getAggregationRows()
Returns the aggregation rows. |
ColumnConfig |
getColumn(int colIndex)
Returns the column at the given index. |
Style.HorizontalAlignment |
getColumnAlignment(int colIndex)
Returns the column's alignment. |
ColumnConfig |
getColumnById(java.lang.String id)
Returns the column for a specified id. |
int |
getColumnCount()
Returns the column count. |
int |
getColumnCount(boolean visibleOnly)
Returns the number of visible columns. |
java.lang.String |
getColumnHeader(int colIndex)
Returns the header for the specified column. |
java.lang.String |
getColumnId(int colIndex)
Returns the id of the column at the specified index. |
java.util.List<ColumnConfig> |
getColumns()
Returns the column configs. |
java.lang.String |
getColumnStyle(int colIndex)
Returns the column's style. |
java.lang.String |
getColumnToolTip(int colIndex)
Returns the tooltip for the specified column. |
int |
getColumnWidth(int colIndex)
Returns the column width. |
java.lang.String |
getDataIndex(int colIndex)
Returns the data index for the specified column. |
CellEditor |
getEditor(int colIndex)
Returns the column's editor. |
protected HeaderGroupConfig |
getGroup(int row,
int column)
|
java.util.List<HeaderGroupConfig> |
getHeaderGroups()
Returns the header groups. |
int |
getIndexById(java.lang.String id)
Returns the index for a specified column id. |
GridCellRenderer<ModelData> |
getRenderer(int colIndex)
Returns the cell renderer. |
int |
getTotalWidth()
Returns the total width of all columns. |
int |
getTotalWidth(boolean includeHidden)
Returns the total width of all columns. |
protected boolean |
hasGroup(int row,
int column)
|
int |
indexOf(ColumnConfig column)
Returns the index of the column. |
boolean |
isCellEditable(int colIndex)
Returns true if the cell is editable. |
boolean |
isFixed(int colIndex)
Returns true if the column can be resized. |
boolean |
isGroupable(int colIndex)
Returns true if the column is groupable. |
boolean |
isHidden(int colIndex)
Returns true if the column is hidden. |
boolean |
isMenuDisabled(int colIndex)
Returns true if the specified column menu is disabled. |
boolean |
isResizable(int colIndex)
Returns true if the column can be resized. |
boolean |
isSortable(int colIndex)
Returns true if the specified column is sortable. |
void |
moveColumn(int oldIndex,
int newIndex)
Moves a column. |
void |
setColumnHeader(int colIndex,
java.lang.String header)
Sets the header for a column. |
void |
setColumnWidth(int colIndex,
int width)
Sets the column's width. |
void |
setColumnWidth(int colIndex,
int width,
boolean supressEvent)
Sets the column's width. |
void |
setDataIndex(int colIndex,
java.lang.String dataIndex)
Sets the dataIndex for a column. |
void |
setEditor(int colIndex,
CellEditor editor)
Sets the editor for the column. |
void |
setHidden(int colIndex,
boolean hidden)
Sets if a column is hidden. |
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 |
Field Detail |
---|
protected java.util.List<ColumnConfig> configs
protected Grid<ModelData> grid
protected java.util.List<HeaderGroupConfig> groups
protected java.util.List<AggregationRowConfig<?>> rows
Constructor Detail |
---|
public ColumnModel(java.util.List<ColumnConfig> columns)
columns
- the columnsMethod Detail |
---|
public void addAggregationRow(AggregationRowConfig<?> row)
row
- the aggregation rowpublic void addHeaderGroup(int row, int column, HeaderGroupConfig config)
row
- the rowcolumn
- the columnconfig
- the header group configpublic int findColumnIndex(java.lang.String dataIndex)
dataIndex
- the data index
public AggregationRowConfig<?> getAggregationRow(int rowIndex)
rowIndex
- the row index
public java.util.List<AggregationRowConfig<?>> getAggregationRows()
public ColumnConfig getColumn(int colIndex)
colIndex
- the column index
public Style.HorizontalAlignment getColumnAlignment(int colIndex)
colIndex
- the column index
public ColumnConfig getColumnById(java.lang.String id)
id
- the column id
public int getColumnCount()
public int getColumnCount(boolean visibleOnly)
public java.lang.String getColumnHeader(int colIndex)
colIndex
- the column index
public java.lang.String getColumnId(int colIndex)
colIndex
- the column index
public java.util.List<ColumnConfig> getColumns()
public java.lang.String getColumnStyle(int colIndex)
colIndex
- the column index
public java.lang.String getColumnToolTip(int colIndex)
colIndex
- the column index
public int getColumnWidth(int colIndex)
colIndex
- the column index
public java.lang.String getDataIndex(int colIndex)
colIndex
- the column index
public CellEditor getEditor(int colIndex)
colIndex
- the column index
public java.util.List<HeaderGroupConfig> getHeaderGroups()
public int getIndexById(java.lang.String id)
id
- the column id
public GridCellRenderer<ModelData> getRenderer(int colIndex)
colIndex
- the column index
public int getTotalWidth()
public int getTotalWidth(boolean includeHidden)
includeHidden
- true to include hidden column widths
public int indexOf(ColumnConfig column)
column
- the column
public boolean isCellEditable(int colIndex)
colIndex
- the column index
public boolean isFixed(int colIndex)
colIndex
- the column index
public boolean isGroupable(int colIndex)
GroupingView
.
colIndex
- the column index
public boolean isHidden(int colIndex)
colIndex
- the column index
public boolean isMenuDisabled(int colIndex)
colIndex
- the column index
public boolean isResizable(int colIndex)
colIndex
- the column index
public boolean isSortable(int colIndex)
colIndex
- the column index
public void moveColumn(int oldIndex, int newIndex)
oldIndex
- the column indexnewIndex
- the new column indexpublic void setColumnHeader(int colIndex, java.lang.String header)
colIndex
- the column indexheader
- the headerpublic void setColumnWidth(int colIndex, int width)
colIndex
- the column indexwidth
- the widthpublic void setColumnWidth(int colIndex, int width, boolean supressEvent)
colIndex
- the column indexwidth
- the widthsupressEvent
- true to suppress width change eventpublic void setDataIndex(int colIndex, java.lang.String dataIndex)
colIndex
- the column indexdataIndex
- the data indexpublic void setEditor(int colIndex, CellEditor editor)
colIndex
- the column indexeditor
- the editorpublic void setHidden(int colIndex, boolean hidden)
colIndex
- the column indexhidden
- true to hide the columnprotected HeaderGroupConfig getGroup(int row, int column)
protected boolean hasGroup(int row, int column)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |