|
Spiffy UI Framework | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectPopupPanel
org.spiffyui.client.widgets.Tooltip
public class Tooltip
Tooltip is a PopupPanel that auto-hides when you click outside of it, click the X, or when you let the auto-close time elapse (default auto close time is 1.5 seconds).
| Constructor Summary | |
|---|---|
Tooltip()
Create a tooltip |
|
| Method Summary | |
|---|---|
void |
cancelAutoCloseTimer()
Cancels the auto close timer |
int |
getAutoCloseTime()
The time in milliseconds that the tooltip will automatically close if the mouse moves out of it. |
FocusPanel |
getBodyPanel()
Get the FocusPanel that holds the body contents |
void |
onMouseOut(MouseOutEvent event)
When the mouse is moved out of the focus panel, start the auto close timer. |
void |
onMouseOver(MouseOverEvent event)
If the mouse is over the focus panel, cancel the auto close timer. |
protected void |
onPreviewNativeEvent(Event.NativePreviewEvent event)
Overriding to close on pressing Esc key or clicking the close anchor. |
void |
setAutoCloseTime(int autoCloseTime)
The time in milliseconds that the tooltip will automatically close if the mouse moves out of it. |
void |
setBody(Widget w)
Sets the body of the tooltip with any Widget. |
void |
show()
We are overriding the show method so that we can cancel the auto close timer. |
void |
startAutoCloseTimer()
Call this if you want to start the auto close timer based on some other event. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Tooltip()
| Method Detail |
|---|
public FocusPanel getBodyPanel()
public int getAutoCloseTime()
public void setAutoCloseTime(int autoCloseTime)
autoCloseTime - The autoCloseTime to set.public void setBody(Widget w)
w - any Widgetprotected void onPreviewNativeEvent(Event.NativePreviewEvent event)
event - - the Event.NativePreviewEventpublic void show()
public void cancelAutoCloseTimer()
public void startAutoCloseTimer()
public void onMouseOut(MouseOutEvent event)
event - - the MouseOutEventpublic void onMouseOver(MouseOverEvent event)
event - - the MouseOverEvent
|
Spiffy UI Framework | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||