|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.vaadin.client.ui.grid.EditorRow<T>
public class EditorRow<T>
An editor UI for Grid rows. A single Grid row at a time can be opened for editing.
| Nested Class Summary | |
|---|---|
static class |
EditorRow.State
|
| Field Summary | |
|---|---|
static int |
KEYCODE_HIDE
|
static int |
KEYCODE_SHOW
|
| Constructor Summary | |
|---|---|
EditorRow()
|
|
| Method Summary | |
|---|---|
void |
cancel()
Cancels the currently active edit and hides the editor. |
void |
commit()
Commits any unsaved changes to the data source. |
protected Element |
createCell(TableCellElement td)
Creates an editor row cell corresponding to the given table cell. |
void |
discard()
Reloads row values from the data source, discarding any unsaved changes. |
void |
editRow(int rowIndex)
Opens the editor over the row with the given index. |
EditorRowHandler<T> |
getHandler()
Returns the handler responsible for binding data and editor widgets to this editor row. |
int |
getRow()
|
protected EditorRow.State |
getState()
|
protected Widget |
getWidget(GridColumn<?,T> column)
Returns the editor widget associated with the given column. |
protected void |
hideOverlay()
|
boolean |
isEnabled()
|
void |
setEnabled(boolean enabled)
Sets the enabled state of this editor row. |
protected void |
setGrid(Grid<T> grid)
|
void |
setHandler(EditorRowHandler<T> rowHandler)
Sets the handler responsible for binding data and editor widgets to this editor row. |
protected void |
setState(EditorRow.State state)
|
protected void |
setStylePrimaryName(java.lang.String primaryName)
|
protected void |
show()
|
protected void |
showOverlay(TableRowElement tr)
Opens the editor overlay over the given table row. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int KEYCODE_SHOW
public static final int KEYCODE_HIDE
| Constructor Detail |
|---|
public EditorRow()
| Method Detail |
|---|
public int getRow()
public void editRow(int rowIndex)
rowIndex - the index of the row to be edited
java.lang.IllegalStateException - if this editor row is not enabled
java.lang.IllegalStateException - if this editor row is already in edit modepublic void cancel()
committed are lost.
java.lang.IllegalStateException - if this editor row is not enabled
java.lang.IllegalStateException - if this editor row is not in edit modepublic void commit()
java.lang.IllegalStateException - if this editor row is not enabled
java.lang.IllegalStateException - if this editor row is not in edit modepublic void discard()
java.lang.IllegalStateException - if this editor row is not enabled
java.lang.IllegalStateException - if this editor row is not in edit modepublic EditorRowHandler<T> getHandler()
public void setHandler(EditorRowHandler<T> rowHandler)
rowHandler - the new editor row handler
java.lang.IllegalStateException - if this editor row is currently in edit modepublic boolean isEnabled()
public void setEnabled(boolean enabled)
enabled - true if enabled, false otherwise
java.lang.IllegalStateException - if in edit mode and trying to disable
java.lang.IllegalStateException - if the editor row handler is not setprotected void show()
protected void setGrid(Grid<T> grid)
protected EditorRow.State getState()
protected void setState(EditorRow.State state)
protected Widget getWidget(GridColumn<?,T> column)
column - the column
protected void showOverlay(TableRowElement tr)
tr - the row to be editedprotected void hideOverlay()
protected void setStylePrimaryName(java.lang.String primaryName)
protected Element createCell(TableCellElement td)
td - the table cell used as a reference
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||