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

Quick Search    Search Deep

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

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

public class TableItem
extends Item

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
(package private)  boolean cached
           
(package private)  Table parent
           
 
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
  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.
  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.
(package private) TableItem(Table parent, int style, int index, boolean create)
           
 
Method Summary
(package private) static Table checkNull(Table control)
           
(package private)  void clear()
           
 org.eclipse.swt.graphics.Color getBackground()
          Returns the receiver's background color.
 org.eclipse.swt.graphics.Color getBackground(int index)
          Returns the background color at the given column index in the receiver.
 org.eclipse.swt.graphics.Rectangle getBounds(int index)
          Returns a rectangle describing the receiver's size and location relative to its parent at a column in the table.
 boolean getChecked()
          Returns true if the receiver is checked, and false otherwise.
 org.eclipse.swt.graphics.Font getFont()
          Returns the font that the receiver will use to paint textual information for this item.
 org.eclipse.swt.graphics.Font getFont(int index)
          Returns the font that the receiver will use to paint textual information for the specified cell in this item.
 org.eclipse.swt.graphics.Color getForeground()
          Returns the foreground color that the receiver will use to draw.
 org.eclipse.swt.graphics.Color getForeground(int index)
          Returns the foreground color at the given column index in the receiver.
 boolean getGrayed()
          Returns true if the receiver is grayed, and false otherwise.
 org.eclipse.swt.graphics.Image getImage()
          Returns the receiver's image if it has one, or null if it does not.
 org.eclipse.swt.graphics.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.
 org.eclipse.swt.graphics.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.
 int getImageIndent()
          Gets the image indent.
 Table getParent()
          Returns the receiver's parent, which must be a Table.
 java.lang.String getText()
          Returns the receiver's text, which will be an empty string if it has never been set.
 java.lang.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.
(package private)  void releaseChild()
           
(package private)  void releaseWidget()
           
 void setBackground(org.eclipse.swt.graphics.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.
 void setBackground(int index, org.eclipse.swt.graphics.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.
 void setChecked(boolean checked)
          Sets the checked state of the checkbox for this item.
 void setFont(org.eclipse.swt.graphics.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.
 void setFont(int index, org.eclipse.swt.graphics.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.
 void setForeground(org.eclipse.swt.graphics.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.
 void setForeground(int index, org.eclipse.swt.graphics.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.
 void setGrayed(boolean grayed)
          Sets the grayed state of the checkbox for this item.
 void setImage(org.eclipse.swt.graphics.Image image)
          Sets the receiver's image to the argument, which may be null indicating that no image should be displayed.
 void setImage(org.eclipse.swt.graphics.Image[] images)
          Sets the image for multiple columns in the Table.
 void setImage(int index, org.eclipse.swt.graphics.Image image)
          Sets the receiver's image at a column.
 void setImageIndent(int indent)
          Sets the indent of the first column's image, expressed in terms of the image's width.
 void setText(int index, java.lang.String string)
          Sets the receiver's text at a column
 void setText(java.lang.String string)
          Sets the receiver's text.
 void setText(java.lang.String[] strings)
          Sets the text for multiple columns in the table.
 
Methods inherited from class org.eclipse.swt.widgets.Item
checkSubclass, getNameText
 
Methods inherited from class org.eclipse.swt.widgets.Widget
addDisposeListener, addListener, checkBits, checkOrientation, checkParent, checkWidget, createHandle, createWidget, deregister, destroyWidget, dispose, error, filterProc, filters, fixMnemonic, fontHeight, getData, getData, getDisplay, getName, getStyle, gtk_activate, gtk_button_press_event, 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, hookEvents, 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

Table parent

cached

boolean cached
Constructor Detail

TableItem

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.


TableItem

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.


TableItem

TableItem(Table parent,
          int style,
          int index,
          boolean create)
Method Detail

checkNull

static Table checkNull(Table control)

clear

void clear()

getBackground

public org.eclipse.swt.graphics.Color getBackground()
Returns the receiver's background color.

Since:
2.0

getBackground

public org.eclipse.swt.graphics.Color getBackground(int index)
Returns the background color at the given column index in the receiver.

Since:
3.0

getBounds

public org.eclipse.swt.graphics.Rectangle getBounds(int index)
Returns a rectangle describing the receiver's size and location relative to its parent at a column in the table.


getChecked

public boolean getChecked()
Returns true if the receiver is checked, and false otherwise. When the parent does not have the CHECK style, return false.


getFont

public org.eclipse.swt.graphics.Font getFont()
Returns the font that the receiver will use to paint textual information for this item.

Since:
3.0

getFont

public org.eclipse.swt.graphics.Font getFont(int index)
Returns the font that the receiver will use to paint textual information for the specified cell in this item.

Since:
3.0

getForeground

public org.eclipse.swt.graphics.Color getForeground()
Returns the foreground color that the receiver will use to draw.

Since:
2.0

getForeground

public org.eclipse.swt.graphics.Color getForeground(int index)
Returns the foreground color at the given column index in the receiver.

Since:
3.0

getGrayed

public boolean getGrayed()
Returns true if the receiver is grayed, and false otherwise. When the parent does not have the CHECK style, return false.


getImage

public org.eclipse.swt.graphics.Image getImage()
Description copied from class: Item
Returns the receiver's image if it has one, or null if it does not.

Overrides:
getImage in class Item

getImage

public org.eclipse.swt.graphics.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.


getImageBounds

public org.eclipse.swt.graphics.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.


getImageIndent

public int getImageIndent()
Gets the image indent.


getParent

public Table getParent()
Returns the receiver's parent, which must be a Table.


getText

public java.lang.String getText()
Description copied from class: Item
Returns the receiver's text, which will be an empty string if it has never been set.

Overrides:
getText in class Item

getText

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


releaseChild

void releaseChild()
Overrides:
releaseChild in class Widget

releaseWidget

void releaseWidget()
Overrides:
releaseWidget in class Item

setBackground

public void setBackground(org.eclipse.swt.graphics.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.

Since:
2.0

setBackground

public void setBackground(int index,
                          org.eclipse.swt.graphics.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.

Since:
3.0

setChecked

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.


setFont

public void setFont(org.eclipse.swt.graphics.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.

Since:
3.0

setFont

public void setFont(int index,
                    org.eclipse.swt.graphics.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.

Since:
3.0

setForeground

public void setForeground(org.eclipse.swt.graphics.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.

Since:
2.0

setForeground

public void setForeground(int index,
                          org.eclipse.swt.graphics.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.

Since:
3.0

setGrayed

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.


setImage

public void setImage(int index,
                     org.eclipse.swt.graphics.Image image)
Sets the receiver's image at a column.


setImage

public void setImage(org.eclipse.swt.graphics.Image image)
Description copied from class: Item
Sets the receiver's image to the argument, which may be null indicating that no image should be displayed.

Overrides:
setImage in class Item

setImage

public void setImage(org.eclipse.swt.graphics.Image[] images)
Sets the image for multiple columns in the Table.


setImageIndent

public void setImageIndent(int indent)
Sets the indent of the first column's image, expressed in terms of the image's width.


setText

public void setText(int index,
                    java.lang.String string)
Sets the receiver's text at a column


setText

public void setText(java.lang.String string)
Description copied from class: Item
Sets the receiver's text.

Overrides:
setText in class Item

setText

public void setText(java.lang.String[] strings)
Sets the text for multiple columns in the table.