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 |
Modifier and Type | Field and Description |
---|---|
protected ToolButton |
close |
protected boolean |
constrainPosition |
protected int |
quickShowInterval |
protected boolean |
showing |
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 |
---|
Tip()
Creates a new tip instance.
|
Tip(Tip.TipAppearance appearance) |
Modifier and Type | Method and Description |
---|---|
protected void |
doAttachChildren() |
protected void |
doAutoWidth() |
protected void |
doDetachChildren() |
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.
|
protected void |
onDisable() |
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.
|
protected void |
updateContent() |
addBeforeHideHandler, addBeforeShowContextMenuHandler, addBeforeShowHandler, addBlurHandler, addDisableHandler, addEnableHandler, addFocusHandler, 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, getHideMode, getId, getItemId, getOffsetHeight, getOffsetWidth, getPositionEl, getShadow, getShadowPosition, getStateId, getTabIndex, getToolTip, hideShadow, hideToolTip, isAllowTextSelection, isAutoHeight, isAutoWidth, isDeferHeight, isEnabled, isMonitorWindowResize, isRendered, isStateful, isVisible, isVisible, mask, mask, notifyHide, notifyShow, onAfterFirstAttach, onAttach, onBlur, onBrowserEvent, onDetach, onEnable, onFocus, onHide, onHideContextMenu, onLoad, onPosition, onResize, onRightClick, onShow, onShowContextMenu, 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
protected int quickShowInterval
protected boolean constrainPosition
protected ToolButton close
protected boolean showing
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 positionprotected void doAttachChildren()
protected void doAutoWidth()
protected void doDetachChildren()
protected void updateContent()
Copyright © 2018. All rights reserved.