|
Eclipse Rich Ajax Platform Release 1.3 |
||||||||||
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.swt.widgets.ToolTip
Instances of this class represent popup windows that are used to inform or warn the user.
Note: Only one of the styles ICON_ERROR, ICON_INFORMATION, and ICON_WARNING may be specified.
IMPORTANT: This class is intended to be subclassed only within the SWT implementation.
Constructor Summary | |
ToolTip(Shell parent,
int style)
Constructs a new instance of this class given its parent and a style value describing its behavior and appearance. |
Method Summary | |
void |
addSelectionListener(SelectionListener listener)
Adds the listener to the collection of listeners who will be notified when the receiver is selected by the user, by sending it one of the messages defined in the SelectionListener
interface. |
Object |
getAdapter(Class adapter)
Implementation of the Adaptable interface. |
boolean |
getAutoHide()
Returns true if the receiver is automatically
hidden by the platform, and false otherwise. |
String |
getMessage()
Returns the receiver's message, which will be an empty string if it has never been set. |
Shell |
getParent()
Returns the receiver's parent, which must be a Shell . |
String |
getText()
Returns the receiver's text, which will be an empty string if it has never been set. |
boolean |
isVisible()
Returns true if the receiver is visible, and
false otherwise. |
void |
removeSelectionListener(SelectionListener listener)
Removes the listener from the collection of listeners who will be notified when the receiver is selected by the user. |
void |
setAutoHide(boolean autoHide)
Makes the receiver hide automatically when true ,
and remain visible when false . |
void |
setLocation(int x,
int y)
Sets the location of the receiver, which must be a tooltip, to the point specified by the arguments which are relative to the display. |
void |
setLocation(Point location)
Sets the location of the receiver, which must be a tooltip, to the point specified by the argument which is relative to the display. |
void |
setMessage(String message)
Sets the receiver's message. |
void |
setText(String text)
Sets the receiver's text. |
void |
setVisible(boolean visible)
Marks the receiver as visible if the argument is true ,
and marks it invisible otherwise. |
Methods inherited from class org.eclipse.swt.widgets.Widget |
addDisposeListener, addListener, checkSubclass, checkWidget, dispose, getData, getData, getDisplay, getListeners, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, reskin, setData, setData, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ToolTip(Shell parent, int style)
The style value is either one of the style constants defined in
class SWT
which is applicable to instances of this
class, or must be built by bitwise OR'ing together
(that is, using the int
"|" operator) two or more
of those SWT
style constants. The class description
lists the style constants that are applicable to the class.
Style bits are also inherited from superclasses.
parent
- a composite control which will be the parent of the new instance (cannot be null)style
- the style of control to construct
IllegalArgumentException
- SWTException
- SWT.BALLOON
,
SWT.ICON_ERROR
,
SWT.ICON_INFORMATION
,
SWT.ICON_WARNING
,
Widget.checkSubclass()
,
Widget.getStyle()
Method Detail |
public Object getAdapter(Class adapter)
Widget
Adaptable
interface.
IMPORTANT: This method is not part of the RWT public API. It is marked public only so that it can be shared within the packages provided by RWT. It should never be accessed from application code.
getAdapter
in interface Adaptable
getAdapter
in class Widget
public Shell getParent()
Shell
.
SWTException
- public boolean getAutoHide()
true
if the receiver is automatically
hidden by the platform, and false
otherwise.
SWTException
- public void setAutoHide(boolean autoHide)
true
,
and remain visible when false
.
autoHide
- the auto hide state
SWTException
- #getVisible
,
setVisible(boolean)
public boolean isVisible()
true
if the receiver is visible, and
false
otherwise.
If one of the receiver's ancestors is not visible or some other condition makes the receiver not visible, this method may still indicate that it is considered visible even though it may not actually be showing.
SWTException
- public void setVisible(boolean visible)
true
,
and marks it invisible otherwise.
If one of the receiver's ancestors is not visible or some other condition makes the receiver not visible, marking it visible may not actually cause it to be displayed.
visible
- the new visibility state
SWTException
- public String getText()
SWTException
- public void setText(String text)
IllegalArgumentException
- SWTException
- public String getMessage()
SWTException
- public void setMessage(String message)
IllegalArgumentException
- SWTException
- public void setLocation(int x, int y)
Note that this is different from most widgets where the location of the widget is relative to the parent.
x
- the new x coordinate for the receivery
- the new y coordinate for the receiver
SWTException
- public void setLocation(Point location)
Note that this is different from most widgets where the location of the widget is relative to the parent.
Note that the platform window manager ultimately has control over the location of tooltips.
location
- the new location for the receiver
IllegalArgumentException
- SWTException
- public void addSelectionListener(SelectionListener listener)
SelectionListener
interface.
widgetSelected
is called when the receiver is selected.
widgetDefaultSelected
is not called.
listener
- the listener which should be notified when the receiver is selected by the user
IllegalArgumentException
- SWTException
- SelectionListener
,
removeSelectionListener(org.eclipse.swt.events.SelectionListener)
,
SelectionEvent
public void removeSelectionListener(SelectionListener listener)
listener
- the listener which should no longer be notified
IllegalArgumentException
- SWTException
- SelectionListener
,
addSelectionListener(org.eclipse.swt.events.SelectionListener)
|
Eclipse Rich Ajax Platform Release 1.3 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright (c) Innoopract Informationssysteme GmbH and others 2002, 2011. All rights reserved.