public class GridColumn
extends org.eclipse.swt.widgets.Item
NOTE: THIS WIDGET AND ITS API ARE STILL UNDER DEVELOPMENT. THIS IS A PRE-RELEASE ALPHA VERSION. USERS SHOULD EXPECT API CHANGES IN FUTURE VERSIONS.
Instances of this class represent a column in a grid widget.
| Constructor | Description |
|---|---|
GridColumn(GridColumnGroup parent,
int style) |
Constructs a new instance of this class given its parent column group
(which must be a
GridColumnGroup), a style value describing
its behavior and appearance, and the index at which to place it in the
items maintained by its parent. |
GridColumn(Grid parent,
int style) |
Constructs a new instance of this class given its parent (which must be a
Grid) and a style value describing its behavior and
appearance. |
GridColumn(Grid parent,
int style,
int index) |
Constructs a new instance of this class given its parent (which must be a
Grid), a style value describing its behavior and appearance,
and the index at which to place it in the items maintained by its parent. |
| Modifier and Type | Method | Description |
|---|---|---|
void |
addControlListener(org.eclipse.swt.events.ControlListener listener) |
Adds a listener to the list of listeners notified when the column is
moved or resized.
|
void |
addSelectionListener(org.eclipse.swt.events.SelectionListener listener) |
Adds the listener to the collection of listeners who will be notified
when the receiver's is pushed, by sending it one of the messages defined
in the
SelectionListener interface. |
void |
dispose() |
|
int |
getAlignment() |
Returns the column alignment.
|
GridCellRenderer |
getCellRenderer() |
Returns the cell renderer.
|
boolean |
getCellSelectionEnabled() |
Returns true if cells in the receiver can be selected.
|
boolean |
getCheckable() |
Returns the checkable state.
|
GridColumnGroup |
getColumnGroup() |
Returns the column group if this column was created inside a group, or
null otherwise. |
org.eclipse.swt.graphics.Font |
getFooterFont() |
Returns the font that the receiver will use to paint textual information
for the footer.
|
org.eclipse.swt.graphics.Image |
getFooterImage() |
Returns the receiver's footer image if it has one, or null if it does
not.
|
java.lang.String |
getFooterText() |
Returns the receiver's footer text, which will be an empty string if it
has never been set.
|
org.eclipse.swt.widgets.Control |
getHeaderControl() |
|
org.eclipse.swt.graphics.Font |
getHeaderFont() |
Returns the font that the receiver will use to paint textual information
for the header.
|
GridHeaderRenderer |
getHeaderRenderer() |
Returns the header renderer.
|
java.lang.String |
getHeaderTooltip() |
Returns the tooltip of the column header.
|
boolean |
getHeaderWordWrap() |
Returns whether or not text is word-wrapped in the header for this
column.
|
int |
getMinimumWidth() |
|
boolean |
getMoveable() |
Returns true if this column is moveable.
|
Grid |
getParent() |
Returns the parent grid.
|
boolean |
getResizeable() |
Returns true if the column is resizeable.
|
int |
getSort() |
Returns the sort indicator value.
|
boolean |
getVisible() |
Returns the visibility state as set with
setVisible. |
int |
getWidth() |
Returns the width of the column.
|
boolean |
getWordWrap() |
Returns the true if the cells in receiver wrap their text.
|
boolean |
isCheck() |
Returns true if the column includes a check box.
|
boolean |
isDetail() |
Returns true if this column is set as a detail column in a column group.
|
boolean |
isSummary() |
Returns true if this column is set as a summary column in a column group.
|
boolean |
isTree() |
Returns true if this column includes a tree toggle.
|
boolean |
isVisible() |
Returns true if the column is visible, false otherwise.
|
void |
pack() |
Causes the receiver to be resized to its preferred size.
|
void |
removeControlListener(org.eclipse.swt.events.ControlListener listener) |
Removes the given control listener.
|
void |
removeSelectionListener(org.eclipse.swt.events.SelectionListener listener) |
Removes the listener from the collection of listeners who will be
notified when the receiver's selection changes.
|
void |
setAlignment(int alignment) |
Sets the column alignment.
|
void |
setCellRenderer(GridCellRenderer cellRenderer) |
Sets the cell renderer.
|
void |
setCellSelectionEnabled(boolean cellSelectionEnabled) |
Sets whether cells in the receiver can be selected.
|
void |
setCheckable(boolean checkable) |
Sets the checkable state.
|
void |
setDetail(boolean detail) |
Sets the column as a detail column in a column group.
|
void |
setFooterFont(org.eclipse.swt.graphics.Font font) |
Sets the Font to be used when displaying the Footer text.
|
void |
setFooterImage(org.eclipse.swt.graphics.Image image) |
Sets the receiver's footer image to the argument, which may be null
indicating that no image should be displayed.
|
void |
setFooterRenderer(GridFooterRenderer footerRenderer) |
Sets the header renderer.
|
void |
setFooterText(java.lang.String string) |
Sets the receiver's footer text.
|
void |
setHeaderControl(org.eclipse.swt.widgets.Control control) |
Set a new editor at the top of the control.
|
void |
setHeaderFont(org.eclipse.swt.graphics.Font font) |
Sets the Font to be used when displaying the Header text.
|
void |
setHeaderRenderer(GridHeaderRenderer headerRenderer) |
Sets the header renderer.
|
void |
setHeaderTooltip(java.lang.String tooltip) |
Sets the tooltip text of the column header.
|
void |
setHeaderWordWrap(boolean wordWrap) |
Sets whether or not text is word-wrapped in the header for this column.
|
void |
setMinimumWidth(int minimumWidth) |
Set the minimum width of the column
|
void |
setMoveable(boolean moveable) |
Sets the column moveable or fixed.
|
void |
setResizeable(boolean resizeable) |
Sets the column resizeable.
|
void |
setSort(int style) |
Sets the sort indicator style for the column.
|
void |
setSummary(boolean summary) |
Sets the column as a summary column in a column group.
|
void |
setTree(boolean tree) |
Adds or removes the columns tree toggle.
|
void |
setVisible(boolean visible) |
Sets the column's visibility.
|
void |
setWidth(int width) |
Sets the width of the column.
|
void |
setWordWrap(boolean wordWrap) |
If the argument is true, wraps the text in the receiver's cells.
|
public GridColumn(Grid parent, int style)
Grid) and a style value describing its behavior and
appearance. The item is added to the end of the items maintained by its
parent.parent - an Grid control which will be the parent of the new instance
(cannot be null)style - the style of control to constructjava.lang.IllegalArgumentException - org.eclipse.swt.SWTException - public GridColumn(Grid parent, int style, int index)
Grid), a style value describing its behavior and appearance,
and the index at which to place it in the items maintained by its parent.parent - an Grid control which will be the parent of the new instance
(cannot be null)style - the style of control to constructindex - the index to store the receiver in its parentjava.lang.IllegalArgumentException - org.eclipse.swt.SWTException - public GridColumn(GridColumnGroup parent, int style)
GridColumnGroup), a style value describing
its behavior and appearance, and the index at which to place it in the
items maintained by its parent.parent - an Grid control which will be the parent of the new instance
(cannot be null)style - the style of control to constructjava.lang.IllegalArgumentException - org.eclipse.swt.SWTException - public void dispose()
dispose in class org.eclipse.swt.widgets.Widgetpublic GridHeaderRenderer getHeaderRenderer()
public GridCellRenderer getCellRenderer()
public int getWidth()
org.eclipse.swt.SWTException - public void setWidth(int width)
width - new widthorg.eclipse.swt.SWTException - public void setSort(int style)
style - SWT.UP, SWT.DOWN, SWT.NONEorg.eclipse.swt.SWTException - public int getSort()
org.eclipse.swt.SWTException - public void addSelectionListener(org.eclipse.swt.events.SelectionListener listener)
SelectionListener interface.listener - the listener which should be notifiedjava.lang.IllegalArgumentException - org.eclipse.swt.SWTException - public void removeSelectionListener(org.eclipse.swt.events.SelectionListener listener)
listener - the listener which should no longer be notifiedorg.eclipse.swt.SWTException - SelectionListener,
addSelectionListener(SelectionListener)public boolean isVisible()
org.eclipse.swt.SWTException - public boolean getVisible()
setVisible.org.eclipse.swt.SWTException - public void setVisible(boolean visible)
visible - the visible to setorg.eclipse.swt.SWTException - public void pack()
org.eclipse.swt.SWTException - public boolean isTree()
org.eclipse.swt.SWTException - public boolean isCheck()
org.eclipse.swt.SWTException - public void setCellRenderer(GridCellRenderer cellRenderer)
cellRenderer - The cellRenderer to set.org.eclipse.swt.SWTException - public void setHeaderRenderer(GridHeaderRenderer headerRenderer)
headerRenderer - The headerRenderer to set.org.eclipse.swt.SWTException - public void setFooterRenderer(GridFooterRenderer footerRenderer)
footerRenderer - The footerRenderer to set.org.eclipse.swt.SWTException - public void addControlListener(org.eclipse.swt.events.ControlListener listener)
listener - listenerjava.lang.IllegalArgumentException - org.eclipse.swt.SWTException - public void removeControlListener(org.eclipse.swt.events.ControlListener listener)
listener - listener.java.lang.IllegalArgumentException - org.eclipse.swt.SWTException - public void setTree(boolean tree)
tree - true to add toggle.org.eclipse.swt.SWTException - public int getAlignment()
org.eclipse.swt.SWTException - public void setAlignment(int alignment)
alignment - SWT.LEFT, SWT.RIGHT, SWT.CENTERorg.eclipse.swt.SWTException - public boolean getMoveable()
org.eclipse.swt.SWTException - public void setMoveable(boolean moveable)
moveable - true to enable column movingorg.eclipse.swt.SWTException - public boolean getResizeable()
org.eclipse.swt.SWTException - public void setResizeable(boolean resizeable)
resizeable - true to make the column resizeableorg.eclipse.swt.SWTException - public GridColumnGroup getColumnGroup()
null otherwise.org.eclipse.swt.SWTException - public boolean isDetail()
org.eclipse.swt.SWTException - public void setDetail(boolean detail)
detail - true to show this column when the group is expanded.org.eclipse.swt.SWTException - public boolean isSummary()
org.eclipse.swt.SWTException - public void setSummary(boolean summary)
summary - true to show this column when the group is collapsed.org.eclipse.swt.SWTException - public boolean getCellSelectionEnabled()
org.eclipse.swt.SWTException - public void setCellSelectionEnabled(boolean cellSelectionEnabled)
cellSelectionEnabled - the cellSelectionEnabled to setorg.eclipse.swt.SWTException - public Grid getParent()
org.eclipse.swt.SWTException - public boolean getCheckable()
org.eclipse.swt.SWTException - public void setCheckable(boolean checkable)
checkable - the new checkable state.org.eclipse.swt.SWTException - public boolean getWordWrap()
org.eclipse.swt.SWTException - public void setWordWrap(boolean wordWrap)
Grid#setItemHeight to change the
height of each row.wordWrap - true to make cells wrap their text.org.eclipse.swt.SWTException - public void setHeaderWordWrap(boolean wordWrap)
wordWrap - Set to true to wrap the text, false otherwisegetHeaderWordWrap()public boolean getHeaderWordWrap()
setHeaderWordWrap(boolean)public void setHeaderControl(org.eclipse.swt.widgets.Control control)
control - the control to be displayed in the headerpublic org.eclipse.swt.widgets.Control getHeaderControl()
public java.lang.String getHeaderTooltip()
public void setHeaderTooltip(java.lang.String tooltip)
tooltip - the tooltip textpublic void setFooterImage(org.eclipse.swt.graphics.Image image)
image - the image to display on the receiver (may be null)java.lang.IllegalArgumentException - org.eclipse.swt.SWTException - public void setFooterText(java.lang.String string)
string - the new textjava.lang.IllegalArgumentException - org.eclipse.swt.SWTException - public org.eclipse.swt.graphics.Image getFooterImage()
org.eclipse.swt.SWTException - public java.lang.String getFooterText()
org.eclipse.swt.SWTException - public org.eclipse.swt.graphics.Font getHeaderFont()
org.eclipse.swt.SWTException - public void setHeaderFont(org.eclipse.swt.graphics.Font font)
font - public org.eclipse.swt.graphics.Font getFooterFont()
org.eclipse.swt.SWTException - public void setFooterFont(org.eclipse.swt.graphics.Font font)
font - public int getMinimumWidth()
public void setMinimumWidth(int minimumWidth)
minimumWidth - the minimum width