org.gwtbootstrap3.client.ui.base
Class ValueBoxBase<T>

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.google.gwt.user.client.ui.FocusWidget
              extended by com.google.gwt.user.client.ui.ValueBoxBase<T>
                  extended by org.gwtbootstrap3.client.ui.base.ValueBoxBase<T>
All Implemented Interfaces:
Editor<T>, HasEditorErrors<T>, IsEditor<ValueBoxEditor<T>>, HasAllDragAndDropHandlers, HasAllFocusHandlers, HasAllGestureHandlers, HasAllKeyHandlers, HasAllMouseHandlers, HasAllTouchHandlers, HasBlurHandlers, HasChangeHandlers, HasClickHandlers, HasDoubleClickHandlers, HasDragEndHandlers, HasDragEnterHandlers, HasDragHandlers, HasDragLeaveHandlers, HasDragOverHandlers, HasDragStartHandlers, HasDropHandlers, HasFocusHandlers, HasGestureChangeHandlers, HasGestureEndHandlers, HasGestureStartHandlers, HasKeyDownHandlers, HasKeyPressHandlers, HasKeyUpHandlers, HasMouseDownHandlers, HasMouseMoveHandlers, HasMouseOutHandlers, HasMouseOverHandlers, HasMouseUpHandlers, HasMouseWheelHandlers, HasTouchCancelHandlers, HasTouchEndHandlers, HasTouchMoveHandlers, HasTouchStartHandlers, HasAttachHandlers, HasValueChangeHandlers<T>, HasHandlers, AutoDirectionHandler.Target, HasDirection, HasDirectionEstimator, EventListener, TakesValue<T>, Focusable, HasEnabled, HasFocus, HasName, HasText, HasValue<T>, HasVisibility, IsWidget, SourcesClickEvents, SourcesFocusEvents, SourcesKeyboardEvents, SourcesMouseEvents, HasAutoComplete, HasId, HasPlaceholder, HasResponsiveness, HasSize<InputSize>, HasErrorHandler, HasBlankValidator<T>, HasValidators<T>
Direct Known Subclasses:
DoubleBox, Input, IntegerBox, LongBox, TextBoxBase

public class ValueBoxBase<T>
extends ValueBoxBase<T>
implements HasId, HasResponsiveness, HasPlaceholder, HasAutoComplete, HasSize<InputSize>, HasEditorErrors<T>, HasErrorHandler, HasValidators<T>, HasBlankValidator<T>


Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.ValueBoxBase
ValueBoxBase.TextAlignment
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
 
Nested classes/interfaces inherited from interface com.google.gwt.editor.client.Editor
Editor.Ignore, Editor.Path
 
Nested classes/interfaces inherited from interface com.google.gwt.i18n.client.HasDirection
HasDirection.Direction
 
Field Summary
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Fields inherited from interface org.gwtbootstrap3.client.ui.base.HasPlaceholder
PLACEHOLDER
 
Fields inherited from interface org.gwtbootstrap3.client.ui.base.HasAutoComplete
AUTO_COMPLETE, OFF, ON
 
Constructor Summary
protected ValueBoxBase(Element elem, Renderer<T> renderer, Parser<T> parser)
          Creates a value box that wraps the given browser element handle.
 
Method Summary
 void addValidator(Validator<T> validator)
          Adds the validator.
 boolean getAllowBlank()
           
 String getAutoComplete()
          Get the auto complete attribute from the widget
 ErrorHandler getErrorHandler()
          Gets the error handler.
 ErrorHandlerType getErrorHandlerType()
          Gets the error handler type.
 String getId()
          Gets the ID of the widget
 String getPlaceholder()
           
 InputSize getSize()
          Get the size of the widget
 boolean getValidateOnBlur()
          Gets the validate on blur.
 void reset()
          Reset the form element to blank and clear error messages.
 void setAllowBlank(boolean allowBlank)
           
 void setAutoComplete(boolean autoComplete)
          Sets the auto complete property on the widget
 void setErrorHandler(ErrorHandler handler)
          Sets the error handler.
 void setErrorHandlerType(ErrorHandlerType type)
          Sets the error handler type.
 void setHiddenOn(DeviceSize deviceSize)
          Sets the devices that the element is hidden on
 void setId(String id)
          Sets the ID on the widget
 void setMaxLength(int maxLength)
           
 void setPlaceholder(String placeHolder)
           
 void setSize(InputSize size)
          Set the size of the widget
 void setValidateOnBlur(boolean validateOnBlur)
          Sets the validate on blur.
 void setValidators(Validator<T>... validators)
          The validators used to validate this object.
 void setValue(T value, boolean fireEvents)
          
 void setVisibleOn(DeviceSize deviceSize)
          Sets the devices that the element is visible on
 void showErrors(List<EditorError> errors)
          
 boolean validate()
          Validate the field's value using the supplied validators.
 boolean validate(boolean show)
          Validate the field's value using the supplied validators.
 
Methods inherited from class com.google.gwt.user.client.ui.ValueBoxBase
addChangeHandler, addValueChangeHandler, asEditor, cancelKey, getCursorPos, getDirection, getDirectionEstimator, getImpl, getName, getSelectedText, getSelectionLength, getText, getValue, getValueOrThrow, isReadOnly, onBrowserEvent, onLoad, removeChangeListener, selectAll, setAlignment, setCursorPos, setDirection, setDirectionEstimator, setDirectionEstimator, setKey, setName, setReadOnly, setSelectionRange, setText, setValue
 
Methods inherited from class com.google.gwt.user.client.ui.FocusWidget
addBlurHandler, 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, setTabIndex
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onDetach, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, 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, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.google.gwt.event.dom.client.HasKeyUpHandlers
addKeyUpHandler
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 

Constructor Detail

ValueBoxBase

protected ValueBoxBase(Element elem,
                       Renderer<T> renderer,
                       Parser<T> parser)
Creates a value box that wraps the given browser element handle. This is only used by subclasses.

Parameters:
elem - the browser element to wrap
Method Detail

setMaxLength

public void setMaxLength(int maxLength)

setPlaceholder

public void setPlaceholder(String placeHolder)
Specified by:
setPlaceholder in interface HasPlaceholder

getPlaceholder

public String getPlaceholder()
Specified by:
getPlaceholder in interface HasPlaceholder

setAutoComplete

public void setAutoComplete(boolean autoComplete)
Description copied from interface: HasAutoComplete
Sets the auto complete property on the widget

Specified by:
setAutoComplete in interface HasAutoComplete
Parameters:
autoComplete - auto complete setting for the widget

getAutoComplete

public String getAutoComplete()
Description copied from interface: HasAutoComplete
Get the auto complete attribute from the widget

Specified by:
getAutoComplete in interface HasAutoComplete
Returns:
auto complete attribute

setId

public void setId(String id)
Description copied from interface: HasId
Sets the ID on the widget

Specified by:
setId in interface HasId
Parameters:
id - String desired ID

getId

public String getId()
Description copied from interface: HasId
Gets the ID of the widget

Specified by:
getId in interface HasId
Returns:
String widget ID

setVisibleOn

public void setVisibleOn(DeviceSize deviceSize)
Description copied from interface: HasResponsiveness
Sets the devices that the element is visible on

Specified by:
setVisibleOn in interface HasResponsiveness
Parameters:
deviceSize - device size
See Also:
DeviceSize

setHiddenOn

public void setHiddenOn(DeviceSize deviceSize)
Description copied from interface: HasResponsiveness
Sets the devices that the element is hidden on

Specified by:
setHiddenOn in interface HasResponsiveness
Parameters:
deviceSize - device sizes
See Also:
DeviceSize

setSize

public void setSize(InputSize size)
Description copied from interface: HasSize
Set the size of the widget

Specified by:
setSize in interface HasSize<InputSize>
Parameters:
size - T size of the widget

getSize

public InputSize getSize()
Description copied from interface: HasSize
Get the size of the widget

Specified by:
getSize in interface HasSize<InputSize>
Returns:
T size of the widget

setValue

public void setValue(T value,
                     boolean fireEvents)

Specified by:
setValue in interface HasValue<T>
Overrides:
setValue in class ValueBoxBase<T>

showErrors

public void showErrors(List<EditorError> errors)

Specified by:
showErrors in interface HasEditorErrors<T>

getErrorHandler

public ErrorHandler getErrorHandler()
Gets the error handler.

Specified by:
getErrorHandler in interface HasErrorHandler
Returns:
the error handler

setErrorHandler

public void setErrorHandler(ErrorHandler handler)
Sets the error handler.

Specified by:
setErrorHandler in interface HasErrorHandler
Parameters:
handler - the new error handler

getErrorHandlerType

public ErrorHandlerType getErrorHandlerType()
Gets the error handler type.

Specified by:
getErrorHandlerType in interface HasErrorHandler
Returns:
the error handler type

setErrorHandlerType

public void setErrorHandlerType(ErrorHandlerType type)
Sets the error handler type.

Specified by:
setErrorHandlerType in interface HasErrorHandler
Parameters:
type - the new error handler type

setAllowBlank

public void setAllowBlank(boolean allowBlank)
Specified by:
setAllowBlank in interface HasBlankValidator<T>
Parameters:
allowBlank - the new allow blank

getAllowBlank

public boolean getAllowBlank()
Specified by:
getAllowBlank in interface HasBlankValidator<T>
Returns:
the allow blank

addValidator

public void addValidator(Validator<T> validator)
Description copied from interface: HasValidators
Adds the validator.

Specified by:
addValidator in interface HasValidators<T>
Parameters:
validator - the validator

getValidateOnBlur

public boolean getValidateOnBlur()
Description copied from interface: HasValidators
Gets the validate on blur.

Specified by:
getValidateOnBlur in interface HasValidators<T>
Returns:
the validate on blur

setValidateOnBlur

public void setValidateOnBlur(boolean validateOnBlur)
Description copied from interface: HasValidators
Sets the validate on blur.

Specified by:
setValidateOnBlur in interface HasValidators<T>
Parameters:
validateOnBlur - the new validate on blur

setValidators

public void setValidators(Validator<T>... validators)
Description copied from interface: HasValidators
The validators used to validate this object.

Specified by:
setValidators in interface HasValidators<T>
Parameters:
validators - the new validators

validate

public boolean validate()
Description copied from interface: HasValidators
Validate the field's value using the supplied validators.

Specified by:
validate in interface HasValidators<T>
Returns:
true, if valid

validate

public boolean validate(boolean show)
Description copied from interface: HasValidators
Validate the field's value using the supplied validators.

Specified by:
validate in interface HasValidators<T>
Parameters:
show - the error to the user.
Returns:
true, if valid

reset

public void reset()
Description copied from interface: HasValidators
Reset the form element to blank and clear error messages.

Specified by:
reset in interface HasValidators<T>


Copyright © 2015. All rights reserved.