public class Header extends Component implements HasIcon
Modifier and Type | Class and Description |
---|---|
static interface |
Header.HeaderAppearance
The appearance of a header.
|
Modifier and Type | Field and Description |
---|---|
protected ImageResource |
icon |
adjustSize, allowTextSelection, cacheSizes, disableContextMenu, disabled, disabledStyle, ensureVisibilityOnSizing, height, hidden, lastSize, layer, left, mask, maskMessage, monitorWindowResize, pageX, pageY, resizeHandler, shim, tabIndex, toolTip, toolTipConfig, top, width, windowResizeDelay, windowResizeTask
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.
|
protected void |
doAttachChildren() |
protected void |
doDetachChildren() |
Header.HeaderAppearance |
getAppearance()
Returns the appearance used to render the header.
|
SafeHtml |
getHeading()
Returns the heading html.
|
String |
getHTML()
Returns the header's html.
|
ImageResource |
getIcon()
Returns the icon image
|
String |
getIconAltText()
Returns the icon's alt text.
|
SafeHtml |
getSafeHtml()
Returns the header's html.
|
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 |
setHeading(SafeHtml html)
Sets the heading html.
|
void |
setHTML(SafeHtml html)
Sets the header's 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, addGestureRecognizer, addHideHandler, addMoveHandler, addResizeHandler, addShowContextMenuHandler, addShowHandler, addStyleDependentName, addStyleOnOver, adjustPosition, adjustSize, applyState, assertAfterRender, assertPreRender, blur, clearSizeCache, disable, disableContextMenu, disableEvents, enable, enableEvents, fireCancellableEvent, fireEvent, focus, getData, getElement, getFocusEl, getFocusSupport, getGestureRecognizer, getGestureRecognizerCount, getHideMode, getId, getItemId, getOffsetHeight, getOffsetWidth, getPositionEl, getShadow, getShadowPosition, getStateId, getTabIndex, getToolTip, hide, hideShadow, hideToolTip, isAllowTextSelection, isAutoHeight, isAutoWidth, isDeferHeight, isEnabled, isMonitorWindowResize, isRendered, isStateful, isVisible, isVisible, mask, mask, notifyHide, notifyShow, onAfterFirstAttach, onAttach, onBlur, onBrowserEvent, onDetach, onDisable, onEnable, onFocus, onHide, onHideContextMenu, onLoad, onPosition, onResize, onRightClick, onShow, onShowContextMenu, onTouch, onUnload, onWindowResize, removeStyleDependentName, removeStyleOnOver, removeToolTip, setAllowTextSelection, setBorders, setBounds, setBounds, setContextMenu, setData, setDeferHeight, setEnabled, setHeight, setHeight, setHideMode, setId, setItemId, setMonitorWindowResize, setPagePosition, setPixelSize, setPosition, setShadow, setShadowPosition, setSize, setStateful, setStateId, setStyleDependentName, setTabIndex, setToolTip, setToolTipConfig, setVisible, setWidth, setWidth, show, sync, syncSize, unmask
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 Widget getTool(int index)
index
- the indexpublic int getToolCount()
public List<Widget> getTools()
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 SafeHtml getHeading()
public void setHeading(SafeHtml html)
html
- the heading htmlpublic SafeHtml getSafeHtml()
public String getHTML()
public void setHTML(SafeHtml html)
html
- the htmlpublic String getText()
getHTML()
public void setText(String text)
text
- the textpublic void setIcon(ImageResource icon)
HasIcon
public void setIconAltText(String altIconText)
altIconText
- the icon alt textprotected void doAttachChildren()
protected void doDetachChildren()
Copyright © 2018. All rights reserved.