Home » Eclipse-SWT-3.5.1 » org.eclipse.swt.widgets » [javadoc | source]
org.eclipse.swt.widgets
public class: TableItem [javadoc | source]
java.lang.Object
   org.eclipse.swt.widgets.Widget
      org.eclipse.swt.widgets.Item
         org.eclipse.swt.widgets.TableItem
Instances of this class represent a selectable user interface object that represents an item in a table.
Styles:
(none)
Events:
(none)

IMPORTANT: This class is not intended to be subclassed.

Field Summary
 Table parent     
 String[] strings     
 Image[] images     
 Font font     
 Font[] cellFont     
 boolean checked     
 boolean grayed     
 boolean cached     
 int imageIndent     
 int background     
 int foreground     
 int[] cellBackground     
 int[] cellForeground     
Fields inherited from org.eclipse.swt.widgets.Item:
text,  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 TableItem(Table parent,
    int style) 
    Constructs a new instance of this class given its parent (which must be a Table) 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 composite control which will be the parent of the new instance (cannot be null)
    style - the style of control 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
    • ERROR_INVALID_SUBCLASS - if this class is not an allowed subclass

    Also see:
    SWT
    Widget#checkSubclass
    Widget#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
    • ERROR_INVALID_SUBCLASS - if this class is not an allowed subclass

 public TableItem(Table parent,
    int style,
    int index) 
    Constructs a new instance of this class given its parent (which must be a Table), 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 composite control which will be the parent of the new instance (cannot be null)
    style - the style of control to construct
    index - the zero-relative index to store the receiver in its parent
    Throws:
    IllegalArgumentException -
    • ERROR_NULL_ARGUMENT - if the parent is null
    • ERROR_INVALID_RANGE - if the index is not between 0 and the number of elements in the parent (inclusive)

    SWTException -
    • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent
    • ERROR_INVALID_SUBCLASS - if this class is not an allowed subclass

    Also see:
    SWT
    Widget#checkSubclass
    Widget#getStyle
    exception: IllegalArgumentException -
    • ERROR_NULL_ARGUMENT - if the parent is null
    • ERROR_INVALID_RANGE - if the index is not between 0 and the number of elements in the parent (inclusive)

    exception: SWTException -
    • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent
    • ERROR_INVALID_SUBCLASS - if this class is not an allowed subclass

 TableItem(Table parent,
    int style,
    int index,
    boolean create) 
Method from org.eclipse.swt.widgets.TableItem Summary:
checkNull,   checkSubclass,   clear,   destroyWidget,   fontHandle,   getBackground,   getBackground,   getBounds,   getBounds,   getBounds,   getBounds,   getChecked,   getFont,   getFont,   getForeground,   getForeground,   getGrayed,   getImage,   getImage,   getImageBounds,   getImageIndent,   getNameText,   getParent,   getText,   getText,   getTextBounds,   redraw,   redraw,   releaseHandle,   releaseWidget,   setBackground,   setBackground,   setChecked,   setChecked,   setFont,   setFont,   setForeground,   setForeground,   setGrayed,   setImage,   setImage,   setImage,   setImageIndent,   setText,   setText,   setText
Methods from org.eclipse.swt.widgets.Item:
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.TableItem Detail:
 static Table checkNull(Table control) 
 protected  void checkSubclass() 
  void clear() 
  void destroyWidget() 
 int fontHandle(int index) 
 public Color getBackground() 
    Returns the receiver's background color.
 public Color getBackground(int index) 
    Returns the background color at the given column index in the receiver.
 public Rectangle getBounds() 
    Returns a rectangle describing the receiver's size and location relative to its parent.
 public Rectangle getBounds(int index) 
    Returns a rectangle describing the receiver's size and location relative to its parent at a column in the table.
 RECT getBounds(int row,
    int column,
    boolean getText,
    boolean getImage,
    boolean fullText) 
 RECT getBounds(int row,
    int column,
    boolean getText,
    boolean getImage,
    boolean fullText,
    boolean fullImage,
    int hDC) 
 public boolean getChecked() 
    Returns true if the receiver is checked, and false otherwise. When the parent does not have the CHECK style, return false.
 public Font getFont() 
    Returns the font that the receiver will use to paint textual information for this item.
 public Font getFont(int index) 
    Returns the font that the receiver will use to paint textual information for the specified cell in this item.
 public Color getForeground() 
    Returns the foreground color that the receiver will use to draw.
 public Color getForeground(int index) 
    Returns the foreground color at the given column index in the receiver.
 public boolean getGrayed() 
    Returns true if the receiver is grayed, and false otherwise. When the parent does not have the CHECK style, return false.
 public Image getImage() 
 public Image getImage(int index) 
    Returns the image stored at the given column index in the receiver, or null if the image has not been set or if the column does not exist.
 public Rectangle getImageBounds(int index) 
    Returns a rectangle describing the size and location relative to its parent of an image at a column in the table. An empty rectangle is returned if index exceeds the index of the table's last column.
 public int getImageIndent() 
    Gets the image indent.
 String getNameText() 
 public Table getParent() 
    Returns the receiver's parent, which must be a Table.
 public String getText() 
 public String getText(int index) 
    Returns the text stored at the given column index in the receiver, or empty string if the text has not been set.
 public Rectangle getTextBounds(int index) 
    Returns a rectangle describing the size and location relative to its parent of the text at a column in the table. An empty rectangle is returned if index exceeds the index of the table's last column.
  void redraw() 
  void redraw(int column,
    boolean drawText,
    boolean drawImage) 
  void releaseHandle() 
  void releaseWidget() 
 public  void setBackground(Color color) 
    Sets the receiver's background color to the color specified by the argument, or to the default system color for the item if the argument is null.
 public  void setBackground(int index,
    Color color) 
    Sets the background color at the given column index in the receiver to the color specified by the argument, or to the default system color for the item if the argument is null.
 public  void setChecked(boolean checked) 
    Sets the checked state of the checkbox for this item. This state change only applies if the Table was created with the SWT.CHECK style.
  void setChecked(boolean checked,
    boolean notify) 
 public  void setFont(Font font) 
    Sets the font that the receiver will use to paint textual information for this item to the font specified by the argument, or to the default font for that kind of control if the argument is null.
 public  void setFont(int index,
    Font font) 
    Sets the font that the receiver will use to paint textual information for the specified cell in this item to the font specified by the argument, or to the default font for that kind of control if the argument is null.
 public  void setForeground(Color color) 
    Sets the receiver's foreground color to the color specified by the argument, or to the default system color for the item if the argument is null.
 public  void setForeground(int index,
    Color color) 
    Sets the foreground color at the given column index in the receiver to the color specified by the argument, or to the default system color for the item if the argument is null.
 public  void setGrayed(boolean grayed) 
    Sets the grayed state of the checkbox for this item. This state change only applies if the Table was created with the SWT.CHECK style.
 public  void setImage(Image[] images) 
    Sets the image for multiple columns in the table.
 public  void setImage(Image image) 
 public  void setImage(int index,
    Image image) 
    Sets the receiver's image at a column.
 public  void setImageIndent(int indent) 
Deprecated! this - functionality is not supported on most platforms

    Sets the indent of the first column's image, expressed in terms of the image's width.
 public  void setText(String[] strings) 
    Sets the text for multiple columns in the table.
 public  void setText(String string) 
 public  void setText(int index,
    String string) 
    Sets the receiver's text at a column