public class GridColumnGroup
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 group in a grid widget. A column group header is displayed above grouped columns. The column group can optionally be configured to expand and collapse. A column group in the expanded state showsGridColumn
s whose detail property
is true. A column group in the collapsed state shows GridColumn
s whose summary property
is true.
Constructor | Description |
---|---|
GridColumnGroup(Grid 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.
|
Modifier and Type | Method | Description |
---|---|---|
void |
addTreeListener(org.eclipse.swt.events.TreeListener listener) |
Adds the listener to the collection of listeners who will
be notified when an item in the receiver is expanded or collapsed
by sending it one of the messages defined in the
TreeListener
interface. |
void |
dispose() |
|
GridColumn[] |
getColumns() |
Returns the columns within this group.
|
boolean |
getExpanded() |
Returns true if the receiver is expanded, false otherwise.
|
org.eclipse.swt.graphics.Font |
getHeaderFont() |
Returns the font that the receiver will use to paint textual information
for the header.
|
GridHeaderRenderer |
getHeaderRenderer() |
Gets the header renderer.
|
boolean |
getHeaderWordWrap() |
Returns whether or not text is word-wrapped in the header for this column group.
|
Grid |
getParent() |
Returns the parent grid.
|
void |
removeTreeListener(org.eclipse.swt.events.TreeListener listener) |
Removes the listener from the collection of listeners who will
be notified when items in the receiver are expanded or collapsed.
|
void |
setExpanded(boolean expanded) |
Sets the expanded state of the receiver.
|
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 |
setHeaderWordWrap(boolean wordWrap) |
Sets whether or not text is word-wrapped in the header for this column group.
|
public GridColumnGroup(Grid parent, int style)
parent
- the parent tablestyle
- the style of the groupjava.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- public void addTreeListener(org.eclipse.swt.events.TreeListener listener)
TreeListener
interface.listener
- the listener which should be notifiedjava.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- TreeListener
,
removeTreeListener(org.eclipse.swt.events.TreeListener)
public void removeTreeListener(org.eclipse.swt.events.TreeListener listener)
listener
- the listener which should no longer be notifiedjava.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- TreeListener
,
addTreeListener(org.eclipse.swt.events.TreeListener)
public Grid getParent()
org.eclipse.swt.SWTException
- public GridColumn[] getColumns()
Note: This is not the actual structure used by the receiver to maintain its list of items, so modifying the array will not affect the receiver.
org.eclipse.swt.SWTException
- public void dispose()
dispose
in class org.eclipse.swt.widgets.Widget
public GridHeaderRenderer getHeaderRenderer()
org.eclipse.swt.SWTException
- public void setHeaderRenderer(GridHeaderRenderer headerRenderer)
headerRenderer
- The headerRenderer to set.java.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- public boolean getExpanded()
org.eclipse.swt.SWTException
- public void setExpanded(boolean expanded)
expanded
- the expanded to setorg.eclipse.swt.SWTException
- public void setHeaderWordWrap(boolean wordWrap)
wordWrap
- Set to true to wrap the text, false otherwisegetHeaderWordWrap()
public boolean getHeaderWordWrap()
GridColumn.setHeaderWordWrap(boolean)
public org.eclipse.swt.graphics.Font getHeaderFont()
org.eclipse.swt.SWTException
- public void setHeaderFont(org.eclipse.swt.graphics.Font font)
font
-