|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.swt.widgets.Widget | +--org.eclipse.swt.widgets.Control | +--org.eclipse.swt.widgets.Scrollable | +--org.eclipse.swt.widgets.Composite | +--org.eclipse.swt.widgets.Tree
Safe:
Field Summary | |
(package private) boolean |
customDraw
|
(package private) boolean |
dragStarted
|
(package private) int |
hAnchor
|
(package private) boolean |
ignoreDeselect
|
(package private) boolean |
ignoreExpand
|
(package private) boolean |
ignoreSelect
|
(package private) ImageList |
imageList
|
(package private) TreeItem[] |
items
|
(package private) static org.eclipse.swt.internal.win32.TCHAR |
TreeClass
|
(package private) static int |
TreeProc
|
Fields inherited from class org.eclipse.swt.widgets.Composite |
font, layout, lpwp, tabList |
Fields inherited from class org.eclipse.swt.widgets.Scrollable |
horizontalBar, verticalBar |
Fields inherited from class org.eclipse.swt.widgets.Control |
ACCENTS, accessible, background, drawCount, foreground, handle, hCursor, layoutData, menu, parent, toolTipText |
Fields inherited from class org.eclipse.swt.widgets.Widget |
CANVAS, COMCTL32_MAJOR, COMCTL32_MINOR, data, DEFAULT_HEIGHT, DEFAULT_WIDTH, DISABLED, DISPOSED, eventTable, HIDDEN, keys, MAJOR, MINOR, Mnemonic, state, style, values |
Constructor Summary | |
Tree(Composite parent,
int style)
Enabled: Constructs a new instance of this class given its parent and a style value describing its behavior and appearance. |
Method Summary | |
void |
addSelectionListener(SelectionListener listener)
Enabled: Adds the listener to the collection of listeners who will be notified when the receiver's selection changes, by sending it one of the messages defined in the SelectionListener
interface. |
void |
addTreeListener(TreeListener listener)
Enabled: 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. |
(package private) int |
callWindowProc(int msg,
int wParam,
int lParam)
|
(package private) static int |
checkStyle(int style)
|
Point |
computeSize(int wHint,
int hHint,
boolean changed)
Enabled: |
(package private) void |
createHandle()
|
(package private) void |
createItem(TreeItem item,
int hParent,
int hInsertAfter)
|
(package private) void |
createWidget()
|
(package private) int |
defaultBackground()
|
void |
deselectAll()
Enabled: Deselects all selected items in the receiver. |
(package private) void |
destroyItem(TreeItem item)
|
(package private) int |
getBackgroundPixel()
|
(package private) int |
getForegroundPixel()
|
TreeItem |
getItem(Point point)
Enabled: Returns the item at the given point in the receiver or null if no such item exists. |
int |
getItemCount()
Enabled: Returns the number of items contained in the receiver that are direct item children of the receiver. |
int |
getItemHeight()
Enabled: Returns the height of the area which would be used to display one of the items in the tree. |
TreeItem[] |
getItems()
Enabled: Returns the number of items contained in the receiver that are direct item children of the receiver. |
TreeItem |
getParentItem()
Suppressed: Returns the receiver's parent item, which must be a TreeItem or null when the receiver is a
root. |
TreeItem[] |
getSelection()
Enabled: Returns an array of TreeItem s that are currently
selected in the receiver. |
int |
getSelectionCount()
Enabled: Returns the number of selected items contained in the receiver. |
TreeItem |
getTopItem()
Suppressed: Returns the item which is currently at the top of the receiver. |
(package private) int |
imageIndex(Image image)
|
(package private) boolean |
releaseItem(TreeItem item,
org.eclipse.swt.internal.win32.TVITEM tvItem)
|
(package private) void |
releaseItems(TreeItem[] nodes,
org.eclipse.swt.internal.win32.TVITEM tvItem)
|
(package private) void |
releaseWidget()
|
void |
removeAll()
Enabled: Removes all of the items from the receiver. |
void |
removeSelectionListener(SelectionListener listener)
Enabled: Removes the listener from the collection of listeners who will be notified when the receiver's selection changes. |
void |
removeTreeListener(TreeListener listener)
Enabled: Removes the listener from the collection of listeners who will be notified when items in the receiver are expanded or collapsed.. |
void |
selectAll()
Enabled: Selects all the items in the receiver. |
(package private) void |
setBackgroundPixel(int pixel)
|
(package private) void |
setBounds(int x,
int y,
int width,
int height,
int flags)
|
(package private) void |
setCheckboxImageList()
|
(package private) void |
setForegroundPixel(int pixel)
|
void |
setInsertMark(TreeItem item,
boolean before)
Enabled: Display a mark indicating the point at which an item will be inserted. |
void |
setRedraw(boolean redraw)
Enabled: |
void |
setSelection(TreeItem[] items)
Enabled: Sets the receiver's selection to be the given array of items. |
void |
setTopItem(TreeItem item)
Suppressed: Sets the item which is currently at the top of the receiver. |
(package private) void |
showItem(int hItem)
|
void |
showItem(TreeItem item)
Enabled: Shows the item. |
void |
showSelection()
Enabled: Shows the selection. |
(package private) String |
toolTipText(org.eclipse.swt.internal.win32.NMTTDISPINFO hdr)
|
(package private) int |
widgetStyle()
|
(package private) org.eclipse.swt.internal.win32.TCHAR |
windowClass()
|
(package private) int |
windowProc()
|
(package private) org.eclipse.swt.internal.win32.LRESULT |
WM_CHAR(int wParam,
int lParam)
|
(package private) org.eclipse.swt.internal.win32.LRESULT |
WM_GETOBJECT(int wParam,
int lParam)
|
(package private) org.eclipse.swt.internal.win32.LRESULT |
WM_KEYDOWN(int wParam,
int lParam)
|
(package private) org.eclipse.swt.internal.win32.LRESULT |
WM_KILLFOCUS(int wParam,
int lParam)
|
(package private) org.eclipse.swt.internal.win32.LRESULT |
WM_LBUTTONDOWN(int wParam,
int lParam)
|
(package private) org.eclipse.swt.internal.win32.LRESULT |
WM_RBUTTONDOWN(int wParam,
int lParam)
|
(package private) org.eclipse.swt.internal.win32.LRESULT |
WM_SETFOCUS(int wParam,
int lParam)
|
(package private) org.eclipse.swt.internal.win32.LRESULT |
WM_SYSCOLORCHANGE(int wParam,
int lParam)
|
(package private) org.eclipse.swt.internal.win32.LRESULT |
wmNotifyChild(int wParam,
int lParam)
|
Methods inherited from class org.eclipse.swt.widgets.Composite |
_getChildren, _getTabList, checkSubclass, computeTabList, getChildren, getChildrenCount, getLayout, getTabList, hooksKeys, layout, layout, minimumSize, moveAbove, moveBelow, releaseChildren, resizeChildren, resizeChildren, setFocus, setLayout, setResizeChildren, setTabGroupFocus, setTabItemFocus, setTabList, translateMnemonic, updateFont, WM_ERASEBKGND, WM_GETDLGCODE, WM_GETFONT, WM_NOTIFY, WM_PAINT, WM_SETFONT, WM_SIZE, WM_SYSCOMMAND |
Methods inherited from class org.eclipse.swt.widgets.Scrollable |
computeTrim, createScrollBar, getClientArea, getHorizontalBar, getVerticalBar, widgetExtStyle, WM_HSCROLL, WM_MOUSEWHEEL, WM_VSCROLL, wmScroll |
Methods inherited from class org.eclipse.swt.widgets.Widget |
addDisposeListener, addListener, checkBits, checkParent, checkWidget, dispose, error, filters, getData, getData, getName, getNameText, getStyle, hooks, isListening, isValidSubclass, isValidThread, mbcsToWcs, mbcsToWcs, notifyListeners, postEvent, postEvent, releaseChild, releaseResources, removeDisposeListener, removeListener, removeListener, sendEvent, sendEvent, sendEvent, sendEvent, setData, setData, setInputState, setKeyState, toString, wcsToMbcs, wcsToMbcs |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
int hAnchor
TreeItem[] items
ImageList imageList
boolean dragStarted
boolean ignoreSelect
boolean ignoreExpand
boolean ignoreDeselect
boolean customDraw
static final int TreeProc
static final org.eclipse.swt.internal.win32.TCHAR TreeClass
Constructor Detail |
public Tree(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 composite control which will be the parent of the new instance (cannot be null)style
- the style of control to constructSWT.SINGLE
,
SWT.MULTI
,
SWT.CHECK
,
Widget.checkSubclass()
,
Widget.getStyle()
Method Detail |
public void addSelectionListener(SelectionListener listener)
SelectionListener
interface.
When widgetSelected
is called, the item field of the event object is valid.
If the reciever has SWT.CHECK
style set and the check selection changes,
the event object detail field contains the value SWT.CHECK
.
widgetDefaultSelected
is typically called when an item is double-clicked.
The item field of the event object is valid for default selection, but the detail field is not used.
listener
- the listener which should be notifiedSelectionListener
,
removeSelectionListener(org.eclipse.swt.events.SelectionListener)
,
SelectionEvent
public void addTreeListener(TreeListener listener)
TreeListener
interface.
listener
- the listener which should be notifiedTreeListener
,
removeTreeListener(org.eclipse.swt.events.TreeListener)
int callWindowProc(int msg, int wParam, int lParam)
callWindowProc
in class Scrollable
static int checkStyle(int style)
public Point computeSize(int wHint, int hHint, boolean changed)
computeSize
in class Composite
wHint
- the width hint (can be SWT.DEFAULT
)hHint
- the height hint (can be SWT.DEFAULT
)changed
- true
if the control's contents have changed, and false
otherwise
Layout
,
Control.getBorderWidth()
,
Control.getBounds()
,
Control.getSize()
,
Control.pack()
,
"computeTrim, getClientArea for controls that implement them"void createHandle()
createHandle
in class Composite
void createItem(TreeItem item, int hParent, int hInsertAfter)
void createWidget()
createWidget
in class Scrollable
int defaultBackground()
defaultBackground
in class Control
public void deselectAll()
void destroyItem(TreeItem item)
int getBackgroundPixel()
getBackgroundPixel
in class Control
int getForegroundPixel()
getForegroundPixel
in class Control
public TreeItem getItem(Point point)
point
- the point used to locate the item
public int getItemCount()
public int getItemHeight()
public TreeItem[] getItems()
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.
public TreeItem getParentItem()
TreeItem
or null when the receiver is a
root.
public TreeItem[] getSelection()
TreeItem
s that are currently
selected in the receiver. An empty array indicates that no
items are selected.
Note: This is not the actual structure used by the receiver to maintain its selection, so modifying the array will not affect the receiver.
public int getSelectionCount()
public TreeItem getTopItem()
int imageIndex(Image image)
boolean releaseItem(TreeItem item, org.eclipse.swt.internal.win32.TVITEM tvItem)
void releaseItems(TreeItem[] nodes, org.eclipse.swt.internal.win32.TVITEM tvItem)
void releaseWidget()
releaseWidget
in class Composite
public void removeAll()
public void removeSelectionListener(SelectionListener listener)
listener
- the listener which should no longer be notifiedSelectionListener
,
addSelectionListener(org.eclipse.swt.events.SelectionListener)
public void removeTreeListener(TreeListener listener)
listener
- the listener which should no longer be notifiedTreeListener
,
addTreeListener(org.eclipse.swt.events.TreeListener)
public void setInsertMark(TreeItem item, boolean before)
item
- the insert item. Null will clear the insertion mark.public void selectAll()
void setBackgroundPixel(int pixel)
setBackgroundPixel
in class Control
void setBounds(int x, int y, int width, int height, int flags)
setBounds
in class Control
void setCheckboxImageList()
void setForegroundPixel(int pixel)
setForegroundPixel
in class Control
public void setRedraw(boolean redraw)
setRedraw
in class Control
redraw
- the new redraw stateControl.redraw()
,
Control.update()
public void setSelection(TreeItem[] items)
items
- the array of itemsdeselectAll()
public void setTopItem(TreeItem item)
item
- the item to be showngetTopItem()
void showItem(int hItem)
public void showItem(TreeItem item)
item
- the item to be shownshowSelection()
public void showSelection()
showItem(TreeItem)
String toolTipText(org.eclipse.swt.internal.win32.NMTTDISPINFO hdr)
toolTipText
in class Composite
int widgetStyle()
widgetStyle
in class Composite
org.eclipse.swt.internal.win32.TCHAR windowClass()
windowClass
in class Scrollable
int windowProc()
windowProc
in class Scrollable
org.eclipse.swt.internal.win32.LRESULT WM_CHAR(int wParam, int lParam)
WM_CHAR
in class Control
org.eclipse.swt.internal.win32.LRESULT WM_GETOBJECT(int wParam, int lParam)
WM_GETOBJECT
in class Control
org.eclipse.swt.internal.win32.LRESULT WM_KEYDOWN(int wParam, int lParam)
WM_KEYDOWN
in class Control
org.eclipse.swt.internal.win32.LRESULT WM_KILLFOCUS(int wParam, int lParam)
WM_KILLFOCUS
in class Control
org.eclipse.swt.internal.win32.LRESULT WM_LBUTTONDOWN(int wParam, int lParam)
WM_LBUTTONDOWN
in class Composite
org.eclipse.swt.internal.win32.LRESULT WM_RBUTTONDOWN(int wParam, int lParam)
WM_RBUTTONDOWN
in class Control
org.eclipse.swt.internal.win32.LRESULT WM_SETFOCUS(int wParam, int lParam)
WM_SETFOCUS
in class Control
org.eclipse.swt.internal.win32.LRESULT WM_SYSCOLORCHANGE(int wParam, int lParam)
WM_SYSCOLORCHANGE
in class Composite
org.eclipse.swt.internal.win32.LRESULT wmNotifyChild(int wParam, int lParam)
wmNotifyChild
in class Control
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |