com.extjs.gxt.ui.client.widget.tips
Class Tip

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.extjs.gxt.ui.client.widget.Component
              extended by com.extjs.gxt.ui.client.widget.BoxComponent
                  extended by com.extjs.gxt.ui.client.widget.Container<T>
                      extended by com.extjs.gxt.ui.client.widget.ScrollContainer<Component>
                          extended by com.extjs.gxt.ui.client.widget.LayoutContainer
                              extended by com.extjs.gxt.ui.client.widget.ContentPanel
                                  extended by com.extjs.gxt.ui.client.widget.tips.Tip
All Implemented Interfaces:
Observable, IconSupport, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener
Direct Known Subclasses:
ToolTip

public class Tip
extends ContentPanel

This is the base class for 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.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
 
Field Summary
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
Tip()
          Creates a new tip instance.
 
Method Summary
 int getMaxWidth()
          Returns the maximum width.
 int getMinWidth()
          Returns the minimum width.
 void hide()
          Hide this component.
 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 he 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.
 
Methods inherited from class com.extjs.gxt.ui.client.widget.ContentPanel
addButton, collapse, expand, getAnimCollapse, getBody, getBodyBorder, getBodyStyle, getBottomComponent, getButtonAlign, getButtonBar, getCollapseBtn, getCollapsible, getElement, getFrame, getFrameHeight, getFrameWidth, getHeader, getHeading, getIcon, getInnerHeight, getInnerWidth, getLayoutTarget, getMinButtonWidth, getTitleCollapse, getTitleText, getTopComponent, isCollapsed, isExpanded, isFooter, isHeaderVisible, isHideCollapseTool, onComponentEvent, setAnimCollapse, setBodyBorder, setBodyStyle, setBodyStyleName, setBottomComponent, setButtonAlign, setCollapsible, setExpanded, setFooter, setFrame, setHeaderVisible, setHeading, setHideCollapseTool, setIcon, setIconStyle, setInsetBorder, setMinButtonWidth, setTitleCollapse, setTopComponent, setUrl
 
Methods inherited from class com.extjs.gxt.ui.client.widget.LayoutContainer
add, add, addText, findComponent, getLayout, getWindowResizeDelay, insert, insert, isLayoutOnChange, isMonitorWindowResize, layout, layout, remove, removeAll, setLayout, setLayoutData, setLayoutOnChange, setMonitorWindowResize, setWindowResizeDelay
 
Methods inherited from class com.extjs.gxt.ui.client.widget.ScrollContainer
addScrollListener, getHScrollPosition, getScrollMode, getVScrollPosition, removeScrollListener, scrollIntoView, setHScrollPosition, setScrollMode, setVScrollPosition
 
Methods inherited from class com.extjs.gxt.ui.client.widget.Container
disable, enable, findItem, getItem, getItemByItemId, getItemCount, getItems, getWidget, indexOf, iterator, scrollIntoView
 
Methods inherited from class com.extjs.gxt.ui.client.widget.BoxComponent
getBounds, getHeight, getHeight, getPosition, getShadow, getShadowOffset, getShadowPosition, getSize, getWidth, getWidth, isAutoHeight, isAutoWidth, isDeferHeight, isShim, setAutoHeight, setAutoWidth, setBounds, setBounds, setDeferHeight, setHeight, setHeight, setPagePosition, setPagePosition, setPixelSize, setPosition, setShadow, setShadowOffset, setShadowPosition, setShim, setSize, setSize, setWidth, setWidth, sync, syncSize
 
Methods inherited from class com.extjs.gxt.ui.client.widget.Component
addListener, addPlugin, addStyleName, addWidgetListener, clearState, disableEvents, disableTextSelection, el, enableEvents, fireEvent, fireEvent, fireEvent, fly, focus, getBaseStyle, getBorders, getContextMenu, getData, getElement, getHideMode, getId, getItemId, getListeners, getModel, getState, getStateId, getToolTip, hasListeners, hasListeners, hideToolTip, isDisabledEvents, isEnabled, isRendered, isStateful, isVisible, mask, mask, mask, onBrowserEvent, recalculate, removeAllListeners, removeFromParent, removeListener, removeStyleName, removeSwallow, removeToolTip, removeWidgetListener, render, render, repaint, saveState, setBorders, setContextMenu, setData, setElement, setEnabled, setHideMode, setId, setIntStyleAttribute, setItemId, setStateful, setStateId, setStyleAttribute, setStyleName, setTitle, setToolTip, setToolTip, setVisible, setZIndex, show, sinkEvents, swallowEvent, swallowEvent, toString, unmask
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
fireEvent, getParent, isAttached
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleName, getStylePrimaryName, getTitle, isVisible, removeStyleDependentName, setStylePrimaryName, setVisible, unsinkEvents
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Tip

public Tip()
Creates a new tip instance.

Method Detail

getMaxWidth

public int getMaxWidth()
Returns the maximum width.

Returns:
the max width

getMinWidth

public int getMinWidth()
Returns the minimum width.

Returns:
the minimum width

hide

public void hide()
Description copied from class: Component
Hide this component. Fires the BeforeHide event before the component is hidden, the fires the Hide event after the component is hidden.

Overrides:
hide in class Component

isClosable

public boolean isClosable()
Returns true if the tip is closable.

Returns:
the closable state

setClosable

public void setClosable(boolean closable)
True to render a close tool button into the tooltip header (defaults to false).

Parameters:
closable - the closable state

setMaxWidth

public void setMaxWidth(int maxWidth)
Sets he maximum width of the tip in pixels (defaults to 300). The maximum supported value is 500.

Parameters:
maxWidth - the max width

setMinWidth

public void setMinWidth(int minWidth)
Sets the minimum width of the tip in pixels (defaults to 40).

Parameters:
minWidth - the min width

showAt

public void showAt(int x,
                   int y)
Shows this tip at the specified position.

Parameters:
x - the x coordinate
y - the y coordinate

showAt

public void showAt(Point point)
Shows this tip at the specified position.

Parameters:
point - the position