com.github.gwtbootstrap.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 com.github.gwtbootstrap.client.ui.base.ValueBoxBase<T>
Type Parameters:
T - the value type
All Implemented Interfaces:
HasAlternateSize, HasId, HasPlaceholder, HasSize, HasStyle, IsResponsive, IsSearchQuery, 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
Direct Known Subclasses:
TextBoxBase, ValueBox

public class ValueBoxBase<T>
extends ValueBoxBase<T>
implements HasPlaceholder, HasAlternateSize, IsSearchQuery, HasSize, HasId, IsResponsive, HasStyle

A ValueBoxBase extending for Bootstarp style.

 It is GWT's ValueBoxBase extending for Bootstrap style.
 

Since:
2.0.4.0
Author:
ohashi keisuke
See Also:
ValueBoxBase

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.i18n.client.HasDirection
HasDirection.Direction
 
Field Summary
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
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 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 setEnabled(boolean enabled)
          
 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.
 
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, 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, 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
 
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, unsinkEvents
 
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

setPlaceholder

public void setPlaceholder(String placeholder)
Set a placeholder attribute (HTML5).

Specified by:
setPlaceholder in interface HasPlaceholder
Parameters:
placeholder - the String to show. Use a empty string or null to remove the attribute.

getPlaceholder

public String getPlaceholder()
Get a placeholder attribute (HTML5).

Specified by:
getPlaceholder in interface HasPlaceholder
Returns:
placeholder attribute.

setSearchQuery

public void setSearchQuery(boolean searchQuery)
Set search-query style to the element.

Specified by:
setSearchQuery in interface IsSearchQuery
Parameters:
searchQuery - true:add search-query css-class/false:remove search-query css-class

isSearchQuery

public boolean isSearchQuery()
is the element search-query style?

Specified by:
isSearchQuery in interface IsSearchQuery
Returns:
true:has search-query css-class/false:has no search-query cass-class.

setAlternateSize

public void setAlternateSize(AlternateSize size)

Specified by:
setAlternateSize in interface HasAlternateSize

setSize

public void setSize(int size)
Sets the widget's size.

Specified by:
setSize in interface HasSize
Parameters:
size - the size of the widget in the Bootstrap grid system

getId

public String getId()
Get ID

Specified by:
getId in interface HasId
Returns:
ID

setId

public void setId(String id)
Set ID

Specified by:
setId in interface HasId
Parameters:
id - set id

setEnabled

public void setEnabled(boolean enabled)

Specified by:
setEnabled in interface HasEnabled
Overrides:
setEnabled in class FocusWidget

setShowOn

public void setShowOn(Device device)
Sets the kind of device, this widget is shown on.

The widget is not shown on any other device.

Only works if responsive design is turned on!

Specified by:
setShowOn in interface IsResponsive
See Also:
Configurator.hasResponsiveDesign(), IsResponsive.setHideOn(Device)

setHideOn

public void setHideOn(Device device)
Sets the kind of device, this widget is hidden on.

The widget is not hidden on any other device.

Only works if responsive design is turned on!

Specified by:
setHideOn in interface IsResponsive
See Also:
Configurator.hasResponsiveDesign(), IsResponsive.setShowOn(Device)

setStyle

public void setStyle(Style style)
Replaces the widet's style with the provided one.

Specified by:
setStyle in interface HasStyle
Parameters:
style - the style to be applied to the Widget.

addStyle

public void addStyle(Style style)
Adds the provided style to the widget.

Specified by:
addStyle in interface HasStyle
Parameters:
style - the style to be added to the Widget.

removeStyle

public void removeStyle(Style style)
Removes the provided style from the widget.

Specified by:
removeStyle in interface HasStyle
Parameters:
style - the style to be removed from the Widget.


Copyright © 2012 gwtbootstrap. All Rights Reserved.