public class Tip extends Component
ToolTip
that provides the basic layout and
positioning that all tip-based classes require. This class can be used
directly for simple, statically-positioned tips that are displayed
programmatically, or it can be extended to provide custom tip
implementations.Modifier and Type | Class and Description |
---|---|
static interface |
Tip.TipAppearance |
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
DEBUG_ID_PREFIX
Constructor and Description |
---|
Tip()
Creates a new tip instance.
|
Tip(Tip.TipAppearance appearance) |
Modifier and Type | Method and Description |
---|---|
Tip.TipAppearance |
getAppearance()
Returns the tip's appearance.
|
int |
getMaxWidth()
Returns the maximum width.
|
int |
getMinWidth()
Returns the minimum width.
|
void |
hide()
Hide this widget.
|
boolean |
isClosable()
Returns true if the tip is closable.
|
void |
setClosable(boolean closable)
True to render a close tool button into the tooltip header (defaults to
false).
|
void |
setMaxWidth(int maxWidth)
Sets the maximum width of the tip in pixels (defaults to 300).
|
void |
setMinWidth(int minWidth)
Sets the minimum width of the tip in pixels (defaults to 40).
|
void |
showAt(int x,
int y)
Shows this tip at the specified position.
|
void |
showAt(Point point)
Shows this tip at the specified position.
|
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, 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 Tip()
public Tip(Tip.TipAppearance appearance)
public Tip.TipAppearance getAppearance()
public int getMaxWidth()
public int getMinWidth()
public void hide()
Component
public boolean isClosable()
public void setClosable(boolean closable)
closable
- the closable statepublic void setMaxWidth(int maxWidth)
maxWidth
- the max widthpublic void setMinWidth(int minWidth)
minWidth
- the minimum widthpublic void showAt(int x, int y)
x
- the x coordinatey
- the y coordinatepublic void showAt(Point point)
point
- the positionCopyright © 2015. All rights reserved.