org.gwtbootstrap3.client.ui
Class Heading

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.Panel
              extended by com.google.gwt.user.client.ui.ComplexPanel
                  extended by org.gwtbootstrap3.client.ui.base.ComplexWidget
                      extended by org.gwtbootstrap3.client.ui.Heading
All Implemented Interfaces:
HasAttachHandlers, HasHandlers, EventListener, HasText, HasVisibility, HasWidgets, HasWidgets.ForIsWidget, IndexedPanel, IndexedPanel.ForIsWidget, IsWidget, Iterable<Widget>, HasAlignment, HasEmphasis, HasId, HasInlineStyle, HasPull, HasResponsiveness, HasSubText

public class Heading
extends ComplexWidget
implements HasWidgets, HasText, HasEmphasis, HasAlignment, HasSubText

Represents a Heading tag, has an optional subtext.

Bootstrap's Documentation

Typography

Usage in UiBinder

 <b:Heading size="H1">
     <b:Text text="Heading"/>
     <b:Small text=" subtext"/>
 </b:Heading>

 <b:Heading size="H1" text="Heading Text" subText="Subtext Text"/>
 <b:Heading size="H1" subText="Subtext Text" text="Heading Text"/>

 <b:Heading size="H1">
     <b:Icon type="..."/>
     <b:Text text="Heading with icon"/>
 </b:Heading>

 <b:Heading size="H1">
     <b:Icon type="..."/>
     <b:Text text="Heading with icon"/>
     <b:Small text=" subtext"/>
 </b:Heading>
 
 

Usage in Java

 Heading h1 = new Heading(1, "Heading Text");
 h1.setSubText("Subtext Text"); // optional
 

Author:
Sven Jacobs, Joshua Godi

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.user.client.ui.HasWidgets
HasWidgets.ForIsWidget
 
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.IndexedPanel
IndexedPanel.ForIsWidget
 
Field Summary
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
Heading(HeadingSize size)
          Creates a Heading with the passed in size.
Heading(HeadingSize size, String text)
          Creates a Heading with the passed in size and text.
Heading(HeadingSize size, String text, String subText)
          Creates a Heading with the passed in size and text.
 
Method Summary
 Alignment getAlignment()
          Get the object's alignment.
 Emphasis getEmphasis()
          Get the object's emphasis.
 String getSubText()
          Returns the subtext of the heading.
 String getText()
          
protected  void onAttach()
          
 void setAlignment(Alignment alignment)
          Sets this object's alignment.
 void setEmphasis(Emphasis emphasis)
          Sets the object's emphasis.
 void setSubText(String subText)
          Sets the subtext for the heading (wrapped in a Small tag).
 void setText(String text)
          
 
Methods inherited from class org.gwtbootstrap3.client.ui.base.ComplexWidget
add, getId, getPull, insert, setColor, setHiddenOn, setId, setMarginBottom, setMarginLeft, setMarginRight, setMarginTop, setPaddingBottom, setPaddingLeft, setPaddingRight, setPaddingTop, setPull, setVisibleOn
 
Methods inherited from class com.google.gwt.user.client.ui.ComplexPanel
add, add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, insert, iterator, remove, remove
 
Methods inherited from class com.google.gwt.user.client.ui.Panel
add, adopt, clear, doAttachChildren, doDetachChildren, orphan, remove
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onBrowserEvent, onDetach, onLoad, 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.user.client.ui.HasWidgets
add, clear, iterator, remove
 

Constructor Detail

Heading

@UiConstructor
public Heading(HeadingSize size)
Creates a Heading with the passed in size.

Parameters:
size - size of the heading

Heading

public Heading(HeadingSize size,
               String text)
Creates a Heading with the passed in size and text.

Parameters:
size - size of the heading
text - text for the heading

Heading

public Heading(HeadingSize size,
               String text,
               String subText)
Creates a Heading with the passed in size and text.

Parameters:
size - size of the heading
text - text for the heading
subText - subtext for the heading
Method Detail

setSubText

public void setSubText(String subText)
Sets the subtext for the heading (wrapped in a Small tag).

When using the setter for this, the subtext will be added after the text

Specified by:
setSubText in interface HasSubText
Parameters:
subText - the subtext of the heading

getSubText

public String getSubText()
Returns the subtext of the heading.

Specified by:
getSubText in interface HasSubText
Returns:
subtext of the heading

getText

public String getText()

Specified by:
getText in interface HasText

setText

public void setText(String text)

Specified by:
setText in interface HasText

setEmphasis

public void setEmphasis(Emphasis emphasis)
Sets the object's emphasis.

Specified by:
setEmphasis in interface HasEmphasis
Parameters:
emphasis - the object's new emphasis

getEmphasis

public Emphasis getEmphasis()
Get the object's emphasis.

Specified by:
getEmphasis in interface HasEmphasis
Returns:
the object's emphasis

setAlignment

public void setAlignment(Alignment alignment)
Sets this object's alignment.

Specified by:
setAlignment in interface HasAlignment
Parameters:
alignment - the object's new alignment

getAlignment

public Alignment getAlignment()
Get the object's alignment.

Specified by:
getAlignment in interface HasAlignment
Returns:
the object's alignment

onAttach

protected void onAttach()

Overrides:
onAttach in class Widget


Copyright © 2015. All rights reserved.