|
|||||||||||
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.Table
Safe:
Field Summary | |
(package private) TableColumn[] |
columns
|
(package private) boolean |
customDraw
|
(package private) boolean |
dragStarted
|
(package private) boolean |
ignoreResize
|
(package private) boolean |
ignoreSelect
|
(package private) ImageList |
imageList
|
(package private) TableItem[] |
items
|
(package private) boolean |
mouseDown
|
(package private) static org.eclipse.swt.internal.win32.TCHAR |
TableClass
|
(package private) static int |
TableProc
|
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 | |
Table(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. |
(package private) int |
callWindowProc(int msg,
int wParam,
int lParam)
|
(package private) static int |
checkStyle(int style)
|
protected void |
checkSubclass()
Checks that this class can be subclassed. |
Point |
computeSize(int wHint,
int hHint,
boolean changed)
Enabled: |
(package private) void |
createHandle()
|
(package private) void |
createItem(TableColumn column,
int index)
|
(package private) void |
createItem(TableItem item,
int index)
|
(package private) void |
createWidget()
|
(package private) int |
defaultBackground()
|
void |
deselect(int index)
Enabled: Deselects the item at the given zero-relative index in the receiver. |
void |
deselect(int[] indices)
Enabled: Deselects the items at the given zero-relative indices in the receiver. |
void |
deselect(int start,
int end)
Enabled: Deselects the items at the given zero-relative indices in the receiver. |
void |
deselectAll()
Enabled: Deselects all selected items in the receiver. |
(package private) void |
destroyItem(TableColumn column)
|
(package private) void |
destroyItem(TableItem item)
|
(package private) void |
fixCheckboxImageList()
|
(package private) int |
getBackgroundPixel()
|
TableColumn |
getColumn(int index)
Enabled: Returns the column at the given, zero-relative index in the receiver. |
int |
getColumnCount()
Enabled: Returns the number of columns contained in the receiver. |
TableColumn[] |
getColumns()
Enabled: Returns an array of TableColumn s which are the
columns in the receiver. |
(package private) int |
getFocusIndex()
|
(package private) int |
getForegroundPixel()
|
int |
getGridLineWidth()
Enabled: Returns the width in pixels of a grid line. |
int |
getHeaderHeight()
Enabled: Returns the height of the receiver's header |
boolean |
getHeaderVisible()
Enabled: Returns true if the receiver's header is visible,
and false otherwise. |
TableItem |
getItem(int index)
Enabled: Returns the item at the given, zero-relative index in the receiver. |
TableItem |
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. |
int |
getItemHeight()
Enabled: Returns the height of the area which would be used to display one of the items in the receiver's. |
TableItem[] |
getItems()
Enabled: Returns an array of TableItem s which are the items
in the receiver. |
boolean |
getLinesVisible()
Enabled: Returns true if the receiver's lines are visible,
and false otherwise. |
TableItem[] |
getSelection()
Enabled: Returns an array of TableItem s that are currently
selected in the receiver. |
int |
getSelectionCount()
Enabled: Returns the number of selected items contained in the receiver. |
int |
getSelectionIndex()
Enabled: Returns the zero-relative index of the item which is currently selected in the receiver, or -1 if no item is selected. |
int[] |
getSelectionIndices()
Enabled: Returns the zero-relative indices of the items which are currently selected in the receiver. |
int |
getTopIndex()
Enabled: Returns the zero-relative index of the item which is currently at the top of the receiver. |
(package private) int |
imageIndex(Image image)
|
int |
indexOf(TableColumn column)
Enabled: 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. |
int |
indexOf(TableItem item)
Enabled: 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. |
boolean |
isSelected(int index)
Enabled: Returns true if the item is selected,
and false otherwise. |
(package private) void |
releaseWidget()
|
void |
remove(int index)
Enabled: Removes the item from the receiver at the given zero-relative index. |
void |
remove(int[] indices)
Enabled: Removes the items from the receiver's list at the given zero-relative indices. |
void |
remove(int start,
int end)
Enabled: Removes the items from the receiver which are between the given zero-relative start and end indices (inclusive). |
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 |
select(int index)
Enabled: Selects the item at the given zero-relative index in the receiver. |
void |
select(int[] indices)
Enabled: Selects the items at the given zero-relative indices in the receiver. |
void |
select(int start,
int end)
Enabled: Selects the items at the given zero-relative indices in the receiver. |
void |
selectAll()
Enabled: Selects all the items in the receiver. |
(package private) org.eclipse.swt.internal.win32.LRESULT |
sendMouseDownEvent(int type,
int button,
int msg,
int wParam,
int lParam)
|
(package private) void |
setBackgroundPixel(int pixel)
|
(package private) void |
setCheckboxImageList(int width,
int height)
|
(package private) void |
setCheckboxImageListColor()
|
(package private) void |
setFocusIndex(int index)
|
void |
setFont(Font font)
Enabled: |
(package private) void |
setForegroundPixel(int pixel)
|
void |
setHeaderVisible(boolean show)
Enabled: Marks the receiver's header as visible if the argument is true ,
and marks it invisible otherwise. |
void |
setLinesVisible(boolean show)
Enabled: Marks the receiver's lines as visible if the argument is true ,
and marks it invisible otherwise. |
void |
setRedraw(boolean redraw)
Enabled: |
(package private) void |
setRowHeight()
|
(package private) void |
setScrollWidth()
|
void |
setSelection(int index)
Enabled: Selects the item at the given zero-relative index in the receiver. |
void |
setSelection(int[] indices)
Enabled: Selects the items at the given zero-relative indices in the receiver. |
void |
setSelection(int start,
int end)
Enabled: Selects the items at the given zero-relative indices in the receiver. |
void |
setSelection(TableItem[] items)
Enabled: Sets the receiver's selection to be the given array of items. |
void |
setTopIndex(int index)
Enabled: Sets the zero-relative index of the item which is currently at the top of the receiver. |
(package private) void |
showItem(int index)
|
void |
showItem(TableItem item)
Enabled: Shows the item. |
void |
showSelection()
Enabled: Shows the selection. |
(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_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_LBUTTONDBLCLK(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_LBUTTONUP(int wParam,
int lParam)
|
(package private) org.eclipse.swt.internal.win32.LRESULT |
WM_MOUSEHOVER(int wParam,
int lParam)
|
(package private) org.eclipse.swt.internal.win32.LRESULT |
WM_NOTIFY(int wParam,
int lParam)
|
(package private) org.eclipse.swt.internal.win32.LRESULT |
WM_RBUTTONDBLCLK(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_SIZE(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, computeTabList, getChildren, getChildrenCount, getLayout, getTabList, hooksKeys, layout, layout, minimumSize, moveAbove, moveBelow, releaseChildren, resizeChildren, resizeChildren, setFocus, setLayout, setResizeChildren, setTabGroupFocus, setTabItemFocus, setTabList, toolTipText, translateMnemonic, updateFont, WM_ERASEBKGND, WM_GETDLGCODE, WM_GETFONT, WM_PAINT, WM_SETFONT, 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 |
TableItem[] items
TableColumn[] columns
ImageList imageList
boolean ignoreSelect
boolean dragStarted
boolean ignoreResize
boolean mouseDown
boolean customDraw
static final int TableProc
static final org.eclipse.swt.internal.win32.TCHAR TableClass
Constructor Detail |
public Table(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
,
SWT.FULL_SELECTION
,
SWT.HIDE_SELECTION
,
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
int callWindowProc(int msg, int wParam, int lParam)
callWindowProc
in class Scrollable
static int checkStyle(int style)
protected void checkSubclass()
Widget
The SWT class library is intended to be subclassed
only at specific, controlled points (most notably,
Composite
and Canvas
when
implementing new widgets). This method enforces this
rule unless it is overridden.
IMPORTANT: By providing an implementation of this method that allows a subclass of a class which does not normally allow subclassing to be created, the implementer agrees to be fully responsible for the fact that any such subclass will likely fail between SWT releases and will be strongly platform specific. No support is provided for user-written classes which are implemented in this fashion.
The ability to subclass outside of the allowed SWT classes is intended purely to enable those not on the SWT development team to implement patches in order to get around specific limitations in advance of when those limitations can be addressed by the team. Subclassing should not be attempted without an intimate and detailed understanding of the hierarchy.
checkSubclass
in class Composite
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(TableColumn column, int index)
void createItem(TableItem item, int index)
void createWidget()
createWidget
in class Scrollable
int defaultBackground()
defaultBackground
in class Control
public void deselect(int[] indices)
indices
- the array of indices for the items to deselectpublic void deselect(int index)
index
- the index of the item to deselectpublic void deselect(int start, int end)
start
- the start index of the items to deselectend
- the end index of the items to deselectpublic void deselectAll()
void destroyItem(TableColumn column)
void destroyItem(TableItem item)
void fixCheckboxImageList()
int getBackgroundPixel()
getBackgroundPixel
in class Control
public TableColumn getColumn(int index)
TableColumn
s were created by the programmer,
this method will throw ERROR_INVALID_RANGE
despite
the fact that a single column of data may be visible in the table.
This occurs when the programmer uses the table like a list, adding
items but never creating a column.
index
- the index of the column to return
public int getColumnCount()
TableColumn
s were created by the programmer,
this value is zero, despite the fact that visually, one column
of items is may be visible. This occurs when the programmer uses
the table like a list, adding items but never creating a column.
public TableColumn[] getColumns()
TableColumn
s which are the
columns in the receiver. If no TableColumn
s were
created by the programmer, the array is empty, despite the fact
that visually, one column of items may be visible. This occurs
when the programmer uses the table like a list, adding items but
never creating a column.
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.
int getFocusIndex()
int getForegroundPixel()
getForegroundPixel
in class Control
public int getGridLineWidth()
public int getHeaderHeight()
public boolean getHeaderVisible()
true
if the receiver's header is visible,
and false
otherwise.
If one of the receiver's ancestors is not visible or some other condition makes the receiver not visible, this method may still indicate that it is considered visible even though it may not actually be showing.
public TableItem getItem(int index)
index
- the index of the item to return
public TableItem getItem(Point point)
point
- the point used to locate the item
public int getItemCount()
public int getItemHeight()
public TableItem[] getItems()
TableItem
s which are the items
in the receiver.
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 boolean getLinesVisible()
true
if the receiver's lines are visible,
and false
otherwise.
If one of the receiver's ancestors is not visible or some other condition makes the receiver not visible, this method may still indicate that it is considered visible even though it may not actually be showing.
public TableItem[] getSelection()
TableItem
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 int getSelectionIndex()
public int[] getSelectionIndices()
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 getTopIndex()
int imageIndex(Image image)
public int indexOf(TableColumn column)
column
- the search column
public int indexOf(TableItem item)
item
- the search item
public boolean isSelected(int index)
true
if the item is selected,
and false
otherwise. Indices out of
range are ignored.
index
- the index of the item
void releaseWidget()
releaseWidget
in class Composite
public void remove(int[] indices)
indices
- the array of indices of the itemspublic void remove(int index)
index
- the index for the itempublic void remove(int start, int end)
start
- the start of the rangeend
- the end of the rangepublic void removeAll()
public void removeSelectionListener(SelectionListener listener)
listener
- the listener which should no longer be notifiedSelectionListener
,
addSelectionListener(org.eclipse.swt.events.SelectionListener)
public void select(int[] indices)
indices
- the array of indices for the items to selectpublic void select(int index)
index
- the index of the item to selectpublic void select(int start, int end)
start
- the start of the rangeend
- the end of the rangepublic void selectAll()
org.eclipse.swt.internal.win32.LRESULT sendMouseDownEvent(int type, int button, int msg, int wParam, int lParam)
void setBackgroundPixel(int pixel)
setBackgroundPixel
in class Control
void setCheckboxImageListColor()
void setCheckboxImageList(int width, int height)
void setFocusIndex(int index)
public void setFont(Font font)
setFont
in class Control
font
- the new font (or null)void setForegroundPixel(int pixel)
setForegroundPixel
in class Control
public void setHeaderVisible(boolean show)
true
,
and marks it invisible otherwise.
If one of the receiver's ancestors is not visible or some other condition makes the receiver not visible, marking it visible may not actually cause it to be displayed.
public void setLinesVisible(boolean show)
true
,
and marks it invisible otherwise.
If one of the receiver's ancestors is not visible or some other condition makes the receiver not visible, marking it visible may not actually cause it to be displayed.
public void setRedraw(boolean redraw)
setRedraw
in class Control
redraw
- the new redraw stateControl.redraw()
,
Control.update()
void setRowHeight()
void setScrollWidth()
public void setSelection(int[] indices)
indices
- the indices of the items to selectdeselectAll()
,
select(int[])
public void setSelection(TableItem[] items)
items
- the array of itemsdeselectAll()
,
select(int)
public void setSelection(int index)
index
- the index of the item to selectdeselectAll()
,
select(int)
public void setSelection(int start, int end)
start
- the start index of the items to selectend
- the end index of the items to selectdeselectAll()
,
select(int,int)
public void setTopIndex(int index)
index
- the index of the top itemvoid showItem(int index)
public void showItem(TableItem item)
item
- the item to be shownshowSelection()
public void showSelection()
showItem(TableItem)
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_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_LBUTTONDBLCLK(int wParam, int lParam)
WM_LBUTTONDBLCLK
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_LBUTTONUP(int wParam, int lParam)
WM_LBUTTONUP
in class Control
org.eclipse.swt.internal.win32.LRESULT WM_MOUSEHOVER(int wParam, int lParam)
WM_MOUSEHOVER
in class Control
org.eclipse.swt.internal.win32.LRESULT WM_NOTIFY(int wParam, int lParam)
WM_NOTIFY
in class Composite
org.eclipse.swt.internal.win32.LRESULT WM_RBUTTONDBLCLK(int wParam, int lParam)
WM_RBUTTONDBLCLK
in class Control
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_SIZE(int wParam, int lParam)
WM_SIZE
in class Composite
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 |