Java org.eclipse.swt.widgets Tree fields, constructors, methods, implement or subclass

Example usage for Java org.eclipse.swt.widgets Tree fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.eclipse.swt.widgets Tree.

The text is from its open source code.

Constructor

Tree(Composite parent, int style)
Constructs a new instance of this class given its parent and a style value describing its behavior and appearance.

Method

voidaddKeyListener(KeyListener listener)
Adds the listener to the collection of listeners who will be notified when keys are pressed and released on the system keyboard, by sending it one of the messages defined in the KeyListener interface.
voidaddListener(int eventType, Listener listener)
Adds the listener to the collection of listeners who will be notified when an event of the given type occurs.
voidaddMouseListener(MouseListener listener)
Adds the listener to the collection of listeners who will be notified when mouse buttons are pressed and released, by sending it one of the messages defined in the MouseListener interface.
voidaddSelectionListener(SelectionListener listener)
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.
voidaddTreeListener(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.
PointcomputeSize(int wHint, int hHint)
Returns the preferred size of the receiver.
RectanglecomputeTrim(int x, int y, int width, int height)
Given a desired client area for the receiver (as described by the arguments), returns the bounding rectangle which would be required to produce that client area.
AccessiblegetAccessible()
Returns the accessible object for the receiver.
RectanglegetClientArea()
Returns a rectangle which describes the area of the receiver which is capable of displaying data (that is, not covered by the "trimmings").
TreeColumngetColumn(int index)
Returns the column at the given, zero-relative index in the receiver.
intgetColumnCount()
Returns the number of columns contained in the receiver.
int[]getColumnOrder()
Returns an array of zero-relative integers that map the creation order of the receiver's items to the order in which they are currently being displayed.
TreeColumn[]getColumns()
Returns an array of TreeColumns which are the columns in the receiver.
intgetHeaderHeight()
Returns the height of the receiver's header
TreeItemgetItem(int index)
Returns the item at the given, zero-relative index in the receiver.
TreeItemgetItem(Point point)
Returns the item at the given point in the receiver or null if no such item exists.
intgetItemCount()
Returns the number of items contained in the receiver that are direct item children of the receiver.
intgetItemHeight()
Returns the height of the area which would be used to display one of the items in the tree.
TreeItem[]getItems()
Returns a (possibly empty) array of items contained in the receiver that are direct item children of the receiver.
ObjectgetLayoutData()
Returns layout data which is associated with the receiver.
TreeItem[]getSelection()
Returns an array of TreeItems that are currently selected in the receiver.
intgetSelectionCount()
Returns the number of selected items contained in the receiver.
PointgetSize()
Returns a point describing the receiver's size.
TreeColumngetSortColumn()
Returns the column which shows the sort indicator for the receiver.
intgetSortDirection()
Returns the direction of the sort indicator for the receiver.
TreeItemgetTopItem()
Returns the item which is currently at the top of the receiver.
intindexOf(TreeItem item)
Searches the receiver's list starting at the first item (index 0) until an item is found that is equal to the argument, and returns the index of that item.
intindexOf(TreeColumn column)
Searches the receiver's list starting at the first column (index 0) until a column is found that is equal to the argument, and returns the index of that column.
booleanisDisposed()
Returns true if the widget has been disposed, and false otherwise.
voidselect(TreeItem item)
Selects an item in the receiver.
voidsetBounds(int x, int y, int width, int height)
Sets the receiver's size and location to the rectangular area specified by the arguments.
voidsetColumnOrder(int[] order)
Sets the order that the items in the receiver should be displayed in to the given argument which is described in terms of the zero-relative ordering of when the items were added.
voidsetEnabled(boolean enabled)
Enables the receiver if the argument is true, and disables it otherwise.
voidsetHeaderVisible(boolean value)
Marks the receiver's header as visible if the argument is true , and marks it invisible otherwise.
voidsetItemCount(int count)
Sets the number of root-level items contained in the receiver.
voidsetLayoutData(Object layoutData)
Sets the layout data associated with the receiver to the argument.
voidsetLinesVisible(boolean value)
Marks the receiver's lines as visible if the argument is true, and marks it invisible otherwise.
voidsetMenu(Menu menu)
Sets the receiver's pop up menu to the argument.
voidsetRedraw(boolean redraw)
If the argument is false, causes subsequent drawing operations in the receiver to be ignored.
voidsetSelection(TreeItem selection)
Sets the receiver's selection to the given item.
voidsetSelection(TreeItem[] selection)
Sets the receiver's selection to be the given array of items.
voidsetSize(int width, int height)
Sets the receiver's size to the point specified by the arguments.
voidsetSortColumn(TreeColumn column)
Sets the column used by the sort indicator for the receiver.
voidsetSortDirection(int direction)
Sets the direction of the sort indicator for the receiver.
voidshowItem(TreeItem item)
Shows the item.
PointtoControl(Point point)
Returns a point which is the result of converting the argument, which is specified in display relative coordinates, to coordinates relative to the receiver.