Home » Eclipse-SWT-3.5.1 » org.eclipse.swt.widgets » [javadoc | source]
org.eclipse.swt.widgets
abstract public class: Item [javadoc | source]
java.lang.Object
   org.eclipse.swt.widgets.Widget
      org.eclipse.swt.widgets.Item

Direct Known Subclasses:
    CoolItem, TableColumn, TrayItem, TableTreeItem, TreeColumn, TableItem, CTabItem, TreeItem, TabItem, ToolItem, MenuItem, ExpandItem

This class is the abstract superclass of all non-windowed user interface objects that occur within specific controls. For example, a tree will contain tree items.
Styles:
(none)
Events:
(none)
Field Summary
 String text     
 Image image     
Fields inherited from org.eclipse.swt.widgets.Widget:
style,  state,  display,  eventTable,  data,  DISPOSED,  CANVAS,  KEYED_DATA,  DISABLED,  HIDDEN,  LAYOUT_NEEDED,  LAYOUT_CHANGED,  LAYOUT_CHILD,  THEME_BACKGROUND,  DRAW_BACKGROUND,  PARENT_BACKGROUND,  RELEASED,  DISPOSE_SENT,  TRACK_MOUSE,  FOREIGN_HANDLE,  DRAG_DETECT,  MOVE_OCCURRED,  MOVE_DEFERRED,  RESIZE_OCCURRED,  RESIZE_DEFERRED,  IGNORE_WM_CHANGEUISTATE,  DEFAULT_WIDTH,  DEFAULT_HEIGHT,  MAJOR,  MINOR
Constructor:
 public Item(Widget parent,
    int style) 
    Constructs a new instance of this class given its parent 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.

    Parameters:
    parent - a widget which will be the parent of the new instance (cannot be null)
    style - the style of item to construct
    Throws:
    IllegalArgumentException -
    • ERROR_NULL_ARGUMENT - if the parent is null

    SWTException -
    • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent

    Also see:
    SWT
    getStyle
    exception: IllegalArgumentException -
    • ERROR_NULL_ARGUMENT - if the parent is null

    exception: SWTException -
    • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent

 public Item(Widget parent,
    int style,
    int index) 
    Constructs a new instance of this class given its parent and a style value describing its behavior and appearance, and the index at which to place it in 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.

    Parameters:
    parent - a widget which will be the parent of the new instance (cannot be null)
    style - the style of item to construct
    index - the index at which to store the receiver in its parent
    Throws:
    IllegalArgumentException -
    • ERROR_NULL_ARGUMENT - if the parent is null

    SWTException -
    • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent

    Also see:
    SWT
    getStyle
    exception: IllegalArgumentException -
    • ERROR_NULL_ARGUMENT - if the parent is null

    exception: SWTException -
    • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent

Method from org.eclipse.swt.widgets.Item Summary:
checkSubclass,   getImage,   getNameText,   getText,   releaseWidget,   setImage,   setText
Methods from org.eclipse.swt.widgets.Widget:
DeferWindowPos,   SetWindowPos,   _addListener,   addDisposeListener,   addListener,   callWindowProc,   checkBits,   checkOpened,   checkOrientation,   checkParent,   checkSubclass,   checkWidget,   destroyWidget,   dispose,   dragDetect,   error,   filters,   findItem,   fixMnemonic,   fixMnemonic,   getData,   getData,   getDisplay,   getListeners,   getMenu,   getName,   getNameText,   getStyle,   hooks,   isDisposed,   isListening,   isValidSubclass,   isValidThread,   mapEvent,   new_GC,   notifyListeners,   postEvent,   postEvent,   release,   releaseChildren,   releaseHandle,   releaseParent,   releaseWidget,   removeDisposeListener,   removeListener,   removeListener,   sendDragEvent,   sendDragEvent,   sendEvent,   sendEvent,   sendEvent,   sendEvent,   sendFocusEvent,   sendKeyEvent,   sendKeyEvent,   sendMouseEvent,   sendMouseEvent,   setData,   setData,   setInputState,   setKeyState,   setTabGroupFocus,   setTabItemFocus,   showMenu,   toString,   wmCaptureChanged,   wmChar,   wmContextMenu,   wmIMEChar,   wmKeyDown,   wmKeyUp,   wmKillFocus,   wmLButtonDblClk,   wmLButtonDown,   wmLButtonUp,   wmMButtonDblClk,   wmMButtonDown,   wmMButtonUp,   wmMouseHover,   wmMouseLeave,   wmMouseMove,   wmMouseWheel,   wmNCPaint,   wmPaint,   wmPrint,   wmRButtonDblClk,   wmRButtonDown,   wmRButtonUp,   wmSetFocus,   wmSysChar,   wmSysKeyDown,   wmSysKeyUp,   wmXButtonDblClk,   wmXButtonDown,   wmXButtonUp
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.eclipse.swt.widgets.Item Detail:
 protected  void checkSubclass() 
 public Image getImage() 
    Returns the receiver's image if it has one, or null if it does not.
 String getNameText() 
 public String getText() 
    Returns the receiver's text, which will be an empty string if it has never been set.
  void releaseWidget() 
 public  void setImage(Image image) 
    Sets the receiver's image to the argument, which may be null indicating that no image should be displayed.
 public  void setText(String string) 
    Sets the receiver's text.