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:
ACCENTS, accessible, background, drawCount, foreground, handle, hCursor, layoutData, menu, parent, toolTipText
CANVAS, COMCTL32_MAJOR, COMCTL32_MINOR, data, DEFAULT_HEIGHT, DEFAULT_WIDTH, DISABLED, DISPOSED, eventTable, HIDDEN, keys, MAJOR, MINOR, Mnemonic, state, style, values
Table(Composite parent,
int style)
void
addSelectionListener(SelectionListener listener)
SelectionListener
interface.
void
deselect(int index)
void
deselect(int[] indices)
void
deselect(int start,
int end)
TableColumn
getColumn(int index)
TableColumn[]
getColumns()
TableColumns which are the
columns in the receiver.
boolean
getHeaderVisible()
true if the receiver's header is visible,
and false otherwise.
TableItem
getItem(int index)
TableItem
getItem(Point point)
int
getItemHeight()
boolean
getLinesVisible()
true if the receiver's lines are visible,
and false otherwise.
TableItem[]
getSelection()
TableItems that are currently
selected in the receiver.
int
getSelectionIndex()
int[]
getSelectionIndices()
int
getTopIndex()
int
indexOf(TableColumn column)
int
indexOf(TableItem item)
void
remove(int index)
void
remove(int[] indices)
void
remove(int start,
int end)
void
removeSelectionListener(SelectionListener listener)
void
select(int[] indices)
void
select(int start,
int end)
(package private) org.eclipse.swt.internal.win32.LRESULT
sendMouseDownEvent(int type,
int button,
int msg,
int wParam,
int lParam)
void
setHeaderVisible(boolean show)
true,
and marks it invisible otherwise.
void
setLinesVisible(boolean show)
true,
and marks it invisible otherwise.
void
setSelection(int index)
void
setSelection(int[] indices)
void
setSelection(int start,
int end)
void
setSelection(TableItem[] items)
void
setTopIndex(int index)
_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
computeTrim, createScrollBar, getClientArea, getHorizontalBar, getVerticalBar, widgetExtStyle, WM_HSCROLL, WM_MOUSEWHEEL, WM_VSCROLL, wmScroll
addControlListener, addFocusListener, addHelpListener, addKeyListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addPaintListener, addTraverseListener, checkOrientation, computeSize, computeTabGroup, computeTabRoot, defaultFont, defaultForeground, deregister, destroyWidget, drawBackground, drawBackground, findBrush, findCursor, findMnemonic, fixFocus, forceFocus, forceResize, getAccessible, getBackground, getBorderWidth, getBounds, getCodePage, getDisplay, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getParent, getPath, getShell, getSize, getToolTipText, getVisible, hasCursor, hasFocus, internal_dispose_GC, internal_new_GC, isActive, isDisposed, isEnabled, isFocusAncestor, isFocusControl, isReparentable, isShowing, isTabGroup, isTabItem, isVisible, menuShell, mnemonicHit, mnemonicMatch, moveAbove, moveBelow, new_Accessible, pack, pack, redraw, redraw, register, releaseHandle, removeControlListener, removeFocusListener, removeHelpListener, removeKeyListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removePaintListener, removeTraverseListener, sendKeyEvent, sendKeyEvent, sendMouseEvent, sendMouseEvent, setBackground, setBounds, setBounds, setBounds, setCapture, setCursor, setDefaultFont, setEnabled, setForeground, setLayoutData, setLocation, setLocation, setMenu, setParent, setRadioFocus, setRadioSelection, setSavedFocus, setSize, setSize, setToolTipText, setVisible, sort, subclass, toControl, toControl, toDisplay, toDisplay, transferActive, transferFocus, translateAccelerator, translateMnemonic, translateTraversal, traverse, traverse, traverseEscape, traverseGroup, traverseItem, traverseMnemonic, traversePage, traverseReturn, unsubclass, update, update, windowProc, WM_ACTIVATE, WM_CHAR, WM_CLEAR, WM_CLOSE, WM_COMMAND, WM_CONTEXTMENU, WM_CTLCOLOR, WM_CUT, WM_DESTROY, WM_DRAWITEM, WM_ENDSESSION, WM_HELP, WM_HOTKEY, WM_IME_CHAR, WM_IME_COMPOSITION, WM_INITMENUPOPUP, WM_KEYUP, WM_KILLFOCUS, WM_MBUTTONDBLCLK, WM_MBUTTONDOWN, WM_MBUTTONUP, WM_MEASUREITEM, WM_MENUCHAR, WM_MENUSELECT, WM_MOUSEACTIVATE, WM_MOUSELEAVE, WM_MOUSEMOVE, WM_MOVE, WM_NCACTIVATE, WM_NCCALCSIZE, WM_NCHITTEST, WM_PALETTECHANGED, WM_PASTE, WM_PRINTCLIENT, WM_QUERYENDSESSION, WM_QUERYNEWPALETTE, WM_QUERYOPEN, WM_RBUTTONUP, WM_SETCURSOR, WM_SETREDRAW, WM_SETTINGCHANGE, WM_SHOWWINDOW, WM_SYSCHAR, WM_SYSKEYDOWN, WM_SYSKEYUP, WM_TIMER, WM_UNDO, WM_WINDOWPOSCHANGING, wmColorChild, wmCommandChild, wmDrawChild, wmMeasureChild, wmScrollChild
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
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
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()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),
SelectionEventint callWindowProc(int msg, int wParam, int lParam)
callWindowProc in class Scrollablestatic 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 Compositepublic Point computeSize(int wHint, int hHint, boolean changed)
computeSize in class CompositewHint - 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 Compositevoid createItem(TableColumn column, int index)
void createItem(TableItem item, int index)
void createWidget()
createWidget in class Scrollableint defaultBackground()
defaultBackground in class Controlpublic 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 Controlpublic TableColumn getColumn(int index)
TableColumns 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()
TableColumns 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()
TableColumns which are the
columns in the receiver. If no TableColumns 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 Controlpublic 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()
TableItems 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()
TableItems 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 Compositepublic 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 Controlvoid setCheckboxImageListColor()
void setCheckboxImageList(int width, int height)
void setFocusIndex(int index)
public void setFont(Font font)
void setForegroundPixel(int pixel)
setForegroundPixel in class Controlpublic 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)
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 Compositeorg.eclipse.swt.internal.win32.TCHAR windowClass()
windowClass in class Scrollableint windowProc()
windowProc in class Scrollableorg.eclipse.swt.internal.win32.LRESULT WM_GETOBJECT(int wParam, int lParam)
WM_GETOBJECT in class Controlorg.eclipse.swt.internal.win32.LRESULT WM_KEYDOWN(int wParam, int lParam)
WM_KEYDOWN in class Controlorg.eclipse.swt.internal.win32.LRESULT WM_LBUTTONDBLCLK(int wParam, int lParam)
WM_LBUTTONDBLCLK in class Controlorg.eclipse.swt.internal.win32.LRESULT WM_LBUTTONDOWN(int wParam, int lParam)
WM_LBUTTONDOWN in class Compositeorg.eclipse.swt.internal.win32.LRESULT WM_LBUTTONUP(int wParam, int lParam)
WM_LBUTTONUP in class Controlorg.eclipse.swt.internal.win32.LRESULT WM_MOUSEHOVER(int wParam, int lParam)
WM_MOUSEHOVER in class Controlorg.eclipse.swt.internal.win32.LRESULT WM_NOTIFY(int wParam, int lParam)
org.eclipse.swt.internal.win32.LRESULT WM_RBUTTONDBLCLK(int wParam, int lParam)
WM_RBUTTONDBLCLK in class Controlorg.eclipse.swt.internal.win32.LRESULT WM_RBUTTONDOWN(int wParam, int lParam)
WM_RBUTTONDOWN in class Controlorg.eclipse.swt.internal.win32.LRESULT WM_SETFOCUS(int wParam, int lParam)
WM_SETFOCUS in class Controlorg.eclipse.swt.internal.win32.LRESULT WM_SIZE(int wParam, int lParam)
org.eclipse.swt.internal.win32.LRESULT WM_SYSCOLORCHANGE(int wParam, int lParam)
WM_SYSCOLORCHANGE in class Compositeorg.eclipse.swt.internal.win32.LRESULT wmNotifyChild(int wParam, int lParam)
wmNotifyChild in class Control