T - the value typeT - public class BoxBase<T> extends com.google.gwt.user.client.ui.ValueBoxBase<T> implements com.google.gwt.event.dom.client.FocusHandler, com.google.gwt.event.dom.client.BlurHandler, IsSWMMobileWidget
ValueBoxBase gwt's ValueBox has an assertion to insert only text content (not valid using e.g.
numbers).| Modifier and Type | Class and Description |
|---|---|
static class |
BoxBase.ToStringRenderer<V> |
com.google.gwt.user.client.ui.ValueBoxBase.TextAlignment| Constructor and Description |
|---|
BoxBase(String html5Type,
com.google.gwt.text.shared.Renderer<T> renderer,
com.google.gwt.text.shared.Parser<T> parser)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addErrorOuptut(IErrorOutputElement errorOutputToAdd)
Add an error output element where error messages are displayed
|
void |
addValidator(IValidator<T> validatorToAdd)
Adds a validator to this Ui-Widget
|
protected static com.google.gwt.dom.client.InputElement |
createNumberInputElement(String type)
Creates the right HTML input element.
|
int |
getMaxLength()
Gets the maximum allowable length.
|
int |
getVisibleLength()
Gets the number of visible characters.
|
void |
onBlur(com.google.gwt.event.dom.client.BlurEvent event) |
void |
onFocus(com.google.gwt.event.dom.client.FocusEvent event) |
void |
onInitialLoad()
When the widget is loaded first time.
|
protected void |
onLoad() |
void |
onTransitionEnd()
When an transition containing this widget ends.
|
void |
removeAllValidators()
Will remove all registered validators.
|
void |
setMaxLength(int length)
Sets the maximum allowable length.
|
void |
setSecondaryStyle(String style)
Will set the secondary style.
|
void |
setVisibleLength(int length)
Sets the number of visible characters.
|
addChangeHandler, addValueChangeHandler, asEditor, cancelKey, getCursorPos, getDirection, getDirectionEstimator, getImpl, getName, getSelectedText, getSelectionLength, getText, getValue, getValueOrThrow, isReadOnly, onBrowserEvent, removeChangeListener, selectAll, setAlignment, setCursorPos, setDirection, setDirectionEstimator, setDirectionEstimator, setKey, setName, setReadOnly, setSelectionRange, setText, setValue, setValueaddBlurHandler, addClickHandler, addClickListener, addDoubleClickHandler, addDragEndHandler, addDragEnterHandler, addDragHandler, addDragLeaveHandler, addDragOverHandler, addDragStartHandler, addDropHandler, addFocusHandler, addFocusListener, addGestureChangeHandler, addGestureEndHandler, addGestureStartHandler, addKeyboardListener, addKeyDownHandler, addKeyPressHandler, addKeyUpHandler, addMouseDownHandler, addMouseListener, addMouseMoveHandler, addMouseOutHandler, addMouseOverHandler, addMouseUpHandler, addMouseWheelHandler, addMouseWheelListener, addTouchCancelHandler, addTouchEndHandler, addTouchMoveHandler, addTouchStartHandler, getFocusImpl, getTabIndex, isEnabled, onAttach, removeClickListener, removeFocusListener, removeKeyboardListener, removeMouseListener, removeMouseWheelListener, setAccessKey, setEnabled, setFocus, setTabIndexaddAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onDetach, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEventsaddStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toStringpublic void addValidator(IValidator<T> validatorToAdd)
validatorToAdd - the validtors to addpublic void addErrorOuptut(IErrorOutputElement errorOutputToAdd)
errorOutputToAdd - the error output element to addpublic void removeAllValidators()
protected void onLoad()
onLoad in class com.google.gwt.user.client.ui.ValueBoxBase<T>public void onFocus(com.google.gwt.event.dom.client.FocusEvent event)
onFocus in interface com.google.gwt.event.dom.client.FocusHandlerpublic void onBlur(com.google.gwt.event.dom.client.BlurEvent event)
onBlur in interface com.google.gwt.event.dom.client.BlurHandlerprotected static com.google.gwt.dom.client.InputElement createNumberInputElement(String type)
type - the typepublic void onInitialLoad()
IsSWMMobileWidgetonInitialLoad in interface IsSWMMobileWidgetpublic void onTransitionEnd()
IsSWMMobileWidgetonTransitionEnd in interface IsSWMMobileWidgetpublic void setSecondaryStyle(String style)
IsSWMMobileWidgetsetSecondaryStyle in interface IsSWMMobileWidgetstyle - the style to set.public int getMaxLength()
public int getVisibleLength()
public void setMaxLength(int length)
length - the maximum length, in characterspublic void setVisibleLength(int length)
length - the number of visible charactersCopyright © 2011–2015 SWM. All rights reserved.