com.extjs.gxt.ui.client.widget.grid
Class EditorSupport<M extends ModelData>

java.lang.Object
  extended by com.extjs.gxt.ui.client.widget.grid.EditorSupport<M>

public class EditorSupport<M extends ModelData>
extends java.lang.Object


Field Summary
protected  CellEditor activeEditor
           
protected  Record activeRecord
           
protected  EditorGrid.ClicksToEdit clicksToEdit
           
protected  ColumnModel cm
           
protected  boolean editing
           
protected  Listener<DomEvent> editorListener
           
protected  Grid<M> grid
           
protected  Listener<GridEvent<M>> gridListener
           
protected  boolean ignoreScroll
           
protected  ListStore<M> store
           
 
Constructor Summary
EditorSupport()
           
 
Method Summary
 void bind(Grid grid)
           
protected  void deferStartEditing(M m, java.lang.String field, int row, int col)
           
 void doRender()
           
 CellEditor getActiveEditor()
           
 EditorGrid.ClicksToEdit getClicksToEdit()
          Returns the clicks to edit.
 boolean isEditing()
          Returns true if editing is active.
protected  void onAutoEditClick(GridEvent<M> e)
           
protected  void onCellDoubleClick(GridEvent<M> e)
           
 boolean onDoubleClick(GridEvent<M> e)
           
protected  void onEditCancel(CellEditor ed, java.lang.Object value, java.lang.Object startValue)
           
protected  void onEditComplete(CellEditor ed, java.lang.Object value, java.lang.Object startValue)
           
 void setClicksToEdit(EditorGrid.ClicksToEdit clicksToEdit)
          Sets the number of clicks to edit (defaults to ONE).
 void startEditing(int row, int col)
           
 void stopEditing()
           
 void stopEditing(boolean cancel)
          Stops any active editing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

grid

protected Grid<M extends ModelData> grid

store

protected ListStore<M extends ModelData> store

cm

protected ColumnModel cm

activeEditor

protected CellEditor activeEditor

editorListener

protected Listener<DomEvent> editorListener

activeRecord

protected Record activeRecord

editing

protected boolean editing

ignoreScroll

protected boolean ignoreScroll

clicksToEdit

protected EditorGrid.ClicksToEdit clicksToEdit

gridListener

protected Listener<GridEvent<M extends ModelData>> gridListener
Constructor Detail

EditorSupport

public EditorSupport()
Method Detail

bind

public void bind(Grid grid)

doRender

public void doRender()

getActiveEditor

public CellEditor getActiveEditor()

getClicksToEdit

public EditorGrid.ClicksToEdit getClicksToEdit()
Returns the clicks to edit.

Returns:
the clicks to edit

isEditing

public boolean isEditing()
Returns true if editing is active.

Returns:
the editing state

onDoubleClick

public boolean onDoubleClick(GridEvent<M> e)

setClicksToEdit

public void setClicksToEdit(EditorGrid.ClicksToEdit clicksToEdit)
Sets the number of clicks to edit (defaults to ONE).

Parameters:
clicksToEdit - the clicks to edit

startEditing

public void startEditing(int row,
                         int col)

stopEditing

public void stopEditing()

stopEditing

public void stopEditing(boolean cancel)
Stops any active editing.

Parameters:
cancel - true to cancel, false to complete

deferStartEditing

protected void deferStartEditing(M m,
                                 java.lang.String field,
                                 int row,
                                 int col)

onAutoEditClick

protected void onAutoEditClick(GridEvent<M> e)

onCellDoubleClick

protected void onCellDoubleClick(GridEvent<M> e)

onEditCancel

protected void onEditCancel(CellEditor ed,
                            java.lang.Object value,
                            java.lang.Object startValue)

onEditComplete

protected void onEditComplete(CellEditor ed,
                              java.lang.Object value,
                              java.lang.Object startValue)