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 and 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 and 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() |
int |
getAlignment()
Returns the column group header alignment.
|
(package private) org.eclipse.swt.graphics.Rectangle |
getBounds() |
GridColumn[] |
getColumns()
Returns the columns within this group.
|
boolean |
getExpanded()
Returns true if the receiver is expanded, false otherwise.
|
(package private) GridColumn |
getFirstVisibleColumn()
Returns the first visible column in this column group.
|
org.eclipse.swt.graphics.Font |
getHeaderFont()
Returns the font that the receiver will use to paint textual information
for the header.
|
GridHeaderRenderer |
getHeaderRenderer() |
boolean |
getHeaderWordWrap()
Returns whether or not text is word-wrapped in the header for this column group.
|
(package private) GridColumn |
getLastVisibleColumn()
Returns the last visible column in this column group.
|
(package private) int |
getNewColumnIndex() |
Grid |
getParent() |
(package private) void |
newColumn(GridColumn column,
int index) |
(package private) void |
removeColumn(GridColumn col) |
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.
|
checkSubclass, getImage, getText, setImage, setText
addDisposeListener, addListener, checkWidget, getData, getData, getDisplay, getListeners, getStyle, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData, toString
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
- int getNewColumnIndex()
void newColumn(GridColumn column, int index)
void removeColumn(GridColumn col)
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
- GridColumn getFirstVisibleColumn()
GridColumn getLastVisibleColumn()
org.eclipse.swt.graphics.Rectangle getBounds()
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
- public int getAlignment()
org.eclipse.swt.SWTException
-