com.extjs.gxt.ui.client.widget.grid
Class ColumnConfig

java.lang.Object
  extended by com.extjs.gxt.ui.client.event.BaseObservable
      extended by com.extjs.gxt.ui.client.widget.grid.ColumnConfig
All Implemented Interfaces:
Observable
Direct Known Subclasses:
CheckColumnConfig, RowExpander, RowNumberer, SummaryColumnConfig

public class ColumnConfig
extends BaseObservable

A column config for a column in a column model.

The column config is a configuration object that should only be used when creating a column model. After the column model is created, any changes should be made to the column model, not the column config.


Constructor Summary
ColumnConfig()
           
ColumnConfig(java.lang.String id, java.lang.String name, int width)
           
 
Method Summary
 Style.HorizontalAlignment getAlignment()
          Returns the column's horizontal alignment.
 java.lang.String getDataIndex()
          Returns the column's data index.
 com.google.gwt.i18n.client.DateTimeFormat getDateTimeFormat()
          Returns the column's data time format.
 CellEditor getEditor()
          Returns the column's cell editor.
 java.lang.String getHeader()
          Returns the column's header text.
 java.lang.String getId()
          Returns the column's id.
 com.google.gwt.i18n.client.NumberFormat getNumberFormat()
          Returns the column's number format.
 GridCellRenderer getRenderer()
          Returns the column's cell renderer.
 java.lang.String getStyle()
          Returns the column style.
 java.lang.String getToolTip()
          Returns the column's tool tip.
 int getWidth()
          Returns the column's width.
 boolean isFixed()
          Returns true if the column size is fixed.
 boolean isGroupable()
          Returns true if the column can be grouped.
 boolean isHidden()
          Returns true if the column is hidden.
 boolean isMenuDisabled()
          Returns true if the column's menu is disabled.
 boolean isResizable()
          Returns true if the column is resizable.
 boolean isSortable()
          Returns true if the column is sortable (pre-render).
 void setAlignment(Style.HorizontalAlignment alignment)
          Sets the column's horizontal alignment.
 void setDataIndex(java.lang.String dataIndex)
          Sets the column's data index.
 void setDateTimeFormat(com.google.gwt.i18n.client.DateTimeFormat dateTimeFormat)
          Sets the column's date time format.
 void setEditor(CellEditor editor)
          Sets the column's cell editor.
 void setFixed(boolean fixed)
          True if the column width cannot be changed (defaults to false, pre-render).
 void setGroupable(boolean groupable)
          Sets if the column is groupable (defaults to true).
 void setHeader(java.lang.String header)
          Sets the column's heade text.
 void setHidden(boolean hidden)
          Sets whether the column is hidden.
 void setId(java.lang.String id)
          Sets the column's id.
 void setMenuDisabled(boolean menuDisabled)
          Sets whether the column's menu is disabled (pre-render).
 void setNumberFormat(com.google.gwt.i18n.client.NumberFormat format)
          Sets the column's number format.
 void setRenderer(GridCellRenderer renderer)
          Sets the column's cell renderer (pre-render).
 void setResizable(boolean resizable)
          Specifies if the column may be resized (defaults to true, pre-render).
 void setSortable(boolean sortable)
          Sets if the column can be sorted (defaults to true, pre-render).
 void setStyle(java.lang.String style)
          Sets one to many styles.
 void setWidth(int width)
          Sets the column's width in pixels.
 
Methods inherited from class com.extjs.gxt.ui.client.event.BaseObservable
addListener, fireEvent, fireEvent, getFiresEvents, hasListeners, hasListeners, removeAllListeners, removeListener, setFiresEvents
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColumnConfig

public ColumnConfig()

ColumnConfig

public ColumnConfig(java.lang.String id,
                    java.lang.String name,
                    int width)
Method Detail

getAlignment

public Style.HorizontalAlignment getAlignment()
Returns the column's horizontal alignment.

Returns:
the horizontal aligment

getDataIndex

public java.lang.String getDataIndex()
Returns the column's data index.

Returns:
the data index

getDateTimeFormat

public com.google.gwt.i18n.client.DateTimeFormat getDateTimeFormat()
Returns the column's data time format.

Returns:
the date time format

getEditor

public CellEditor getEditor()
Returns the column's cell editor.

Returns:
the editor

getHeader

public java.lang.String getHeader()
Returns the column's header text.

Returns:
the header text

getId

public java.lang.String getId()
Returns the column's id.

Returns:
the id

getNumberFormat

public com.google.gwt.i18n.client.NumberFormat getNumberFormat()
Returns the column's number format.

Returns:
the number format

getRenderer

public GridCellRenderer getRenderer()
Returns the column's cell renderer.

Returns:
the renderer

getStyle

public java.lang.String getStyle()
Returns the column style.

Returns:
the style

getToolTip

public java.lang.String getToolTip()
Returns the column's tool tip.

Returns:
the tool tip

getWidth

public int getWidth()
Returns the column's width.

Returns:
the column width

isFixed

public boolean isFixed()
Returns true if the column size is fixed.

Returns:
the fixed state

isGroupable

public boolean isGroupable()
Returns true if the column can be grouped.

Returns:
the if groupable

isHidden

public boolean isHidden()
Returns true if the column is hidden.

Returns:
the hidden state

isMenuDisabled

public boolean isMenuDisabled()
Returns true if the column's menu is disabled.

Returns:
the menu disabled state

isResizable

public boolean isResizable()
Returns true if the column is resizable.

Returns:
the resizable state

isSortable

public boolean isSortable()
Returns true if the column is sortable (pre-render).

Returns:
the sortable state

setAlignment

public void setAlignment(Style.HorizontalAlignment alignment)
Sets the column's horizontal alignment.

Parameters:
alignment - the alignment

setDataIndex

public void setDataIndex(java.lang.String dataIndex)
Sets the column's data index.

Parameters:
dataIndex - the data index

setDateTimeFormat

public void setDateTimeFormat(com.google.gwt.i18n.client.DateTimeFormat dateTimeFormat)
Sets the column's date time format.

Parameters:
dateTimeFormat - the date time format

setEditor

public void setEditor(CellEditor editor)
Sets the column's cell editor.

Parameters:
editor - the cell editor

setFixed

public void setFixed(boolean fixed)
True if the column width cannot be changed (defaults to false, pre-render).

Parameters:
fixed - true for fixed column width

setGroupable

public void setGroupable(boolean groupable)
Sets if the column is groupable (defaults to true). Only applies when using a GroupingView.

Parameters:
groupable - true to allow grouping

setHeader

public void setHeader(java.lang.String header)
Sets the column's heade text.

Parameters:
header - the header text

setHidden

public void setHidden(boolean hidden)
Sets whether the column is hidden.

Parameters:
hidden - true to hide

setId

public void setId(java.lang.String id)
Sets the column's id.

Parameters:
id - the column id

setMenuDisabled

public void setMenuDisabled(boolean menuDisabled)
Sets whether the column's menu is disabled (pre-render).

Parameters:
menuDisabled - true to disable the menu

setNumberFormat

public void setNumberFormat(com.google.gwt.i18n.client.NumberFormat format)
Sets the column's number format.

Parameters:
format - the number format

setRenderer

public void setRenderer(GridCellRenderer renderer)
Sets the column's cell renderer (pre-render).

Parameters:
renderer - the cell renderer

setResizable

public void setResizable(boolean resizable)
Specifies if the column may be resized (defaults to true, pre-render).

Parameters:
resizable - the resizeable state

setSortable

public void setSortable(boolean sortable)
Sets if the column can be sorted (defaults to true, pre-render).

Parameters:
sortable - the sortble state

setStyle

public void setStyle(java.lang.String style)
Sets one to many styles.

 setStyle("color:red;font-weight: bold");
 

Parameters:
style - the style

setWidth

public void setWidth(int width)
Sets the column's width in pixels.

Parameters:
width - the width