Top Description Fields Constructors Methods
org.eclipse.swt.widgets

public Class TableItem

extends Item
Class Inheritance
Imports
org.eclipse.swt.*, org.eclipse.swt.graphics.*, org.eclipse.swt.internal.*, org.eclipse.swt.internal.cairo.*, org.eclipse.swt.internal.gtk.*, org.eclipse.swt.internal.gtk3.*, org.eclipse.swt.internal.gtk4.*

Instances of this class represent a selectable user interface object that represents an item in a table.
Styles:
(none)
Events:
(none)

Important Note

This class is not intended to be subclassed.

See Also
Table, TableItem, TableColumn snippets, Sample code and further information

Field Summary

Modifier and TypeField and Description
pack-priv boolean
pack-priv Font[]
pack-priv Font
pack-priv boolean
pack-priv Table
pack-priv boolean
pack-priv String[]
Inherited from org.eclipse.swt.widgets.Item:
ELLIPSISimagetextTEXT_LIMIT

Constructor Summary

AccessConstructor and Description
public
TableItem(Table
a composite control which will be the parent of the new instance (cannot be null)
parent
,
int
the style of control to construct
style
,
int
the zero-relative index to store the receiver in its parent
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.

public
TableItem(Table
a composite control which will be the parent of the new instance (cannot be null)
parent
,
int
the style of control to construct
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.

pack-priv
TableItem(Table parent, int style, int index, boolean create)

Method Summary

Modifier and TypeMethod and Description
pack-priv Color
pack-priv Color
_getBackground(int index)

pack-priv boolean
pack-priv Color
pack-priv Color
_getForeground(int index)

pack-priv Image
_getImage(int index)

pack-priv String
_getText(int index)

pack-priv static Table
checkNull(Table control)

protected void
checkSubclass()

Overrides org.eclipse.swt.widgets.Item.checkSubclass.

Checks that this class can be subclassed.
pack-priv void
pack-priv void
public void
dispose()

Overrides org.eclipse.swt.widgets.Widget.dispose.

Disposes of the operating system resources associated with the receiver and all its descendants.
public Color

Returns:

the background color
getBackground
()

Returns the receiver's background color.

public Color

Returns:

the background color
getBackground
(int
the column index
index
)

Returns the background color at the given column index in the receiver.

public Rectangle

Returns:

the bounding rectangle of the receiver's text
getBounds
()

Returns a rectangle describing the size and location of the receiver's text relative to its parent.

public Rectangle

Returns:

the receiver's bounding column rectangle
getBounds
(int
the index that specifies the column
index
)

Returns a rectangle describing the receiver's size and location relative to its parent at a column in the table.

pack-priv Rectangle

Returns:

the bounding rectangle of the receiver's text
getBoundsinPixels
()

Returns a rectangle describing the size and location of the receiver's text relative to its parent.

pack-priv Rectangle
getBoundsInPixels(int index)

public boolean

Returns:

the checked state of the checkbox
getChecked
()

Returns true if the receiver is checked, and false otherwise.

public Font

Returns:

the receiver's font
getFont
()

Returns the font that the receiver will use to paint textual information for this item.

public Font

Returns:

the receiver's font
getFont
(int
the column index
index
)

Returns the font that the receiver will use to paint textual information for the specified cell in this item.

public Color

Returns:

the receiver's foreground color
getForeground
()

Returns the foreground color that the receiver will use to draw.

public Color

Returns:

the foreground color
getForeground
(int
the column index
index
)

Returns the foreground color at the given column index in the receiver.

public boolean

Returns:

the grayed state of the checkbox
getGrayed
()

Returns true if the receiver is grayed, and false otherwise.

public Image
getImage()

Overrides org.eclipse.swt.widgets.Item.getImage.

Returns the receiver's image if it has one, or null if it does not.
public Image

Returns:

the image stored at the given column index in the receiver
getImage
(int
the column index
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

Returns:

the receiver's bounding image rectangle
getImageBounds
(int
the index that specifies the column
index
)

Returns a rectangle describing the size and location relative to its parent of an image at a column in the table.

pack-priv Rectangle
public int

Returns:

the indent
getImageIndent
()

Gets the image indent.

pack-priv String
public Table

Returns:

the receiver's parent
getParent
()

Returns the receiver's parent, which must be a Table.

public String
getText()

Overrides org.eclipse.swt.widgets.Item.getText.

Returns the receiver's text, which will be an empty string if it has never been set.
public String

Returns:

the text stored at the given column index in the receiver
getText
(int
the column index
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

Returns:

the receiver's bounding text rectangle
getTextBounds
(int
the index that specifies the column
index
)

Returns a rectangle describing the size and location relative to its parent of the text at a column in the table.

pack-priv Rectangle
pack-priv void
pack-priv void
public void
setBackground(Color
the new color (or null)
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
the column index
index
,
Color
the new color (or null)
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
the new checked state of the checkbox
checked
)

Sets the checked state of the checkbox for this item.

public void
setFont(Font
the new font (or null)
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
the column index
index
,
Font
the new font (or null)
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
the new color (or null)
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
the column index
index
,
Color
the new color (or null)
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
the new grayed state of the checkbox;
grayed
)

Sets the grayed state of the checkbox for this item.

public void
setImage(int
the column index
index
,
Image
the new image
image
)

Sets the receiver's image at a column.

public void
setImage(Image
the image to display on the receiver (may be null)
image
)

Overrides org.eclipse.swt.widgets.Item.setImage.

Sets the receiver's image to the argument, which may be null indicating that no image should be displayed.
public void
setImage(Image[]
the array of new images
images
)

Sets the image for multiple columns in the table.

public void
setImageIndent(int
the new indent
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(int
the column index
index
,
String
the new text
string
)

Sets the receiver's text at a column

Note

If control characters like '\n', '\t' etc. are used in the string, then the behavior is platform dependent.

public void
setText(String
the new text
string
)

Overrides org.eclipse.swt.widgets.Item.setText.

Sets the receiver's text.
public void
setText(String[]
the array of new strings
strings
)

Sets the text for multiple columns in the table.

Inherited from org.eclipse.swt.widgets.Item:
updateTextDirection

Field Detail

cachedback to summary
pack-priv boolean cached
cellFontback to summary
pack-priv Font[] cellFont
fontback to summary
pack-priv Font font
grayedback to summary
pack-priv boolean grayed
parentback to summary
pack-priv Table parent
settingDataback to summary
pack-priv boolean settingData
stringsback to summary
pack-priv String[] strings

Constructor Detail

TableItemback to summary
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:Table

a composite control which will be the parent of the new instance (cannot be null)

style:int

the style of control to construct

index:int

the zero-relative index to store the receiver in its parent

Exceptions
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
See Also
SWT, Widget#checkSubclass, Widget#getStyle
TableItemback to summary
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:Table

a composite control which will be the parent of the new instance (cannot be null)

style:int

the style of control to construct

Exceptions
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
See Also
SWT, Widget#checkSubclass, Widget#getStyle
TableItemback to summary
pack-priv TableItem(Table parent, int style, int index, boolean create)

Method Detail

_getBackgroundback to summary
pack-priv Color _getBackground()
_getBackgroundback to summary
pack-priv Color _getBackground(int index)
_getCheckedback to summary
pack-priv boolean _getChecked()
_getForegroundback to summary
pack-priv Color _getForeground()
_getForegroundback to summary
pack-priv Color _getForeground(int index)
_getImageback to summary
pack-priv Image _getImage(int index)
_getTextback to summary
pack-priv String _getText(int index)
checkNullback to summary
pack-priv static Table checkNull(Table control)
checkSubclassback to summary
protected void checkSubclass()

Overrides org.eclipse.swt.widgets.Item.checkSubclass.

Doc from org.eclipse.swt.widgets.Widget.checkSubclass.

Checks that this class can be subclassed.

The SWT class library is intended to be subclassed only at specific, controlled points (most notably, Composite and Canvas when implementing new widgets). This method enforces this rule unless it is overridden.

Important Note

By providing an implementation of this method that allows a subclass of a class which does not normally allow subclassing to be created, the implementer agrees to be fully responsible for the fact that any such subclass will likely fail between SWT releases and will be strongly platform specific. No support is provided for user-written classes which are implemented in this fashion.

The ability to subclass outside of the allowed SWT classes is intended purely to enable those not on the SWT development team to implement patches in order to get around specific limitations in advance of when those limitations can be addressed by the team. Subclassing should not be attempted without an intimate and detailed understanding of the hierarchy.

Annotations
@Override
clearback to summary
pack-priv void clear()
destroyWidgetback to summary
pack-priv void destroyWidget()

Overrides org.eclipse.swt.widgets.Widget.destroyWidget.

Annotations
@Override
disposeback to summary
public void dispose()

Overrides org.eclipse.swt.widgets.Widget.dispose.

Doc from org.eclipse.swt.widgets.Widget.dispose.

Disposes of the operating system resources associated with the receiver and all its descendants. After this method has been invoked, the receiver and all descendants will answer true when sent the message isDisposed(). Any internal connections between the widgets in the tree will have been removed to facilitate garbage collection. This method does nothing if the widget is already disposed.

Note

This method is not called recursively on the descendants of the receiver. This means that, widget implementers can not detect when a widget is being disposed of by re-implementing this method, but should instead listen for the Dispose event.

Annotations
@Override
getBackgroundback to summary
public Color getBackground()

Returns the receiver's background color.

Returns:Color

the background color

Exceptions
SWTException:
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
Since
2.0
getBackgroundback to summary
public Color getBackground(int index)

Returns the background color at the given column index in the receiver.

Parameters
index:int

the column index

Returns:Color

the background color

Exceptions
SWTException:
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
Since
3.0
getBoundsback to summary
public Rectangle getBounds()

Returns a rectangle describing the size and location of the receiver's text relative to its parent.

Returns:Rectangle

the bounding rectangle of the receiver's text

Exceptions
SWTException:
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
Since
3.2
getBoundsback to summary
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.

Parameters
index:int

the index that specifies the column

Returns:Rectangle

the receiver's bounding column rectangle

Exceptions
SWTException:
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
getBoundsinPixelsback to summary
pack-priv Rectangle getBoundsinPixels()

Returns a rectangle describing the size and location of the receiver's text relative to its parent.

Returns:Rectangle

the bounding rectangle of the receiver's text

Exceptions
SWTException:
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
Since
3.105
getBoundsInPixelsback to summary
pack-priv Rectangle getBoundsInPixels(int index)
getCheckedback to summary
public boolean getChecked()

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

Returns:boolean

the checked state of the checkbox

Exceptions
SWTException:
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
getFontback to summary
public Font getFont()

Returns the font that the receiver will use to paint textual information for this item.

Returns:Font

the receiver's font

Exceptions
SWTException:
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
Since
3.0
getFontback to summary
public Font getFont(int index)

Returns the font that the receiver will use to paint textual information for the specified cell in this item.

Parameters
index:int

the column index

Returns:Font

the receiver's font

Exceptions
SWTException:
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
Since
3.0
getForegroundback to summary
public Color getForeground()

Returns the foreground color that the receiver will use to draw.

Returns:Color

the receiver's foreground color

Exceptions
SWTException:
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
Since
2.0
getForegroundback to summary
public Color getForeground(int index)

Returns the foreground color at the given column index in the receiver.

Parameters
index:int

the column index

Returns:Color

the foreground color

Exceptions
SWTException:
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
Since
3.0
getGrayedback to summary
public boolean getGrayed()

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

Returns:boolean

the grayed state of the checkbox

Exceptions
SWTException:
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
getImageback to summary
public Image getImage()

Overrides org.eclipse.swt.widgets.Item.getImage.

Doc from org.eclipse.swt.widgets.Item.getImage.

Returns the receiver's image if it has one, or null if it does not.

Returns:Image

the receiver's image

Annotations
@Override
getImageback to summary
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.

Parameters
index:int

the column index

Returns:Image

the image stored at the given column index in the receiver

Exceptions
SWTException:
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
getImageBoundsback to summary
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.

Parameters
index:int

the index that specifies the column

Returns:Rectangle

the receiver's bounding image rectangle

Exceptions
SWTException:
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
getImageBoundsInPixelsback to summary
pack-priv Rectangle getImageBoundsInPixels(int index)
getImageIndentback to summary
public int getImageIndent()

Gets the image indent.

Returns:int

the indent

Exceptions
SWTException:
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
getNameTextback to summary
pack-priv String getNameText()

Overrides org.eclipse.swt.widgets.Item.getNameText.

Annotations
@Override
getParentback to summary
public Table getParent()

Returns the receiver's parent, which must be a Table.

Returns:Table

the receiver's parent

Exceptions
SWTException:
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
getTextback to summary
public String getText()

Overrides org.eclipse.swt.widgets.Item.getText.

Doc from org.eclipse.swt.widgets.Item.getText.

Returns the receiver's text, which will be an empty string if it has never been set.

Returns:String

the receiver's text

Annotations
@Override
getTextback to summary
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.

Parameters
index:int

the column index

Returns:String

the text stored at the given column index in the receiver

Exceptions
SWTException:
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
getTextBoundsback to summary
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.

Parameters
index:int

the index that specifies the column

Returns:Rectangle

the receiver's bounding text rectangle

Exceptions
SWTException:
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
Since
3.3
getTextBoundsInPixelsback to summary
pack-priv Rectangle getTextBoundsInPixels(int index)
releaseHandleback to summary
pack-priv void releaseHandle()

Overrides org.eclipse.swt.widgets.Widget.releaseHandle.

Annotations
@Override
releaseWidgetback to summary
pack-priv void releaseWidget()

Overrides org.eclipse.swt.widgets.Item.releaseWidget.

Annotations
@Override
setBackgroundback to summary
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.

Parameters
color:Color

the new color (or null)

Exceptions
IllegalArgumentException:
  • ERROR_INVALID_ARGUMENT - if the argument has been disposed
SWTException:
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
Since
2.0
setBackgroundback to summary
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.

Parameters
index:int

the column index

color:Color

the new color (or null)

Exceptions
IllegalArgumentException:
  • ERROR_INVALID_ARGUMENT - if the argument has been disposed
SWTException:
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
Since
3.0
setCheckedback to summary
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.

Parameters
checked:boolean

the new checked state of the checkbox

Exceptions
SWTException:
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
setFontback to summary
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.

Parameters
font:Font

the new font (or null)

Exceptions
IllegalArgumentException:
  • ERROR_INVALID_ARGUMENT - if the argument has been disposed
SWTException:
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
Since
3.0
setFontback to summary
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.

Parameters
index:int

the column index

font:Font

the new font (or null)

Exceptions
IllegalArgumentException:
  • ERROR_INVALID_ARGUMENT - if the argument has been disposed
SWTException:
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
Since
3.0
setForegroundback to summary
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.

Parameters
color:Color

the new color (or null)

Exceptions
IllegalArgumentException:
  • ERROR_INVALID_ARGUMENT - if the argument has been disposed
SWTException:
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
Since
2.0
setForegroundback to summary
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.

Parameters
index:int

the column index

color:Color

the new color (or null)

Exceptions
IllegalArgumentException:
  • ERROR_INVALID_ARGUMENT - if the argument has been disposed
SWTException:
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
Since
3.0
setGrayedback to summary
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.

Parameters
grayed:boolean

the new grayed state of the checkbox;

Exceptions
SWTException:
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
setImageback to summary
public void setImage(int index, Image image)

Sets the receiver's image at a column.

Parameters
index:int

the column index

image:Image

the new image

Exceptions
IllegalArgumentException:
  • ERROR_INVALID_ARGUMENT - if the image has been disposed
SWTException:
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
setImageback to summary
public void setImage(Image image)

Overrides org.eclipse.swt.widgets.Item.setImage.

Doc from org.eclipse.swt.widgets.Item.setImage.

Sets the receiver's image to the argument, which may be null indicating that no image should be displayed.

Parameters
image:Image

the image to display on the receiver (may be null)

Annotations
@Override
setImageback to summary
public void setImage(Image[] images)

Sets the image for multiple columns in the table.

Parameters
images:Image[]

the array of new images

Exceptions
IllegalArgumentException:
  • ERROR_NULL_ARGUMENT - if the array of images is null
  • ERROR_INVALID_ARGUMENT - if one of the images has been disposed
SWTException:
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
setImageIndentback to summary
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.

Parameters
indent:int

the new indent

Annotations
@Deprecated
Exceptions
SWTException:
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
setTextback to summary
public void setText(int index, String string)

Sets the receiver's text at a column

Note

If control characters like '\n', '\t' etc. are used in the string, then the behavior is platform dependent.

Parameters
index:int

the column index

string:String

the new text

Exceptions
IllegalArgumentException:
  • ERROR_NULL_ARGUMENT - if the text is null
SWTException:
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
setTextback to summary
public void setText(String string)

Overrides org.eclipse.swt.widgets.Item.setText.

Doc from org.eclipse.swt.widgets.Item.setText.

Sets the receiver's text.

Note

If control characters like '\n', '\t' etc. are used in the string, then the behavior is platform dependent.

Parameters
string:String

the new text

Annotations
@Override
setTextback to summary
public void setText(String[] strings)

Sets the text for multiple columns in the table.

Note

If control characters like '\n', '\t' etc. are used in the string, then the behavior is platform dependent.

Parameters
strings:String[]

the array of new strings

Exceptions
IllegalArgumentException:
  • ERROR_NULL_ARGUMENT - if the text is null
SWTException:
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver