public class HtmlWidget extends HTMLPanel implements HasStyle, IsResponsive
When extendind this class, the child class should always expose a constructor
with a String argument. This argument is HTML text. The constructor is used
by the HTMLPanelParser
to parse UiBinder XML.
public ChildPanel extends HtmlWidget { public ChildPanel(String html) { super("label", html); //"label" is the HTML tag used for the child class. } }
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
IndexedPanel.ForIsWidget
HasWidgets.ForIsWidget
DEBUG_ID_PREFIX
Modifier | Constructor and Description |
---|---|
protected |
HtmlWidget(String tag)
Creates an empty widget.
|
|
HtmlWidget(String tag,
String html)
Creates an HTML panel whose root element has the given tag, and with the
specified HTML contents.
|
Modifier and Type | Method and Description |
---|---|
void |
addStyle(Style style)
Adds the provided style to the widget.
|
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.
|
add, add, add, addAndReplaceElement, addAndReplaceElement, addAndReplaceElement, addAndReplaceElement, addAndReplaceElement, createUniqueId, getElementById, wrap
add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, insert, iterator, remove, remove
add, adopt, adopt, clear, disown, doAttachChildren, doDetachChildren, orphan, remove
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents
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
protected HtmlWidget(String tag)
tag
- the tag of the root elementpublic HtmlWidget(String tag, String html)
tag
- the tag of the root elementhtml
- the panel's HTMLpublic void setShowOn(Device device)
The widget is not shown on any other device.
Only works if responsive design is turned on!
setShowOn
in interface IsResponsive
Configurator.hasResponsiveDesign()
,
IsResponsive.setHideOn(Device)
public void setHideOn(Device device)
The widget is not hidden on any other device.
Only works if responsive design is turned on!
setHideOn
in interface IsResponsive
Configurator.hasResponsiveDesign()
,
IsResponsive.setShowOn(Device)
public void removeStyle(Style style)
removeStyle
in interface HasStyle
style
- the style to be removed from the Widget.Copyright © 2012-2014 gwtbootstrap. All Rights Reserved.