com.sencha.gxt.widget.core.client.grid.editing
Class AbstractGridEditing<M>

java.lang.Object
  extended by com.sencha.gxt.widget.core.client.grid.editing.AbstractGridEditing<M>
All Implemented Interfaces:
HasHandlers, BeforeStartEditEvent.HasBeforeStartEditHandlers<M>, CancelEditEvent.HasCancelEditHandlers<M>, CompleteEditEvent.HasCompleteEditHandlers<M>, StartEditEvent.HasStartEditHandlers<M>, GridEditing<M>
Direct Known Subclasses:
GridInlineEditing, GridRowEditing

public abstract class AbstractGridEditing<M>
extends Object
implements GridEditing<M>


Constructor Summary
AbstractGridEditing()
           
 
Method Summary
 HandlerRegistration addBeforeStartEditHandler(BeforeStartEditEvent.BeforeStartEditHandler<M> handler)
           
 HandlerRegistration addCancelEditHandler(CancelEditEvent.CancelEditHandler<M> handler)
           
 HandlerRegistration addCompleteEditHandler(CompleteEditEvent.CompleteEditHandler<M> handler)
           
<N,O> void
addEditor(ColumnConfig<M,N> columnConfig, Converter<N,O> converter, Field<O> field)
          Adds an editor for the give column.
<N> void
addEditor(ColumnConfig<M,N> columnConfig, Field<N> field)
          Adds an editor for the given column.
 HandlerRegistration addStartEditHandler(StartEditEvent.StartEditHandler<M> handler)
           
abstract  void cancelEditing()
          Cancels an active edit.
 void clearEditors()
           
abstract  void completeEditing()
          Completes the active edit.
 void fireEvent(GwtEvent<?> event)
           
 Grid.GridCell getActiveCell()
           
 ClicksToEdit getClicksToEdit()
           
<N,O> Converter<N,O>
getConverter(ColumnConfig<M,N> columnConfig)
          Returns the converter for the given column.
 Grid<M> getEditableGrid()
          Returns the target grid.
<O> Field<O>
getEditor(ColumnConfig<M,?> columnConfig)
          Returns the editor for the given column.
 boolean isEditing()
          Returns true if editing is active.
 void removeEditor(ColumnConfig<M,?> columnConfig)
          Removes the editor for the given column.
 void setClicksToEdit(ClicksToEdit clicksToEdit)
           
 void setEditableGrid(Grid<M> editableGrid)
          Sets the target grid to be edited.
abstract  void startEditing(Grid.GridCell cell)
          Starts editing for the given cell.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractGridEditing

public AbstractGridEditing()
Method Detail

addBeforeStartEditHandler

public HandlerRegistration addBeforeStartEditHandler(BeforeStartEditEvent.BeforeStartEditHandler<M> handler)
Specified by:
addBeforeStartEditHandler in interface BeforeStartEditEvent.HasBeforeStartEditHandlers<M>

addCancelEditHandler

public HandlerRegistration addCancelEditHandler(CancelEditEvent.CancelEditHandler<M> handler)
Specified by:
addCancelEditHandler in interface CancelEditEvent.HasCancelEditHandlers<M>

addCompleteEditHandler

public HandlerRegistration addCompleteEditHandler(CompleteEditEvent.CompleteEditHandler<M> handler)
Specified by:
addCompleteEditHandler in interface CompleteEditEvent.HasCompleteEditHandlers<M>

addEditor

public <N,O> void addEditor(ColumnConfig<M,N> columnConfig,
                            Converter<N,O> converter,
                            Field<O> field)
Description copied from interface: GridEditing
Adds an editor for the give column.

Specified by:
addEditor in interface GridEditing<M>
Parameters:
columnConfig - the column config
converter - the converter
field - the field

addEditor

public <N> void addEditor(ColumnConfig<M,N> columnConfig,
                          Field<N> field)
Description copied from interface: GridEditing
Adds an editor for the given column.

Specified by:
addEditor in interface GridEditing<M>
Parameters:
columnConfig - the column config
field - the field

addStartEditHandler

public HandlerRegistration addStartEditHandler(StartEditEvent.StartEditHandler<M> handler)
Specified by:
addStartEditHandler in interface StartEditEvent.HasStartEditHandlers<M>

cancelEditing

public abstract void cancelEditing()
Description copied from interface: GridEditing
Cancels an active edit.

Specified by:
cancelEditing in interface GridEditing<M>

clearEditors

public void clearEditors()

completeEditing

public abstract void completeEditing()
Description copied from interface: GridEditing
Completes the active edit.

Specified by:
completeEditing in interface GridEditing<M>

fireEvent

public void fireEvent(GwtEvent<?> event)
Specified by:
fireEvent in interface HasHandlers

getActiveCell

public Grid.GridCell getActiveCell()

getClicksToEdit

public ClicksToEdit getClicksToEdit()

getConverter

public <N,O> Converter<N,O> getConverter(ColumnConfig<M,N> columnConfig)
Description copied from interface: GridEditing
Returns the converter for the given column.

Specified by:
getConverter in interface GridEditing<M>
Parameters:
columnConfig - the column config
Returns:
the converter

getEditableGrid

public Grid<M> getEditableGrid()
Description copied from interface: GridEditing
Returns the target grid.

Specified by:
getEditableGrid in interface GridEditing<M>
Returns:
the target grid

getEditor

public <O> Field<O> getEditor(ColumnConfig<M,?> columnConfig)
Description copied from interface: GridEditing
Returns the editor for the given column.

Specified by:
getEditor in interface GridEditing<M>
Parameters:
columnConfig - the column config
Returns:
the editor

isEditing

public boolean isEditing()
Description copied from interface: GridEditing
Returns true if editing is active.

Specified by:
isEditing in interface GridEditing<M>
Returns:
true if editing

removeEditor

public void removeEditor(ColumnConfig<M,?> columnConfig)
Description copied from interface: GridEditing
Removes the editor for the given column.

Specified by:
removeEditor in interface GridEditing<M>
Parameters:
columnConfig - the column config

setClicksToEdit

public void setClicksToEdit(ClicksToEdit clicksToEdit)

setEditableGrid

public void setEditableGrid(Grid<M> editableGrid)
Description copied from interface: GridEditing
Sets the target grid to be edited.

Specified by:
setEditableGrid in interface GridEditing<M>
Parameters:
editableGrid - the editable grid

startEditing

public abstract void startEditing(Grid.GridCell cell)
Description copied from interface: GridEditing
Starts editing for the given cell.

Specified by:
startEditing in interface GridEditing<M>
Parameters:
cell - the cell


Copyright © 2012. All Rights Reserved.