public abstract class AbstractGridEditing<M> extends Object implements GridEditing<M>
Constructor and Description |
---|
AbstractGridEditing() |
Modifier and Type | Method and Description |
---|---|
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,
IsField<O> field)
Adds an editor for the given column.
|
<N> void |
addEditor(ColumnConfig<M,N> columnConfig,
IsField<N> field)
Adds an editor for the given column.
|
HandlerRegistration |
addStartEditHandler(StartEditEvent.StartEditHandler<M> handler) |
abstract void |
cancelEditing()
Cancels an active edit.
|
void |
clearEditors()
Clears the editors.
|
abstract void |
completeEditing()
Completes the active edit.
|
void |
fireEvent(GwtEvent<?> event) |
Grid.GridCell |
getActiveCell()
Returns the active cell.
|
ClicksToEdit |
getClicksToEdit()
Returns the clicks to edit.
|
<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> IsField<O> |
getEditor(ColumnConfig<M,?> columnConfig)
Returns the editor for the given column.
|
int |
getMonitorPoll()
Returns the interval that the editor is validated.
|
boolean |
isEditing()
Returns true if editing is active.
|
boolean |
isErrorSummary()
Returns true if a tooltip with an error summary is shown.
|
boolean |
isMonitorValid()
Returns true if valid monitoring is enabled.
|
void |
removeEditor(ColumnConfig<M,?> columnConfig)
Removes the editor for the given column.
|
void |
setClicksToEdit(ClicksToEdit clicksToEdit)
Sets the number of clicks to edit (defaults to ONE).
|
void |
setEditableGrid(Grid<M> editableGrid)
Sets the target grid to be edited.
|
void |
setErrorSummary(boolean errorSummary)
True to show a tooltip with an error summary (defaults to true)
|
void |
setMonitorPoll(int monitorPoll)
Sets the polling interval that the row editor validation is run (defaults to 200).
|
void |
setMonitorValid(boolean monitorValid)
True to monitor the valid status of this editor (defaults to true).
|
abstract void |
startEditing(Grid.GridCell cell)
Starts editing for the given cell.
|
public HandlerRegistration addBeforeStartEditHandler(BeforeStartEditEvent.BeforeStartEditHandler<M> handler)
addBeforeStartEditHandler
in interface BeforeStartEditEvent.HasBeforeStartEditHandlers<M>
public HandlerRegistration addCancelEditHandler(CancelEditEvent.CancelEditHandler<M> handler)
addCancelEditHandler
in interface CancelEditEvent.HasCancelEditHandlers<M>
public HandlerRegistration addCompleteEditHandler(CompleteEditEvent.CompleteEditHandler<M> handler)
addCompleteEditHandler
in interface CompleteEditEvent.HasCompleteEditHandlers<M>
public <N,O> void addEditor(ColumnConfig<M,N> columnConfig, Converter<N,O> converter, IsField<O> field)
GridEditing
addEditor
in interface GridEditing<M>
columnConfig
- the column configconverter
- the converterfield
- the fieldpublic <N> void addEditor(ColumnConfig<M,N> columnConfig, IsField<N> field)
GridEditing
addEditor
in interface GridEditing<M>
columnConfig
- the column configfield
- the fieldpublic HandlerRegistration addStartEditHandler(StartEditEvent.StartEditHandler<M> handler)
addStartEditHandler
in interface StartEditEvent.HasStartEditHandlers<M>
public abstract void cancelEditing()
GridEditing
cancelEditing
in interface GridEditing<M>
public void clearEditors()
public abstract void completeEditing()
GridEditing
completeEditing
in interface GridEditing<M>
public void fireEvent(GwtEvent<?> event)
fireEvent
in interface HasHandlers
public Grid.GridCell getActiveCell()
public ClicksToEdit getClicksToEdit()
public <N,O> Converter<N,O> getConverter(ColumnConfig<M,N> columnConfig)
GridEditing
getConverter
in interface GridEditing<M>
columnConfig
- the column configpublic Grid<M> getEditableGrid()
GridEditing
getEditableGrid
in interface GridEditing<M>
public <O> IsField<O> getEditor(ColumnConfig<M,?> columnConfig)
GridEditing
getEditor
in interface GridEditing<M>
columnConfig
- the column configpublic int getMonitorPoll()
public boolean isEditing()
GridEditing
isEditing
in interface GridEditing<M>
public boolean isErrorSummary()
public boolean isMonitorValid()
public void removeEditor(ColumnConfig<M,?> columnConfig)
GridEditing
removeEditor
in interface GridEditing<M>
columnConfig
- the column configpublic void setClicksToEdit(ClicksToEdit clicksToEdit)
clicksToEdit
- the clicks to editpublic void setEditableGrid(Grid<M> editableGrid)
GridEditing
setEditableGrid
in interface GridEditing<M>
editableGrid
- the editable gridpublic void setErrorSummary(boolean errorSummary)
errorSummary
- true to show an error summary.public void setMonitorPoll(int monitorPoll)
monitorPoll
- the polling interval in ms in that validation is donepublic void setMonitorValid(boolean monitorValid)
monitorValid
- true to monitor this row editorpublic abstract void startEditing(Grid.GridCell cell)
GridEditing
startEditing
in interface GridEditing<M>
cell
- the cellCopyright © 2015. All rights reserved.