public class ColumnBrowserWidget
extends org.eclipse.swt.custom.ScrolledComposite
Constructor and Description |
---|
ColumnBrowserWidget(org.eclipse.swt.widgets.Composite parent,
int style)
Constructs a new instance of this class given its parent and a style value
describing its behavior and appearance.
|
Modifier and Type | Method and Description |
---|---|
void |
addSelectionListener(org.eclipse.swt.events.SelectionListener listener)
Adds the listener to the collection of listeners who will be notified when
the user changes the receiver's selection, by sending it one of the messages
defined in the
SelectionListener interface. |
void |
clear(boolean needPacking)
Clear the selection
|
(package private) ColumnItem |
getRootItem() |
ColumnItem |
getSelection()
Returns the
ColumnItem s that is currently selected in the
receiver. |
void |
removeSelectionListener(org.eclipse.swt.events.SelectionListener listener)
Removes the listener from the collection of listeners who will be notified
when the user changes the receiver's selection.
|
void |
select(ColumnItem item)
Selects an item in the receiver.
|
void |
setBackground(org.eclipse.swt.graphics.Color color)
Sets the receiver's background color to the color specified by the argument,
or to the default system color for the control if the argument is null.
|
void |
setBackgroundImage(org.eclipse.swt.graphics.Image image)
Sets the receiver's background image to the image specified by the argument,
or to the default system color for the control if the argument is null.
|
void |
setBackgroundMode(int mode)
Sets the background drawing mode to the argument which should be one of the
following constants defined in class
SWT :
INHERIT_NONE , INHERIT_DEFAULT ,
INHERIT_FORCE . |
void |
setCursor(org.eclipse.swt.graphics.Cursor cursor)
Sets the receiver's cursor to the cursor specified by the argument, or to the
default cursor for that kind of control if the argument is null.
|
void |
setFont(org.eclipse.swt.graphics.Font font)
Sets the font that the receiver will use to paint textual information to the
font specified by the argument, or to the default font for that kind of
control if the argument is null.
|
void |
setForeground(org.eclipse.swt.graphics.Color color)
Sets the receiver's foreground color to the color specified by the argument,
or to the default system color for the control if the argument is null.
|
void |
setMenu(org.eclipse.swt.widgets.Menu menu)
Sets the receiver's pop up menu to the argument.
|
void |
setToolTipText(java.lang.String tooltipText)
Sets the receiver's tool tip text to the argument, which may be null
indicating that the default tool tip for the control will be shown.
|
(package private) void |
updateContent()
Update the content of the widget
|
getAlwaysShowScrollBars, getContent, getExpandHorizontal, getExpandVertical, getMinHeight, getMinWidth, getOrigin, getShowFocusedControl, setAlwaysShowScrollBars, setContent, setExpandHorizontal, setExpandVertical, setLayout, setMinHeight, setMinSize, setMinSize, setMinWidth, setOrigin, setOrigin, setShowFocusedControl, showControl
changed, checkSubclass, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setFocus, setLayoutDeferred, setTabList
computeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBar
addControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, computeSize, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getRegion, getShell, getSize, getTextDirection, getToolTipText, getTouchEnabled, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, requestLayout, setBounds, setBounds, setCapture, setDragDetect, setEnabled, setLayoutData, setLocation, setLocation, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setTextDirection, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, update
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getListeners, getStyle, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData, toString
public ColumnBrowserWidget(org.eclipse.swt.widgets.Composite parent, int style)
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.
parent
- a widget which will be the parent of the new instance (cannot
be null)style
- the style of widget to constructjava.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- Composite.Composite(Composite, int)
,
SWT.BORDER
,
Widget.getStyle()
void updateContent()
public void addSelectionListener(org.eclipse.swt.events.SelectionListener listener)
SelectionListener
interface.listener
- the listener which should be notified when the user changes
the receiver's selectionjava.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- SelectionListener
,
removeSelectionListener(org.eclipse.swt.events.SelectionListener)
,
SelectionEvent
public void clear(boolean needPacking)
needPacking
- if true
, the widget is packedpublic ColumnItem getSelection()
ColumnItem
s that is currently selected in the
receiver.null
if no one is selectedorg.eclipse.swt.SWTException
- public void removeSelectionListener(org.eclipse.swt.events.SelectionListener listener)
listener
- the listener which should no longer be notifiedjava.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- SelectionListener
,
addSelectionListener(org.eclipse.swt.events.SelectionListener)
public void select(ColumnItem item)
item
- the item to be selectedjava.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- public void setBackground(org.eclipse.swt.graphics.Color color)
Note: This operation is a hint and may be overridden by the platform. For example, on Windows the background of a Button cannot be changed.
setBackground
in class org.eclipse.swt.widgets.Control
color
- the new color (or null)java.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- Control.setBackground(org.eclipse.swt.graphics.Color)
public void setBackgroundMode(int mode)
SWT
:
INHERIT_NONE
, INHERIT_DEFAULT
,
INHERIT_FORCE
.setBackgroundMode
in class org.eclipse.swt.widgets.Composite
mode
- the new background modeorg.eclipse.swt.SWTException
- SWT
,
Composite.setBackgroundMode(int)
public void setBackgroundImage(org.eclipse.swt.graphics.Image image)
Note: This operation is a hint and may be overridden by the platform. For example, on Windows the background of a Button cannot be changed.
setBackgroundImage
in class org.eclipse.swt.widgets.Control
image
- the new image (or null)java.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- Control.setBackgroundImage(org.eclipse.swt.graphics.Image)
public void setCursor(org.eclipse.swt.graphics.Cursor cursor)
When the mouse pointer passes over a control its appearance is changed to match the control's cursor.
setCursor
in class org.eclipse.swt.widgets.Control
cursor
- the new cursor (or null)java.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- Control.setCursor(org.eclipse.swt.graphics.Cursor)
public void setFont(org.eclipse.swt.graphics.Font font)
setFont
in class org.eclipse.swt.widgets.Control
font
- the new font (or null)java.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- Control.setFont(org.eclipse.swt.graphics.Font)
public void setForeground(org.eclipse.swt.graphics.Color color)
Note: This operation is a hint and may be overridden by the platform.
setForeground
in class org.eclipse.swt.widgets.Control
color
- the new color (or null)java.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- Control.setForeground(org.eclipse.swt.graphics.Color)
public void setMenu(org.eclipse.swt.widgets.Menu menu)
Note: Disposing of a control that has a pop up menu will dispose of the menu. To avoid this behavior, set the menu to null before the control is disposed.
setMenu
in class org.eclipse.swt.widgets.Control
menu
- the new pop up menujava.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- Control.setMenu(org.eclipse.swt.widgets.Menu)
public void setToolTipText(java.lang.String tooltipText)
The mnemonic indicator (character '&') is not displayed in a tool tip. To display a single '&' in the tool tip, the character '&' can be escaped by doubling it in the string.
setToolTipText
in class org.eclipse.swt.widgets.Control
string
- the new tool tip text (or null)org.eclipse.swt.SWTException
- Control.setToolTipText(java.lang.String)
ColumnItem getRootItem()