Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.eclipse.swt.widgets
Class TrayItem  view TrayItem download TrayItem.java

java.lang.Object
  extended byorg.eclipse.swt.widgets.Widget
      extended byorg.eclipse.swt.widgets.Item
          extended byorg.eclipse.swt.widgets.TrayItem

public class TrayItem
extends Item

Instances of this class represent icons that can be placed on the system tray or task bar status area.

Styles:
(none)
Events:
DefaultSelection, MenuDetect, Selection

IMPORTANT: This class is not intended to be subclassed.

Since:
3.0

Field Summary
(package private)  long imageHandle
           
(package private)  Tray parent
           
(package private)  long tooltipsHandle
           
(package private)  java.lang.String toolTipText
           
 
Fields inherited from class org.eclipse.swt.widgets.Item
image, text
 
Fields inherited from class org.eclipse.swt.widgets.Widget
ACTIVATE, BUTTON_PRESS_EVENT, BUTTON_RELEASE_EVENT, CANVAS, CHANGED, CLICKED, COMMIT, CONFIGURE_EVENT, data, DEFAULT_HEIGHT, DEFAULT_WIDTH, DELETE_EVENT, DELETE_RANGE, DELETE_TEXT, DISABLED, display, DISPOSED, ENTER_NOTIFY_EVENT, EVENT, EVENT_AFTER, eventTable, EXPOSE_EVENT, FOCUS, FOCUS_IN_EVENT, FOCUS_OUT_EVENT, handle, HANDLE, HIDE, INSERT_TEXT, KEY_PRESS_EVENT, KEY_RELEASE_EVENT, KEYED_DATA, LEAVE_NOTIFY_EVENT, MAP_EVENT, MENU, MNEMONIC_ACTIVATE, MOTION_NOTIFY_EVENT, OBSCURED, POPUP_MENU, PREEDIT_CHANGED, REALIZE, ROW_ACTIVATED, SCROLL_CHILD, SELECT, SHOW, SHOW_HELP, SIZE_ALLOCATE, state, style, STYLE_SET, SWITCH_PAGE, TEST_COLLAPSE_ROW, TEST_EXPAND_ROW, TOGGLED, UNMAP_EVENT, UNREALIZE, VALUE_CHANGED, VISIBILITY_NOTIFY_EVENT, WINDOW_STATE_EVENT
 
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(org.eclipse.swt.events.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.
(package private)  void createHandle(int index)
           
(package private)  void createWidget(int index)
           
 java.lang.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.
(package private)  long gtk_button_press_event(long widget, long eventPtr)
           
(package private)  void hookEvents()
           
(package private)  void releaseChild()
           
(package private)  void releaseWidget()
           
 void removeSelectionListener(org.eclipse.swt.events.SelectionListener listener)
          Removes the listener from the collection of listeners who will be notified when the receiver is selected.
 void setImage(org.eclipse.swt.graphics.Image image)
          Sets the receiver's image.
 void setToolTipText(java.lang.String string)
          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, getNameText, getText, setText
 
Methods inherited from class org.eclipse.swt.widgets.Widget
addDisposeListener, addListener, checkBits, checkOrientation, checkParent, checkWidget, deregister, destroyWidget, dispose, error, filterProc, filters, fixMnemonic, fontHeight, getData, getData, getDisplay, getName, getStyle, gtk_activate, gtk_button_release_event, gtk_changed, gtk_clicked, gtk_commit, gtk_configure_event, gtk_delete_event, gtk_delete_range, gtk_delete_text, gtk_enter_notify_event, gtk_event_after, gtk_event, gtk_expose_event, gtk_focus_in_event, gtk_focus_out_event, gtk_focus, gtk_hide, gtk_insert_text, gtk_key_press_event, gtk_key_release_event, gtk_leave_notify_event, gtk_map_event, gtk_mnemonic_activate, gtk_motion_notify_event, gtk_popup_menu, gtk_preedit_changed, gtk_realize, gtk_row_activated, gtk_scroll_child, gtk_select, gtk_show_help, gtk_show, gtk_size_allocate, gtk_style_set, gtk_switch_page, gtk_test_collapse_row, gtk_test_expand_row, gtk_timer, gtk_toggled, gtk_unmap_event, gtk_unrealize, gtk_value_changed, gtk_visibility_notify_event, gtk_window_state_event, hooks, hoverProc, isDisposed, isListening, isValidSubclass, isValidThread, isValidWidget, menuPositionProc, mnemonicHit, mnemonicMatch, notifyListeners, pixbufCellDataProc, postEvent, postEvent, register, releaseHandle, releaseResources, removeDisposeListener, removeListener, removeListener, sendEvent, sendEvent, sendEvent, sendEvent, setData, setData, setInputState, setKeyState, setOrientation, shellMapProc, textCellDataProc, timerProc, topHandle, toString, translateTraversal, treeSelectionProc, windowProc, windowProc, windowProc, windowProc
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

parent

Tray parent

toolTipText

java.lang.String toolTipText

imageHandle

long imageHandle

tooltipsHandle

long tooltipsHandle
Constructor Detail

TrayItem

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

Method Detail

addSelectionListener

public void addSelectionListener(org.eclipse.swt.events.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.

widgetSelected is called when the receiver is selected widgetDefaultSelected is called when the receiver is double-clicked


createWidget

void createWidget(int index)
Overrides:
createWidget in class Widget

createHandle

void createHandle(int index)
Overrides:
createHandle in class Widget

getToolTipText

public java.lang.String getToolTipText()
Returns the receiver's tool tip text, or null if it has not been set.


gtk_button_press_event

long gtk_button_press_event(long widget,
                            long eventPtr)
Overrides:
gtk_button_press_event in class Widget

hookEvents

void hookEvents()
Overrides:
hookEvents in class Widget

getVisible

public boolean getVisible()
Returns true if the receiver is visible and false otherwise.


releaseChild

void releaseChild()
Overrides:
releaseChild in class Widget

releaseWidget

void releaseWidget()
Overrides:
releaseWidget in class Item

removeSelectionListener

public void removeSelectionListener(org.eclipse.swt.events.SelectionListener listener)
Removes the listener from the collection of listeners who will be notified when the receiver is selected.


setImage

public void setImage(org.eclipse.swt.graphics.Image image)
Sets the receiver's image.

Overrides:
setImage in class Item

setToolTipText

public void setToolTipText(java.lang.String string)
Sets the receiver's tool tip text to the argument, which may be null indicating that no tool tip text should be shown.


setVisible

public void setVisible(boolean visible)
Makes the receiver visible if the argument is true, and makes it invisible otherwise.