T
- the value typepublic class ValueBoxBase<T> extends ValueBoxBase<T> implements HasPlaceholder, HasAlternateSize, IsSearchQuery, HasSize, HasId, IsResponsive, HasStyle, HasEditorErrors<T>
It is GWT's ValueBoxBase
extending for Bootstrap style.
ValueBoxBase
ValueBoxBase.TextAlignment
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
Editor.Ignore, Editor.Path
HasDirection.Direction
DEBUG_ID_PREFIX
Modifier | Constructor and Description |
---|---|
protected |
ValueBoxBase(Element elem,
Renderer<T> renderer,
Parser<T> parser)
Creates a value box that wraps the given browser element handle.
|
Modifier and Type | Method and Description |
---|---|
void |
addStyle(Style style)
Adds the provided style to the widget.
|
String |
getId()
Get ID
|
String |
getPlaceholder()
Get a placeholder attribute (HTML5).
|
boolean |
isSearchQuery()
is the element search-query style?
|
void |
removeStyle(Style style)
Removes the provided style from the widget.
|
void |
setAlternateSize(AlternateSize size) |
void |
setBlockLevel(boolean blockLevel)
Make any or
|
void |
setControlGroup(Widget controlGroup)
The widget that will be decorated on
EditorError s will be added de ControlGroupType.ERROR style. |
void |
setEnabled(boolean enabled) |
void |
setErrorLabel(Widget errorLabel)
Widget where
EditorError s messages will be placed. |
protected void |
setErrorLabelText(String errorMessage)
Sets the content of the
EditorError s messages inside de errorLabel . |
void |
setHideOn(Device device)
Sets the kind of device, this widget is hidden on.
|
void |
setId(String id)
Set ID
|
void |
setPlaceholder(String placeholder)
Set a placeholder attribute (HTML5).
|
void |
setSearchQuery(boolean searchQuery)
Set search-query style to the element.
|
void |
setShowOn(Device device)
Sets the kind of device, this widget is shown on.
|
void |
setSize(int size)
Sets the widget's size.
|
void |
setStyle(Style style)
Replaces the widet's style with the provided one.
|
void |
setValue(T value) |
void |
setValue(T value,
boolean fireEvents) |
void |
showErrors(List<EditorError> errors) |
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
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, setFocus, setTabIndex
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onDetach, onUnload, removeFromParent, setLayoutData, sinkEvents
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, unsinkEvents
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addKeyUpHandler
fireEvent
public void showErrors(List<EditorError> errors)
showErrors
in interface HasEditorErrors<T>
HasEditorErrors.showErrors(java.util.List)
public void setValue(T value)
setValue
in interface TakesValue<T>
setValue
in interface HasValue<T>
setValue
in class ValueBoxBase<T>
public void setControlGroup(Widget controlGroup)
EditorError
s will be added de ControlGroupType.ERROR
style.
It can be a ControlGroup or any widget.controlGroup
- public void setErrorLabel(Widget errorLabel)
EditorError
s messages will be placed.
It can be a HelpBlock or any other widget.errorLabel
- protected void setErrorLabelText(String errorMessage)
EditorError
s messages inside de errorLabel
.
This implementation uses Element.setInnerHTML(String)
to set the content.errorMessage
- public void setPlaceholder(String placeholder)
setPlaceholder
in interface HasPlaceholder
placeholder
- the String to show. Use a empty string or null to remove the attribute.public String getPlaceholder()
getPlaceholder
in interface HasPlaceholder
public void setSearchQuery(boolean searchQuery)
setSearchQuery
in interface IsSearchQuery
searchQuery
- true:add search-query css-class/false:remove search-query css-classpublic boolean isSearchQuery()
isSearchQuery
in interface IsSearchQuery
public void setAlternateSize(AlternateSize size)
setAlternateSize
in interface HasAlternateSize
public void setSize(int size)
setSize
in interface HasSize
size
- the size of the widget in the Bootstrap grid systempublic void setEnabled(boolean enabled)
setEnabled
in interface HasEnabled
setEnabled
in class FocusWidget
public void setShowOn(Device device)
The widget is not shown on any other device.
Only works if responsive design is turned on!
setShowOn
in interface IsResponsive
Configurator.hasResponsiveDesign()
,
IsResponsive.setHideOn(Device)
public void setHideOn(Device device)
The widget is not hidden on any other device.
Only works if responsive design is turned on!
setHideOn
in interface IsResponsive
Configurator.hasResponsiveDesign()
,
IsResponsive.setShowOn(Device)
public void removeStyle(Style style)
removeStyle
in interface HasStyle
style
- the style to be removed from the Widget.public void setBlockLevel(boolean blockLevel)
blockLevel
- Copyright © 2012-2014 gwtbootstrap. All Rights Reserved.