|
|||||||||
| 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.Editor
public class Editor
A base editor field that handles displaying/hiding on demand and has some built-in sizing and event handling logic.
| Nested Class Summary |
|---|
| 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 |
|---|
| Fields inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
DEBUG_ID_PREFIX |
| Constructor Summary | |
|---|---|
Editor(Field field)
Creates a new editor. |
|
| Method Summary | |
|---|---|
void |
cancelEdit()
Cancels the editing process and hides the editor without persisting any changes. |
void |
completeEdit()
Ends the editing process, persists the changed value to the underlying field, and hides the editor. |
java.lang.String |
getAlignment()
Returns the editor's alignment. |
Field |
getField()
Returns the editor's field. |
java.lang.Object |
getValue()
Returns the data value of the editor. |
boolean |
isAllowBlur()
Returns true if blurs are allowed. |
boolean |
isCancelOnEsc()
Returns true if cancel on escape is enabled. |
boolean |
isCompleteOnEnter()
Returns true if complete on enter is enabled. |
boolean |
isConstrain()
Returns true if the editor is constrained to the viewport. |
boolean |
isRevertInvalid()
Returns true of the editor reverts the value to the start value on invalid. |
boolean |
isSwallowKeys()
Returns true if key presses are being swallowed. |
boolean |
isUpdateEl()
Returns true if the inner HTML of the bound element is updated when the update is complete. |
java.lang.Object |
postProcessValue(java.lang.Object value)
Called after the editor completes an edit. |
java.lang.Object |
preProcessValue(java.lang.Object value)
Called before the editor sets the value on the wrapped field. |
void |
realign()
Realigns the editor to the bound field based on the current alignment config value. |
void |
setAlignment(java.lang.String alignment)
The position to align to (see El.alignTo(com.google.gwt.user.client.Element, java.lang.String, int[]) for more details, defaults
to "c-c?"). |
void |
setAllowBlur(boolean allowBlur)
Sets whether editing should be cancelled when the field is blurred (defaults to false). |
void |
setCancelOnEsc(boolean cancelOnEsc)
True to cancel the edit when the escape key is pressed (defaults to false). |
void |
setCompleteOnEnter(boolean completeOnEnter)
True to complete the edit when the enter key is pressed (defaults to false). |
void |
setConstrain(boolean constrain)
True to constrain the editor to the viewport. |
void |
setRevertInvalid(boolean revertInvalid)
True to revert to start value on invalid value (defaults to true). |
void |
setSize(int width,
int height)
Sets the width and height of the component. |
void |
setSwallowKeys(boolean swallowKeys)
Handle the keypress events so they don't propagate (defaults to true). |
void |
setUpdateEl(boolean updateEl)
True to update the innerHTML of the bound element when the update completes (defaults to false). |
void |
setValue(java.lang.Object value)
Sets the data value of the editor |
void |
startEdit(com.google.gwt.user.client.Element el,
java.lang.Object value)
Starts the editing process and shows the editor. |
| Methods inherited from class com.extjs.gxt.ui.client.widget.BoxComponent |
|---|
getBounds, getHeight, getHeight, getPosition, getShadow, getShadowOffset, getShadowPosition, getSize, getWidth, getWidth, isAutoHeight, isAutoWidth, isDeferHeight, isShim, setAutoHeight, setAutoWidth, setBounds, setBounds, setDeferHeight, setHeight, setHeight, setPagePosition, setPagePosition, setPixelSize, setPosition, setShadow, setShadowOffset, setShadowPosition, setShim, setSize, setWidth, setWidth, sync, syncSize |
| Methods inherited from class com.google.gwt.user.client.ui.Widget |
|---|
fireEvent, getParent, isAttached |
| Methods inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
addStyleDependentName, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleName, getStylePrimaryName, getTitle, isVisible, removeStyleDependentName, setStylePrimaryName, setVisible, unsinkEvents |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Editor(Field field)
field - the field| Method Detail |
|---|
public void cancelEdit()
public void completeEdit()
public java.lang.String getAlignment()
public Field getField()
public java.lang.Object getValue()
public boolean isAllowBlur()
public boolean isCancelOnEsc()
public boolean isCompleteOnEnter()
public boolean isConstrain()
public boolean isRevertInvalid()
public boolean isSwallowKeys()
public boolean isUpdateEl()
public java.lang.Object postProcessValue(java.lang.Object value)
value - the value from the editor
public java.lang.Object preProcessValue(java.lang.Object value)
value - the editor value
public void realign()
public void setAlignment(java.lang.String alignment)
El.alignTo(com.google.gwt.user.client.Element, java.lang.String, int[]) for more details, defaults
to "c-c?").
alignment - the alignmentpublic void setAllowBlur(boolean allowBlur)
allowBlur - true to allow blurpublic void setCancelOnEsc(boolean cancelOnEsc)
cancelOnEsc - true to cancel on escapepublic void setCompleteOnEnter(boolean completeOnEnter)
completeOnEnter - true to complete on enterpublic void setConstrain(boolean constrain)
constrain - true to constrainpublic void setRevertInvalid(boolean revertInvalid)
revertInvalid - true to revert
public void setSize(int width,
int height)
BoxComponent
setSize in class BoxComponentwidth - the new width to setheight - the new height to setpublic void setSwallowKeys(boolean swallowKeys)
swallowKeys - true to swallow key press events.public void setUpdateEl(boolean updateEl)
updateEl - true to update the inner HTMLpublic void setValue(java.lang.Object value)
value - any valid value supported by the underlying field
public void startEdit(com.google.gwt.user.client.Element el,
java.lang.Object value)
el - the element to edit
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||