com.sencha.gxt.widget.core.client.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.sencha.gxt.widget.core.client.Component
              extended by com.sencha.gxt.widget.core.client.tips.Tip
All Implemented Interfaces:
HasAttachHandlers, HasResizeHandlers, HasHandlers, EventListener, HasEnabled, HasVisibility, IsWidget, BeforeHideEvent.HasBeforeHideHandlers, BeforeShowContextMenuEvent.HasBeforeShowContextMenuHandler, BeforeShowEvent.HasBeforeShowHandlers, BlurEvent.HasBlurHandlers, DisableEvent.HasDisableHandlers, EnableEvent.HasEnableHandlers, FocusEvent.HasFocusHandlers, HideEvent.HasHideHandlers, MoveEvent.HasMoveHandlers, ShowContextMenuEvent.HasShowContextMenuHandler, ShowEvent.HasShowHandlers, HasFocusSupport, HasItemId
Direct Known Subclasses:
ToolTip

public class Tip
extends Component

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
static interface Tip.TipAppearance
           
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
UIObject.DebugIdImpl, 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.
Tip(Tip.TipAppearance appearance)
           
 
Method Summary
 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.
 
Methods inherited from class com.sencha.gxt.widget.core.client.Component
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, getStateId, 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, setSize, setStateful, setStateId, setTabIndex, setToolTip, setToolTipConfig, setVisible, setWidth, setWidth, show, sync, syncSize, unmask
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, getLayoutData, getParent, isAttached, removeFromParent, setLayoutData, sinkEvents
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleName, getStylePrimaryName, getTitle, isVisible, removeStyleDependentName, removeStyleName, setStyleDependentName, setStyleName, setStyleName, setStylePrimaryName, setTitle, setVisible, sinkBitlessEvent, toString, 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.


Tip

public Tip(Tip.TipAppearance appearance)
Method Detail

getAppearance

public Tip.TipAppearance getAppearance()
Returns the tip's appearance.

Returns:
the appearance

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 widget.

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 the 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 minimum 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


Copyright © 2012. All Rights Reserved.