|
|||||||||||
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.custom.TableTree
Safe:
Field Summary | |
(package private) static Image[] |
EMPTY_IMAGES
|
(package private) static TableTreeItem[] |
EMPTY_ITEMS
|
(package private) static String[] |
EMPTY_TEXTS
|
(package private) boolean |
inDispose
|
(package private) static String |
ITEMID
|
(package private) TableTreeItem[] |
items
|
(package private) Image |
minusImage
|
(package private) Image |
plusImage
|
(package private) Image |
sizeImage
|
(package private) Table |
table
|
Fields inherited from class org.eclipse.swt.widgets.Composite |
|
Fields inherited from class org.eclipse.swt.widgets.Scrollable |
|
Fields inherited from class org.eclipse.swt.widgets.Control |
handle |
Fields inherited from class org.eclipse.swt.widgets.Widget |
|
Constructor Summary | |
TableTree(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 | |
(package private) int |
addItem(TableTreeItem item,
int index)
|
void |
addSelectionListener(SelectionListener listener)
Suppressed: 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 receive tree events. |
Point |
computeSize(int wHint,
int hHint,
boolean changed)
Enabled: |
Rectangle |
computeTrim(int x,
int y,
int width,
int height)
Enabled: |
(package private) void |
createImages()
|
void |
deselectAll()
Enabled: Deselects all items. |
(package private) void |
expandItem(TableTreeItem item)
|
Color |
getBackground()
Enabled: |
Rectangle |
getClientArea()
Enabled: |
Font |
getFont()
Enabled: |
Color |
getForeground()
Enabled: |
TableTreeItem |
getItem(Point point)
Enabled: Returns the item at the given point in the receiver or null if no such item exists. |
(package private) TableTreeItem |
getItem(TableItem tableItem)
|
int |
getItemCount()
Enabled: Gets the number of items. |
int |
getItemHeight()
Enabled: Gets the height of one item. |
TableTreeItem[] |
getItems()
Enabled: Gets the items. |
(package private) Image |
getMinusImage()
|
(package private) Image |
getPlusImage()
|
TableTreeItem[] |
getSelection()
Enabled: Gets the selected items. |
int |
getSelectionCount()
Enabled: Gets the number of selected items. |
int |
getStyle()
Enabled: |
Table |
getTable()
Enabled: Returns the underlying Table control. |
int |
indexOf(TableTreeItem item)
Enabled: Gets the index of an item. |
(package private) void |
onDispose(Event e)
|
(package private) void |
onFocusIn(Event e)
|
(package private) void |
onKeyDown(Event e)
|
(package private) void |
onMouseDown(Event event)
|
(package private) void |
onResize(Event e)
|
(package private) void |
onSelection(Event e)
|
void |
removeAll()
Enabled: Removes all items. |
(package private) void |
removeItem(TableTreeItem item)
|
void |
removeSelectionListener(SelectionListener listener)
Enabled: Removes the listener. |
void |
removeTreeListener(TreeListener listener)
Enabled: Removes the listener. |
void |
selectAll()
Enabled: Selects all items. |
void |
setBackground(Color color)
Enabled: |
void |
setEnabled(boolean enabled)
Enabled: |
void |
setFont(Font font)
Enabled: |
void |
setForeground(Color color)
Enabled: |
void |
setMenu(Menu menu)
Enabled: |
void |
setSelection(TableTreeItem[] items)
Enabled: Sets the selection. |
void |
setToolTipText(String string)
Enabled: |
void |
showItem(TableTreeItem item)
Enabled: Shows the item. |
void |
showSelection()
Enabled: Shows the selection. |
Methods inherited from class org.eclipse.swt.widgets.Composite |
checkSubclass, getChildren, getLayout, getTabList, layout, layout, moveAbove, moveBelow, setFocus, setLayout, setTabList |
Methods inherited from class org.eclipse.swt.widgets.Scrollable |
getHorizontalBar, getVerticalBar |
Methods inherited from class org.eclipse.swt.widgets.Widget |
addDisposeListener, addListener, checkWidget, dispose, getData, getData, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, setData, setData, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
Table table
TableTreeItem[] items
Image plusImage
Image minusImage
Image sizeImage
boolean inDispose
static final TableTreeItem[] EMPTY_ITEMS
static final String[] EMPTY_TEXTS
static final Image[] EMPTY_IMAGES
static final String ITEMID
Constructor Detail |
public TableTree(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 constructSWT.SINGLE
,
SWT.MULTI
,
SWT.CHECK
,
SWT.FULL_SELECTION
,
getStyle()
Method Detail |
int addItem(TableTreeItem item, int index)
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)
listener
- the tree listenerpublic 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"public Rectangle computeTrim(int x, int y, int width, int height)
computeTrim
in class Scrollable
Scrollable.getClientArea()
public void deselectAll()
If an item is selected, it is deselected. If an item is not selected, it remains unselected.
void expandItem(TableTreeItem item)
public Color getBackground()
getBackground
in class Control
public Rectangle getClientArea()
getClientArea
in class Scrollable
Scrollable.computeTrim(int, int, int, int)
public Color getForeground()
getForeground
in class Control
public Font getFont()
getFont
in class Control
public int getItemCount()
public int getItemHeight()
This operation will fail if the height of one item could not be queried from the OS.
public TableTreeItem[] getItems()
public TableTreeItem[] getSelection()
This operation will fail if the selected items cannot be queried from the OS.
public int getSelectionCount()
This operation will fail if the number of selected items cannot be queried from the OS.
public int getStyle()
getStyle
in class Widget
public Table getTable()
void createImages()
Image getPlusImage()
Image getMinusImage()
public int indexOf(TableTreeItem item)
The widget is searched starting at 0 until an item is found that is equal to the search item. If no item is found, -1 is returned. Indexing is zero based. This index is relative to the parent only.
item
- the search item
void onDispose(Event e)
void onResize(Event e)
void onSelection(Event e)
public TableTreeItem getItem(Point point)
point
- the point used to locate the item
TableTreeItem getItem(TableItem tableItem)
void onFocusIn(Event e)
void onKeyDown(Event e)
void onMouseDown(Event event)
public void removeAll()
This operation will fail when an item could not be removed in the OS.
void removeItem(TableTreeItem item)
public void removeSelectionListener(SelectionListener listener)
listener
- the listenerpublic void removeTreeListener(TreeListener listener)
listener
- the listenerpublic void selectAll()
If an item is not selected, it is selected. If an item is selected, it remains selected.
public void setBackground(Color color)
setBackground
in class Control
color
- the new color (or null)public void setEnabled(boolean enabled)
setEnabled
in class Control
enabled
- the new enabled statepublic void setFont(Font font)
setFont
in class Control
font
- the new font (or null)public void setForeground(Color color)
setForeground
in class Control
color
- the new color (or null)public void setMenu(Menu menu)
setMenu
in class Control
menu
- the new pop up menupublic void setSelection(TableTreeItem[] items)
items
- new selectionpublic void setToolTipText(String string)
setToolTipText
in class Control
string
- the new tool tip text (or null)public void showItem(TableTreeItem item)
item
- the item to be shownpublic void showSelection()
If there is no selection or the selection is already visible, this method does nothing. If the selection is scrolled out of view, the top index of the widget is changed such that selection becomes visible.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |