|
Eclipse Platform Release 3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.swt.widgets.Widget
org.eclipse.swt.widgets.Item
org.eclipse.swt.widgets.TrayItem
Instances of this class represent icons that can be placed on the system tray or task bar status area.
IMPORTANT: This class is not intended to be subclassed.
Constructor Summary | |
TrayItem(Tray parent,
int style)
Constructs a new instance of this class given its parent (which must be a Tray ) 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 sending it one of the messages defined in the SelectionListener
interface.
|
String |
getToolTipText()
Returns the receiver's tool tip text, or null if it has not been set. |
boolean |
getVisible()
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. |
void |
setImage(Image image)
Sets the receiver's image. |
void |
setToolTipText(String value)
Sets the receiver's tool tip text to the argument, which may be null indicating that no tool tip text should be shown. |
void |
setVisible(boolean visible)
Makes the receiver visible if the argument is true ,
and makes it invisible otherwise. |
Methods inherited from class org.eclipse.swt.widgets.Item |
checkSubclass, getImage, getText, setText |
Methods inherited from class org.eclipse.swt.widgets.Widget |
addDisposeListener, addListener, 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 TrayItem(Tray parent, int style)
Tray
) and a style value
describing its behavior and appearance. The item is added
to the end of the items maintained by its parent.
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
,
Widget.checkSubclass()
,
Widget.getStyle()
Method Detail |
public void addSelectionListener(SelectionListener listener)
SelectionListener
interface.
widgetSelected
is called when the receiver is selected
widgetDefaultSelected
is called when the receiver is double-clicked
listener
- the listener which should be notified
IllegalArgumentException
- SWTException
- SelectionListener
,
removeSelectionListener(org.eclipse.swt.events.SelectionListener)
,
SelectionEvent
public String getToolTipText()
SWTException
- public boolean getVisible()
true
if the receiver is visible and
false
otherwise.
SWTException
- public void removeSelectionListener(SelectionListener listener)
listener
- the listener which should no longer be notified
IllegalArgumentException
- SWTException
- SelectionListener
,
addSelectionListener(org.eclipse.swt.events.SelectionListener)
public void setImage(Image image)
setImage
in class Item
image
- the new image
IllegalArgumentException
- SWTException
- public void setToolTipText(String value)
value
- the new tool tip text (or null)
SWTException
- public void setVisible(boolean visible)
true
,
and makes it invisible otherwise.
visible
- the new visibility state
SWTException
-
|
Eclipse Platform Release 3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2004. All rights reserved.