public class Header extends Component implements HasIcon, HasText, HasHTML, HasSafeHtml
Modifier and Type | Class and Description |
---|---|
static interface |
Header.HeaderAppearance
The appearance of a header.
|
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
DEBUG_ID_PREFIX
Constructor and Description |
---|
Header()
Creates a header with the default appearance which includes a header bar,
text and an icon.
|
Header(Header.HeaderAppearance appearance)
Creates a header with the specified appearance.
|
Modifier and Type | Method and Description |
---|---|
void |
addTool(Widget tool)
Adds a tool.
|
Header.HeaderAppearance |
getAppearance()
Returns the appearance used to render the header.
|
String |
getHTML() |
ImageResource |
getIcon()
Returns the icon image
|
String |
getIconAltText()
Returns the icon's alt text.
|
String |
getText()
Returns the header's text.
|
Widget |
getTool(int index)
Returns the tool at the given index.
|
int |
getToolCount()
Returns the number of tool items.
|
List<Widget> |
getTools()
Returns the tool's.
|
int |
indexOf(Widget tool)
Returns the index of the given tool.
|
void |
insertTool(Widget tool,
int index)
Inserts a tool.
|
void |
removeTool(Widget tool)
Removes a tool.
|
void |
setHTML(SafeHtml html) |
void |
setHTML(String html) |
void |
setIcon(ImageResource icon)
Sets the icon.
|
void |
setIconAltText(String altIconText)
Sets the header's icon alt text (defaults to null).
|
void |
setText(String text)
Sets the header's text.
|
addBeforeHideHandler, addBeforeShowContextMenuHandler, addBeforeShowHandler, addBlurHandler, addDisableHandler, addEnableHandler, addFocusHandler, addHideHandler, addMoveHandler, addResizeHandler, addShowContextMenuHandler, addShowHandler, addStyleOnOver, clearSizeCache, disable, disableEvents, enable, enableEvents, fireEvent, focus, getData, getElement, getFocusSupport, getHideMode, getId, getItemId, getOffsetHeight, getOffsetWidth, getShadow, getShadowPosition, getStateId, getTabIndex, getToolTip, hide, hideToolTip, isAllowTextSelection, isAutoHeight, isAutoWidth, isDeferHeight, isEnabled, isRendered, isStateful, isVisible, isVisible, mask, mask, onBrowserEvent, removeToolTip, setAllowTextSelection, setBorders, setBounds, setBounds, setContextMenu, setData, setDeferHeight, setEnabled, setHeight, setHeight, setHideMode, setId, setItemId, setPagePosition, setPixelSize, setPosition, setShadow, setShadowPosition, setSize, setStateful, setStateId, setTabIndex, setToolTip, setToolTip, setToolTipConfig, setVisible, setWidth, setWidth, show, sync, syncSize, unmask
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, getLayoutData, getParent, isAttached, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleName, getStylePrimaryName, getTitle, isVisible, removeStyleDependentName, removeStyleName, setStyleDependentName, setStyleName, setStyleName, setStylePrimaryName, setTitle, setVisible, sinkBitlessEvent, toString
public Header()
public Header(Header.HeaderAppearance appearance)
appearance
- the appearance of the headerpublic void addTool(Widget tool)
tool
- the tool to be insertedpublic Header.HeaderAppearance getAppearance()
public ImageResource getIcon()
public String getIconAltText()
public String getText()
public Widget getTool(int index)
index
- the indexpublic int getToolCount()
public int indexOf(Widget tool)
tool
- the toolpublic void insertTool(Widget tool, int index)
tool
- the tool to insertindex
- the insert locationpublic void removeTool(Widget tool)
tool
- the tool to removepublic void setHTML(SafeHtml html)
setHTML
in interface HasSafeHtml
public void setIcon(ImageResource icon)
HasIcon
public void setIconAltText(String altIconText)
altIconText
- the icon alt textCopyright © 2015. All rights reserved.