|
|||||||||
| Home >> All >> org >> eclipse >> swt >> [ widgets overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.eclipse.swt.widgets
Class TableItem

java.lang.Objectorg.eclipse.swt.widgets.Widget
org.eclipse.swt.widgets.Item
org.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 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
SWTwhich is applicable to instances of this class, or must be built by bitwise OR'ing together (that is, using theint"|" operator) two or more of thoseSWTstyle 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
SWTwhich is applicable to instances of this class, or must be built by bitwise OR'ing together (that is, using theint"|" operator) two or more of thoseSWTstyle 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
trueif the receiver is checked, and false otherwise. When the parent does not have theCHECKstyle, 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
trueif the receiver is grayed, and false otherwise. When the parent does not have theCHECKstyle, 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.
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.
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:
releaseChildin classWidget
releaseWidget
void releaseWidget()
- Overrides:
releaseWidgetin classItem
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.
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)
setText
public void setText(java.lang.String[] strings)
- Sets the text for multiple columns in the table.
|
|||||||||
| Home >> All >> org >> eclipse >> swt >> [ widgets overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC