|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.swt.widgets.Widget org.eclipse.ercp.swt.mobile.TaskTip
This class provides feedback to the user about the state of a long-running task.
A TaskTip may contain text and an optional progress bar or another object to illustrate current task state. Like a MessageBox, the look and feel of TaskTip is platform-dependent, which means that there is no API level access to the UI components inside a TaskTip. Unlike a MessageBox, the TaskTip is a non-focusable window and will not change the current window's activation or focus.
When constructed without a style constant, a TaskTip displays plain text to indicate task progress.
A TaskTip becomes visible by calling setVisible(true)
and
remains visible until the application calls
setVisible(false)
. When a new TaskTip is created before
hiding or disposing of a prior TaskTip, the newest becomes the top-most one
and obscures the prior ones, if any.
A TaskTip can not be positioned programmatically or by the user. The position is implementation-dependent.
Note: The methods setMaximum
, setMinimum
,
and setSelection
, are silently ignored if the style is not
SWT.SMOOTH.
SWT.SMOOTH
,
IMPORTANT: This class is not intended to be subclassed.
Constructor Summary | |
TaskTip(Shell shell)
Constructs a TaskTip with plain text style. |
|
TaskTip(Shell shell,
int style)
Constructs a TaskTip with a given style value. |
Method Summary | |
void |
setMaximum(int value)
Sets the maximum value that the TaskTip will allow. |
void |
setMinimum(int value)
Sets the minimum value that the TaskTip will allow. |
void |
setSelection(int value)
Sets the position of the TaskTip's indicator to the provided value. |
void |
setText(java.lang.String string)
Sets the label text. |
void |
setVisible(boolean visible)
Makes the TaskTip visible and brings it to the front of the display. |
Methods inherited from class org.eclipse.swt.widgets.Widget |
addDisposeListener, addListener, checkSubclass, checkWidget, dispose, getData, getData, getDisplay, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, setData, setData, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public TaskTip(Shell shell)
shell
- The Shell the TaskTip is associated with
java.lang.IllegalArgumentException
- SWTException
- public TaskTip(Shell shell, int style)
shell
- The Shell the TaskTip is associated withstyle
- style of TaskTip: NONE, SMOOTH or INDETERMINATE.
java.lang.IllegalArgumentException
- SWTException
- SWT.SMOOTH
,
SWT.INDETERMINATE
Method Detail |
public void setMaximum(int value)
This method works only for SWT.SMOOTH
style. This method
is silently ignored for other styles.
value
- the new maximum, which must be positive and greater than or
equal to the current minimum
java.lang.IllegalArgumentException
- SWTException
- public void setMinimum(int value)
This method works only for SWT.SMOOTH
style. This method
is silently ignored for other styles.
value
- the new minimum, which must be positive and less than or
equal to the current maximum
java.lang.IllegalArgumentException
- SWTException
- public void setSelection(int value)
This method works only for SWT.SMOOTH
style. This method
is silently ignored for other styles.
value
- the new selection (must be zero or greater).
java.lang.IllegalArgumentException
- SWTException
- public void setText(java.lang.String string)
This method sets a TaskTip's label . The label can be null. The label's position and the visibility of label text is platform-dependent.
string
- the label text
SWTException
- public void setVisible(boolean visible)
This method will return immediately after showing or hiding the TaskTip.
Despite setting a TaskTip visible, it may not actually be displayed if the device's main screen is not active.
visible
- the value to show or hide the TaskTip. The method will not
return an error if the value matches the current visibility
state.
SWTException
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |