com.github.gwtbootstrap.client.ui
Class Code

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
              extended by com.github.gwtbootstrap.client.ui.Code
All Implemented Interfaces:
HasStyle, IsResponsive, HasProgrammingLanguage, HasAttachHandlers, HasHandlers, EventListener, HasHTML, HasText, HasVisibility, IsWidget

public class Code
extends AbstractTypography
implements HasProgrammingLanguage, HasHTML

Simple inline code with syntax highlighting.

UiBinder Usage:

 <b:Code><a href="http://gwtbootstrap.github.com">Link</a></b:Code>
 

Since:
2.0.4.0
Author:
Dominik Mayer, Carlos Alexandro Becker
See Also:
Bootstrap documentation, CodeBlock

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
Code()
          Creates an empty widget.
 
Method Summary
 String getHTML()
          
protected  void onLoad()
          
 void setHTML(String html)
          Sets the widget's text.
 void setLang(String programmingLanguage)
          Sets the programming language.
 
Methods inherited from class com.github.gwtbootstrap.client.ui.base.AbstractTypography
addStyle, getText, removeStyle, setHideOn, setShowOn, setStyle, setText
 
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, 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.user.client.ui.HasText
getText, setText
 

Constructor Detail

Code

public Code()
Creates an empty widget.

Method Detail

onLoad

protected void onLoad()

Overrides:
onLoad in class Widget

setLang

public void setLang(String programmingLanguage)
Sets the programming language.

Specified by:
setLang in interface HasProgrammingLanguage
Parameters:
programmingLanguage - the programming language

getHTML

public String getHTML()

Specified by:
getHTML in interface HasHTML

setHTML

public void setHTML(String html)
Sets the widget's text.

Any HTML content is escaped and displayed as text.

Specified by:
setHTML in interface HasHTML
Parameters:
html - the text to be set


Copyright © 2012 gwtbootstrap. All Rights Reserved.