|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.extjs.gxt.ui.client.widget.Component
com.extjs.gxt.ui.client.widget.BoxComponent
com.extjs.gxt.ui.client.widget.Container<T>
com.extjs.gxt.ui.client.widget.ScrollContainer<Component>
com.extjs.gxt.ui.client.widget.LayoutContainer
com.extjs.gxt.ui.client.widget.ContentPanel
com.extjs.gxt.ui.client.widget.grid.RowEditor<M>
M
- the model typepublic class RowEditor<M extends ModelData>
This RowEditor should be used as a plugin to Grid
. It displays an
editor for all cells in a row.
BaseEvent.setCancelled(boolean)
.BaseEvent.setCancelled(boolean)
.
Nested Class Summary | |
---|---|
class |
RowEditor.RowEditorMessages
|
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject |
---|
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled |
Field Summary | |
---|---|
protected ContentPanel |
btns
|
protected Button |
cancelBtn
|
protected Grid<M> |
grid
|
protected RowEditor.RowEditorMessages |
messages
|
protected boolean |
renderButtons
|
protected int |
rowIndex
|
protected Button |
saveBtn
|
Fields inherited from class com.extjs.gxt.ui.client.widget.ContentPanel |
---|
bbarStyle, bodStyle, body, bwrap, bwrapStyle, collapseStyle, fbar, footerStyle, frame, head, headerStyle, headerTextStyle, tbarStyle |
Fields inherited from class com.extjs.gxt.ui.client.widget.Container |
---|
attachChildren, enableLayout, layoutExecuted, layoutNeeded, layoutOnAttach, layoutOnChange |
Fields inherited from class com.extjs.gxt.ui.client.widget.BoxComponent |
---|
adjustSize, cacheSizes, ensureVisibilityOnSizing, height, lastSize, layer, shim, width |
Fields inherited from class com.extjs.gxt.ui.client.widget.Component |
---|
afterRender, attachables, baseStyle, disabled, disabledStyle, disableTextSelection, dummy, focusable, hidden, mask, maskMessage, maskMessageStyleName, monitorWindowResize, rendered, resizeHandler, setElementRender, stateId, swallowEvents, toolTip, windowResizeDelay, windowResizeTask |
Fields inherited from class com.google.gwt.user.client.ui.UIObject |
---|
DEBUG_ID_PREFIX |
Constructor Summary | |
---|---|
RowEditor()
|
Method Summary | |
---|---|
protected void |
afterRender()
Called after the component has been rendered and is attached for the first time. |
protected void |
bindHandler()
|
protected void |
createButtons()
|
protected void |
deferFocus(int colIndex)
|
protected void |
deferFocus(Point pt)
|
protected void |
doAttachChildren()
|
protected void |
doDetachChildren()
|
protected void |
doFocus(int colIndex)
|
protected void |
doFocus(Point pt)
|
protected void |
ensureVisible(CellEditor editor)
|
protected Component |
findField(com.google.gwt.user.client.Element elem)
|
EditorGrid.ClicksToEdit |
getClicksToEdit()
Returns the clicks to edit. |
protected java.lang.String |
getErrorText()
|
RowEditor.RowEditorMessages |
getMessages()
Returns the roweditors's messages. |
int |
getMonitorPoll()
Returns the interval in ms in that the roweditor is validated |
protected Point |
getPosition(com.google.gwt.user.client.Element row)
|
protected Record |
getRecord(M model)
|
protected int |
getTargetColumnIndex(Point pt)
|
protected void |
hideTooltip()
|
void |
init(Component component)
Initializes the plugin when the component is created. |
protected void |
initFields()
|
protected boolean |
isDirty()
|
boolean |
isEditing()
Returns true of the RowEditor is active and editing. |
boolean |
isErrorSummary()
Returns true if a tooltip with an error summary is shown. |
boolean |
isMonitorValid()
Returns true if this roweditor is monitored. |
protected boolean |
isValid()
|
void |
onComponentEvent(ComponentEvent ce)
Any events a component receives will be forwarded to this method. |
protected void |
onEnter(ComponentEvent ce)
|
protected void |
onEscape(ComponentEvent ce)
|
protected void |
onGridKey(GridEvent<M> e)
|
protected void |
onHide()
|
protected void |
onRender(com.google.gwt.user.client.Element target,
int index)
Subclasses must override and ensure setElement is called for lazy rendered components. |
protected void |
onRowClick(GridEvent<M> e)
|
protected void |
onRowDblClick(GridEvent<M> e)
|
protected void |
onShow()
|
protected void |
onTab(ComponentEvent ce)
|
protected void |
positionButtons()
|
void |
setClicksToEdit(EditorGrid.ClicksToEdit clicksToEdit)
Sets the number of clicks to edit (defaults to ONE). |
void |
setErrorSummary(boolean errorSummary)
True to show a tooltip with an error summary (defaults to true) |
void |
setMessages(RowEditor.RowEditorMessages messages)
Sets the roweditors's messages. |
void |
setMonitorPoll(int monitorPoll)
Sets the polling interval in ms in that the roweditor validation is done (defaults to 200) |
void |
setMonitorValid(boolean monitorValid)
True to monitor the valid status of this roweditor (defaults to true) |
protected void |
showTooltip(java.lang.String msg)
|
void |
startEditing(int rowIndex,
boolean doFocus)
Start editing of a specific row. |
protected void |
startMonitoring()
|
void |
stopEditing(boolean saveChanges)
Stops editing. |
protected void |
stopMonitoring()
|
protected void |
verifyLayout(boolean force)
|
Methods inherited from class com.extjs.gxt.ui.client.widget.LayoutContainer |
---|
add, add, addText, findComponent, getLayout, getWindowResizeDelay, insert, insert, isLayoutOnChange, isMonitorWindowResize, layout, layout, onBlur, onFocus, remove, removeAll, setLayout, setLayoutData, setLayoutOnChange, setMonitorWindowResize, setWindowResizeDelay |
Methods inherited from class com.extjs.gxt.ui.client.widget.ScrollContainer |
---|
addScrollListener, getHScrollPosition, getScrollMode, getVScrollPosition, removeScrollListener, scrollIntoView, setHScrollPosition, setScrollMode, setVScrollPosition |
Methods inherited from class com.extjs.gxt.ui.client.widget.Container |
---|
add, adjustIndex, adopt, createContainerEvent, disable, doLayout, doLayout, enable, findItem, getItem, getItemByItemId, getItemCount, getItems, getWidget, indexOf, insert, isLayoutNeeded, iterator, onAfterLayout, onAttach, onBeforeLayoutExcecuted, onInsert, onLayoutExcecuted, onRemove, orphan, remove, removeAll, scrollIntoView, setLayoutNeeded, wrapWidget |
Methods inherited from class com.extjs.gxt.ui.client.widget.BoxComponent |
---|
adjustPosition, adjustSize, createComponentEvent, getBounds, getHeight, getHeight, getPosition, getPositionEl, getResizeEl, getShadow, getShadowOffset, getShadowPosition, getSize, getWidth, getWidth, hideShadow, hideShim, hideUnders, isAutoHeight, isAutoWidth, isDeferHeight, isShim, onPosition, onUnload, setAutoHeight, setAutoWidth, setBounds, setBounds, setDeferHeight, setHeight, setHeight, setPagePosition, setPagePosition, setPixelSize, setPosition, setShadow, setShadowOffset, setShadowPosition, setShim, setSize, setSize, setWidth, setWidth, sync, syncSize |
Methods inherited from class com.google.gwt.user.client.ui.Widget |
---|
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, setLayoutData |
Methods inherited from class com.google.gwt.user.client.ui.UIObject |
---|
addStyleDependentName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, removeStyleDependentName, setElement, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkBitlessEvent, unsinkEvents |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected ContentPanel btns
protected Grid<M extends ModelData> grid
protected RowEditor.RowEditorMessages messages
protected boolean renderButtons
protected int rowIndex
protected Button saveBtn
protected Button cancelBtn
Constructor Detail |
---|
public RowEditor()
Method Detail |
---|
public EditorGrid.ClicksToEdit getClicksToEdit()
public RowEditor.RowEditorMessages getMessages()
public int getMonitorPoll()
public void init(Component component)
ComponentPlugin
init
in interface ComponentPlugin
component
- the source componentpublic boolean isEditing()
public boolean isErrorSummary()
public boolean isMonitorValid()
public void onComponentEvent(ComponentEvent ce)
Component
Component.onBrowserEvent(com.google.gwt.user.client.Event)
method
should not be overridden or modified.
onComponentEvent
in class ContentPanel
ce
- the base eventpublic void setClicksToEdit(EditorGrid.ClicksToEdit clicksToEdit)
clicksToEdit
- the clicks to editpublic void setErrorSummary(boolean errorSummary)
errorSummary
- true to show an error summary.public void setMessages(RowEditor.RowEditorMessages messages)
messages
- the messagespublic void setMonitorPoll(int monitorPoll)
monitorPoll
- the polling interval in ms in that validation is donepublic void setMonitorValid(boolean monitorValid)
monitorValid
- true to monitor this roweditorpublic void startEditing(int rowIndex, boolean doFocus)
rowIndex
- the index of the row to edit.doFocus
- true to focus the fieldpublic void stopEditing(boolean saveChanges)
saveChanges
- true to save the changes. false to ignore them.protected void afterRender()
Component
afterRender
in class ScrollContainer<Component>
protected void bindHandler()
protected void createButtons()
protected void deferFocus(int colIndex)
protected void deferFocus(Point pt)
protected void doAttachChildren()
doAttachChildren
in class ContentPanel
protected void doDetachChildren()
doDetachChildren
in class ContentPanel
protected void doFocus(Point pt)
protected void doFocus(int colIndex)
protected void ensureVisible(CellEditor editor)
protected Component findField(com.google.gwt.user.client.Element elem)
protected java.lang.String getErrorText()
protected Point getPosition(com.google.gwt.user.client.Element row)
protected Record getRecord(M model)
protected int getTargetColumnIndex(Point pt)
protected void hideTooltip()
protected void initFields()
protected boolean isDirty()
protected boolean isValid()
protected void onEnter(ComponentEvent ce)
protected void onEscape(ComponentEvent ce)
protected void onGridKey(GridEvent<M> e)
protected void onHide()
onHide
in class BoxComponent
protected void onRender(com.google.gwt.user.client.Element target, int index)
Component
onRender
in class ContentPanel
target
- the target elementindex
- the insert locationprotected void onRowClick(GridEvent<M> e)
protected void onRowDblClick(GridEvent<M> e)
protected void onShow()
onShow
in class BoxComponent
protected void onTab(ComponentEvent ce)
protected void positionButtons()
protected void showTooltip(java.lang.String msg)
protected void startMonitoring()
protected void stopMonitoring()
protected void verifyLayout(boolean force)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |