com.github.gwtbootstrap.client.ui.base
Class AbstractTypography

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.github.gwtbootstrap.client.ui.base.AbstractTypography
All Implemented Interfaces:
HasStyle, IsResponsive, HasAttachHandlers, HasHandlers, EventListener, HasText, HasVisibility, IsWidget
Direct Known Subclasses:
Abbreviation, Blockquote, Caret, Code, Emphasis, Strong

public abstract class AbstractTypography
extends Widget
implements HasText, HasStyle, IsResponsive

Helper class for widgets that have text.

Since:
2.0.4.0
Author:
Carlos Alexandro Becker

Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
 
Field Summary
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
AbstractTypography()
          Creates a new widget without setting a DOM element.
AbstractTypography(String tag)
          Creates a new widget based on the given HTML tag.
 
Method Summary
 void addStyle(Style style)
          Adds the provided style to the widget.
 String getText()
          
 void removeStyle(Style style)
          Removes the provided style from the widget.
 void setHideOn(Device device)
          Sets the kind of device, this widget is hidden on.
 void setShowOn(Device device)
          Sets the kind of device, this widget is shown on.
 void setStyle(Style style)
          Replaces the widet's style with the provided one.
 void setText(String text)
          
 
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
 

Constructor Detail

AbstractTypography

public AbstractTypography()
Creates a new widget without setting a DOM element.


AbstractTypography

public AbstractTypography(String tag)
Creates a new widget based on the given HTML tag.

Parameters:
tag - the HTML tag to be used
Method Detail

setText

public void setText(String text)

Specified by:
setText in interface HasText

getText

public String getText()

Specified by:
getText in interface HasText

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.

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)


Copyright © 2012 gwtbootstrap. All Rights Reserved.