M
- the model typepublic class GridRowEditing<M> extends AbstractGridEditing<M>
Modifier and Type | Class and Description |
---|---|
class |
GridRowEditing.DefaultRowEditorMessages |
protected class |
GridRowEditing.Handler |
static interface |
GridRowEditing.RowEditorAppearance |
protected class |
GridRowEditing.RowEditorComponent |
static interface |
GridRowEditing.RowEditorMessages |
AbstractGridEditing.AbstractGridEditingKeyNav
Modifier and Type | Field and Description |
---|---|
protected GridRowEditing.RowEditorMessages |
messages |
protected Map<ColumnConfig<M,?>,<any>> |
renderers |
protected WidgetComponent |
toolTipAlignWidget |
activeCell, bound, callback, columnModel, converterMap, editableGrid, editorMap, groupRegistration, handler, keyNav, lastValid, monitorTimer, tooltip
Constructor and Description |
---|
GridRowEditing(Grid<M> editableGrid)
Creates a new row editing instance.
|
Modifier and Type | Method and Description |
---|---|
<N,O> void |
addEditor(ColumnConfig<M,N> columnConfig,
Converter<N,O> converter,
IsField<O> field)
Adds an editor for the given column.
|
<N> void |
addRenderer(ColumnConfig<M,N> columnConfig,
<any> renderer)
Adds a SafeHtml renderer for the given column.
|
protected void |
bindHandler() |
void |
cancelEditing()
Cancels an active edit.
|
void |
completeEditing()
Completes the active edit.
|
protected GridRowEditing.RowEditorComponent |
createRowEditor() |
protected <N,O> void |
doCompleteEditing(ColumnConfig<M,N> c) |
protected <N,O> IsWidget |
doStartEditing(ColumnConfig<M,N> c,
M value) |
protected GridRowEditing.Handler |
ensureInternHandler() |
ButtonBar |
getButtonBar()
Returns the row editor button bar with the Cancel and Save buttons.
|
TextButton |
getCancelButton()
Returns the cancel button.
|
protected SafeHtml |
getErrorHtml() |
GridRowEditing.RowEditorMessages |
getMessages()
Returns the row editor messages.
|
TextButton |
getSaveButton()
Returns the save button.
|
protected boolean |
isValid() |
protected void |
onEnter(NativeEvent evt) |
protected void |
onScroll(ScrollEvent event) |
protected void |
positionButtons() |
void |
removeEditor(ColumnConfig<M,?> columnConfig)
Removes the editor for the given column.
|
void |
setEditableGrid(Grid<M> editableGrid)
Sets the target grid to be edited.
|
void |
setMessages(GridRowEditing.RowEditorMessages messages)
Sets the row editor messages.
|
protected void |
showTooltip(SafeHtml msg) |
void |
startEditing(Grid.GridCell cell)
Starts editing for the given cell.
|
protected void |
verifyLayout() |
addBeforeStartEditHandler, addCancelEditHandler, addCompleteEditHandler, addEditor, addStartEditHandler, clearEditors, ensureHandlers, ensureInternalKeyNav, findCell, fireEvent, focusCell, focusGrid, getActiveCell, getClicksToEdit, getConverter, getEditableGrid, getEditor, getErrorMessage, getErrorMessage, getMonitorPoll, handleHeaderMouseDown, hideTooltip, isEditing, isErrorSummary, isMonitorValid, onAttachOrDetach, onClick, onDoubleClick, onEsc, onMouseDown, onMouseUp, onReconfigure, setClicksToEdit, setErrorSummary, setMonitorPoll, setMonitorValid, startMonitoring, stopMonitoring
protected GridRowEditing.RowEditorMessages messages
protected WidgetComponent toolTipAlignWidget
protected Map<ColumnConfig<M,?>,<any>> renderers
public <N,O> void addEditor(ColumnConfig<M,N> columnConfig, Converter<N,O> converter, IsField<O> field)
GridEditing
addEditor
in interface GridEditing<M>
addEditor
in class AbstractGridEditing<M>
columnConfig
- the column configconverter
- the converterfield
- the fieldpublic <N> void addRenderer(ColumnConfig<M,N> columnConfig, <any> renderer)
columnConfig
- the column to render in this wayrenderer
- how to render the column's value as htmlpublic void cancelEditing()
GridEditing
cancelEditing
in interface GridEditing<M>
cancelEditing
in class AbstractGridEditing<M>
public void completeEditing()
GridEditing
completeEditing
in interface GridEditing<M>
completeEditing
in class AbstractGridEditing<M>
public ButtonBar getButtonBar()
Grid.getSelectionModel()
cancelEditing()
// example creating a delete button TextButton deleteBtn = new TextButton("Delete"); deleteBtn.addSelectHandler(new SelectEvent.SelectHandler() { public void onSelect(SelectEvent event) { // close the editing editing.cancelEditing(); // get the model StateModel item = grid.getSelectionModel().getSelectedItem(); } }); ButtonBar buttonBar = rowEditing.getButtonBar(); buttonBar.add(deleteBtn);
ButtonBar
.public TextButton getCancelButton()
public GridRowEditing.RowEditorMessages getMessages()
public TextButton getSaveButton()
public void removeEditor(ColumnConfig<M,?> columnConfig)
GridEditing
removeEditor
in interface GridEditing<M>
removeEditor
in class AbstractGridEditing<M>
columnConfig
- the column configpublic void setEditableGrid(Grid<M> editableGrid)
GridEditing
setEditableGrid
in interface GridEditing<M>
setEditableGrid
in class AbstractGridEditing<M>
editableGrid
- the editable gridpublic void setMessages(GridRowEditing.RowEditorMessages messages)
messages
- the messagespublic void startEditing(Grid.GridCell cell)
GridEditing
startEditing
in interface GridEditing<M>
startEditing
in class AbstractGridEditing<M>
cell
- the cellprotected void bindHandler()
bindHandler
in class AbstractGridEditing<M>
protected GridRowEditing.RowEditorComponent createRowEditor()
protected <N,O> void doCompleteEditing(ColumnConfig<M,N> c)
protected <N,O> IsWidget doStartEditing(ColumnConfig<M,N> c, M value)
protected GridRowEditing.Handler ensureInternHandler()
ensureInternHandler
in class AbstractGridEditing<M>
protected SafeHtml getErrorHtml()
getErrorHtml
in class AbstractGridEditing<M>
protected boolean isValid()
isValid
in class AbstractGridEditing<M>
protected void onEnter(NativeEvent evt)
onEnter
in class AbstractGridEditing<M>
protected void onScroll(ScrollEvent event)
onScroll
in class AbstractGridEditing<M>
protected void positionButtons()
protected void showTooltip(SafeHtml msg)
showTooltip
in class AbstractGridEditing<M>
protected void verifyLayout()
Copyright © 2018. All rights reserved.