com.github.gwtbootstrap.client.ui
Class UneditableInput

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.LabelBase<String>
              extended by com.google.gwt.user.client.ui.Label
                  extended by com.google.gwt.user.client.ui.InlineLabel
                      extended by com.github.gwtbootstrap.client.ui.base.InlineLabel
                          extended by com.github.gwtbootstrap.client.ui.UneditableInput
All Implemented Interfaces:
HasAlternateSize, HasId, HasSize, HasStyle, IsResponsive, IsSearchQuery, IsEditor<LeafValueEditor<String>>, HasAllDragAndDropHandlers, HasAllGestureHandlers, HasAllMouseHandlers, HasAllTouchHandlers, HasClickHandlers, HasDoubleClickHandlers, HasDragEndHandlers, HasDragEnterHandlers, HasDragHandlers, HasDragLeaveHandlers, HasDragOverHandlers, HasDragStartHandlers, HasDropHandlers, HasGestureChangeHandlers, HasGestureEndHandlers, HasGestureStartHandlers, HasMouseDownHandlers, HasMouseMoveHandlers, HasMouseOutHandlers, HasMouseOverHandlers, HasMouseUpHandlers, HasMouseWheelHandlers, HasTouchCancelHandlers, HasTouchEndHandlers, HasTouchMoveHandlers, HasTouchStartHandlers, HasAttachHandlers, HasHandlers, HasDirection, HasDirectionEstimator, EventListener, HasAutoHorizontalAlignment, HasDirectionalText, HasHorizontalAlignment, HasText, HasVisibility, HasWordWrap, IsWidget, SourcesClickEvents, SourcesMouseEvents

public class UneditableInput
extends InlineLabel
implements HasAlternateSize, IsSearchQuery, HasSize, HasId, HasStyle, IsResponsive

Uneditable style text input.

Since:
2.0.4.0
Author:
ohashi keisuke

Nested Class Summary
 
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
 
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasHorizontalAlignment
HasHorizontalAlignment.AutoHorizontalAlignmentConstant, HasHorizontalAlignment.HorizontalAlignmentConstant
 
Field Summary
 
Fields inherited from class com.google.gwt.user.client.ui.Label
DEFAULT_DIRECTION_ESTIMATOR
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Fields inherited from interface com.google.gwt.user.client.ui.HasAutoHorizontalAlignment
ALIGN_CONTENT_END, ALIGN_CONTENT_START
 
Fields inherited from interface com.google.gwt.user.client.ui.HasHorizontalAlignment
ALIGN_CENTER, ALIGN_DEFAULT, ALIGN_JUSTIFY, ALIGN_LEFT, ALIGN_LOCALE_END, ALIGN_LOCALE_START, ALIGN_RIGHT
 
Constructor Summary
  UneditableInput()
          Creates an empty widget.
protected UneditableInput(Element element)
          This constructor may be used by subclasses to explicitly use an existing element.
  UneditableInput(String text)
          Creates a widget with the specified text.
  UneditableInput(String text, DirectionEstimator directionEstimator)
          Creates a label with the specified text and a default direction estimator.
  UneditableInput(String text, HasDirection.Direction dir)
          Creates a label with the specified text and direction.
 
Method Summary
 void addStyle(Style style)
          Adds the provided style to the widget.
 String getId()
          Get ID
 boolean isSearchQuery()
          is the element search-query style?
 void removeStyle(Style style)
          Removes the provided style from the widget.
 void setAlternateSize(AlternateSize size)
          
 void setHideOn(Device device)
          Sets the kind of device, this widget is hidden on.
 void setId(String id)
          Set ID
 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.InlineLabel
wrap
 
Methods inherited from class com.google.gwt.user.client.ui.Label
addClickHandler, addClickListener, addDoubleClickHandler, addDragEndHandler, addDragEnterHandler, addDragHandler, addDragLeaveHandler, addDragOverHandler, addDragStartHandler, addDropHandler, addGestureChangeHandler, addGestureEndHandler, addGestureStartHandler, addMouseDownHandler, addMouseListener, addMouseMoveHandler, addMouseOutHandler, addMouseOverHandler, addMouseUpHandler, addMouseWheelHandler, addMouseWheelListener, addTouchCancelHandler, addTouchEndHandler, addTouchMoveHandler, addTouchStartHandler, asEditor, getDirection, getText, getTextDirection, removeClickListener, removeMouseListener, removeMouseWheelListener, setDirection, setText, setText
 
Methods inherited from class com.google.gwt.user.client.ui.LabelBase
getAutoHorizontalAlignment, getDirectionEstimator, getHorizontalAlignment, getWordWrap, setAutoHorizontalAlignment, setDirectionEstimator, setDirectionEstimator, setHorizontalAlignment, setWordWrap, updateHorizontalAlignment
 
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, onAttach, onBrowserEvent, onDetach, onLoad, 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.shared.HasHandlers
fireEvent
 

Constructor Detail

UneditableInput

public UneditableInput()
Creates an empty widget.


UneditableInput

protected UneditableInput(Element element)
This constructor may be used by subclasses to explicitly use an existing element. This element must be either a <div> <span> element.

Parameters:
element - the element to be used

UneditableInput

public UneditableInput(String text,
                       HasDirection.Direction dir)
Creates a label with the specified text and direction.

Parameters:
text - the new label's text
dir - the text's direction. Note: Direction.DEFAULT means direction should be inherited from the widget's parent element.

UneditableInput

public UneditableInput(String text,
                       DirectionEstimator directionEstimator)
Creates a label with the specified text and a default direction estimator.

Parameters:
text - the new label's text
directionEstimator - A DirectionEstimator object used for automatic direction adjustment. For convenience, Label.DEFAULT_DIRECTION_ESTIMATOR can be used.

UneditableInput

public UneditableInput(String text)
Creates a widget with the specified text.

Parameters:
text - the new widget's text
Method Detail

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

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.