TableColumn

Instances of this class represent a column in a table widget. <p><dl> <dt><b>Styles:</b></dt> <dd>LEFT, RIGHT, CENTER</dd> <dt><b>Events:</b></dt> <dd> Move, Resize, Selection</dd> </dl> </p><p> Note: Only one of the styles LEFT, RIGHT and CENTER may be specified. </p><p> IMPORTANT: This class is <em>not</em> intended to be subclassed. </p>

@see <a href="http://www.eclipse.org/swt/snippets/#table">Table, TableItem, TableColumn snippets</a> @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>

Constructors

this
this(Table parent, int style)

Constructs a new instance of this class given its parent (which must be a <code>Table</code>) and a style value describing its behavior and appearance. The item is added to the end of the items maintained by its parent. <p> The style value is either one of the style constants defined in class <code>SWT</code> which is applicable to instances of this class, or must be built by <em>bitwise OR</em>'ing together (that is, using the <code>int</code> "|" operator) two or more of those <code>SWT</code> style constants. The class description lists the style constants that are applicable to the class. Style bits are also inherited from superclasses. </p>

this
this(Table parent, int style, int index)

Constructs a new instance of this class given its parent (which must be a <code>Table</code>), a style value describing its behavior and appearance, and the index at which to place it in the items maintained by its parent. <p> The style value is either one of the style constants defined in class <code>SWT</code> which is applicable to instances of this class, or must be built by <em>bitwise OR</em>'ing together (that is, using the <code>int</code> "|" operator) two or more of those <code>SWT</code> style constants. The class description lists the style constants that are applicable to the class. Style bits are also inherited from superclasses. </p> <p> Note that due to a restriction on some platforms, the first column is always left aligned. </p> @param parent a composite control which will be the parent of the new instance (cannot be null) @param style the style of control to construct @param index the zero-relative index to store the receiver in its parent

Members

Functions

addControlListener
void addControlListener(ControlListener listener)

Adds the listener to the collection of listeners who will be notified when the control is moved or resized, by sending it one of the messages defined in the <code>ControlListener</code> interface.

addSelectionListener
void addSelectionListener(SelectionListener listener)

Adds the listener to the collection of listeners who will be notified when the control is selected by the user, by sending it one of the messages defined in the <code>SelectionListener</code> interface. <p> <code>widgetSelected</code> is called when the column header is selected. <code>widgetDefaultSelected</code> is not called. </p>

checkSubclass
void checkSubclass()
Undocumented in source. Be warned that the author may not have intended to support it.
createWidget
void createWidget(int index)
Undocumented in source. Be warned that the author may not have intended to support it.
deregister
void deregister()
Undocumented in source. Be warned that the author may not have intended to support it.
destroyWidget
void destroyWidget()
Undocumented in source. Be warned that the author may not have intended to support it.
getAlignment
int getAlignment()

Returns a value which describes the position of the text or image in the receiver. The value will be one of <code>LEFT</code>, <code>RIGHT</code> or <code>CENTER</code>.

getMoveable
bool getMoveable()

Gets the moveable attribute. A column that is not moveable cannot be reordered by the user by dragging the header but may be reordered by the programmer.

getParent
Table getParent()

Returns the receiver's parent, which must be a <code>Table</code>.

getResizable
bool getResizable()

Gets the resizable attribute. A column that is not resizable cannot be dragged by the user but may be resized by the programmer.

getToolTipText
String getToolTipText()

Returns the receiver's tool tip text, or null if it has not been set.

getWidth
int getWidth()

Gets the width of the receiver.

gtk_clicked
int gtk_clicked(GtkWidget* widget)
Undocumented in source. Be warned that the author may not have intended to support it.
gtk_mnemonic_activate
int gtk_mnemonic_activate(GtkWidget* widget, ptrdiff_t arg1)
Undocumented in source. Be warned that the author may not have intended to support it.
gtk_size_allocate
int gtk_size_allocate(GtkWidget* widget, ptrdiff_t allocation)
Undocumented in source. Be warned that the author may not have intended to support it.
hookEvents
void hookEvents()
Undocumented in source. Be warned that the author may not have intended to support it.
pack
void pack()

Causes the receiver to be resized to its preferred size. For a composite, this involves computing the preferred size from its layout, if there is one.

register
void register()
Undocumented in source. Be warned that the author may not have intended to support it.
releaseHandle
void releaseHandle()
Undocumented in source. Be warned that the author may not have intended to support it.
releaseParent
void releaseParent()
Undocumented in source. Be warned that the author may not have intended to support it.
removeControlListener
void removeControlListener(ControlListener listener)

Removes the listener from the collection of listeners who will be notified when the control is moved or resized.

removeSelectionListener
void removeSelectionListener(SelectionListener listener)

Removes the listener from the collection of listeners who will be notified when the control is selected by the user.

setAlignment
void setAlignment(int alignment)

Controls how text and images will be displayed in the receiver. The argument should be one of <code>LEFT</code>, <code>RIGHT</code> or <code>CENTER</code>. <p> Note that due to a restriction on some platforms, the first column is always left aligned. </p> @param alignment the new alignment

setFontDescription
void setFontDescription(PangoFontDescription* font)
Undocumented in source. Be warned that the author may not have intended to support it.
setImage
void setImage(Image image)
Undocumented in source. Be warned that the author may not have intended to support it.
setMoveable
void setMoveable(bool moveable)

Sets the moveable attribute. A column that is moveable can be reordered by the user by dragging the header. A column that is not moveable cannot be dragged by the user but may be reordered by the programmer.

setOrientation
void setOrientation()
Undocumented in source. Be warned that the author may not have intended to support it.
setResizable
void setResizable(bool resizable)

Sets the resizable attribute. A column that is resizable can be resized by the user dragging the edge of the header. A column that is not resizable cannot be dragged by the user but may be resized by the programmer.

setText
void setText(String string)
Undocumented in source. Be warned that the author may not have intended to support it.
setToolTipText
void setToolTipText(String string)

Sets the receiver's tool tip text to the argument, which may be null indicating that no tool tip text should be shown.

setToolTipText
void setToolTipText(Shell shell, String newString)
Undocumented in source. Be warned that the author may not have intended to support it.
setWidth
void setWidth(int width)

Sets the width of the receiver.

Static functions

checkStyle
int checkStyle(int style)
buttonHandle
GtkWidget* buttonHandle;
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

customDraw
bool customDraw;
imageHandle
GtkWidget* imageHandle;
Undocumented in source.
labelHandle
GtkWidget* labelHandle;
lastButton
int lastButton;
lastTime
int lastTime;
lastWidth
int lastWidth;
lastX
int lastX;
Undocumented in source.
modelIndex
int modelIndex;
Undocumented in source.
parent
Table parent;
Undocumented in source.
toolTipText
String toolTipText;
useFixedWidth
bool useFixedWidth;
Undocumented in source.

Inherited Members

From Item

text
String text;
Undocumented in source.
image
Image image;
Undocumented in source.
checkSubclass
void checkSubclass()
Undocumented in source. Be warned that the author may not have intended to support it.
getImage
Image getImage()

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

getNameText
String getNameText()
Undocumented in source. Be warned that the author may not have intended to support it.
getText
String getText()

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

releaseWidget
void releaseWidget()
Undocumented in source. Be warned that the author may not have intended to support it.
setImage
void setImage(Image image)

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

setText
void setText(String string)

Sets the receiver's text.

Meta