org.eclipse.swt.widgets.Table

Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html

Contributors: IBM Corporation - initial API and implementation Port to the D programming language: Frank Benoit <benoit@tionex.de>

Members

Classes

Table
class Table

Instances of this class implement a selectable user interface object that displays a list of images and strings and issues notification when selected. <p> The item children that may be added to instances of this class must be of type <code>TableItem</code>. </p><p> Style <code>VIRTUAL</code> is used to create a <code>Table</code> whose <code>TableItem</code>s are to be populated by the client on an on-demand basis instead of up-front. This can provide significant performance improvements for tables that are very large or for which <code>TableItem</code> population is expensive (for example, retrieving values from an external source). </p><p> Here is an example of using a <code>Table</code> with style <code>VIRTUAL</code>: <code><pre> final Table table = new Table (parent, SWT.VIRTUAL | SWT.BORDER); table.setItemCount (1000000); table.addListener (SWT.SetData, new Listener () { public void handleEvent (Event event) { TableItem item = (TableItem) event.item; int index = table.indexOf (item); item.setText ("Item " + index); System.out.println (item.getText ()); } }); </pre></code> </p><p> Note that although this class is a subclass of <code>Composite</code>, it does not normally make sense to add <code>Control</code> children to it, or set a layout on it, unless implementing something like a cell editor. </p><p> <dl> <dt><b>Styles:</b></dt> <dd>SINGLE, MULTI, CHECK, FULL_SELECTION, HIDE_SELECTION, VIRTUAL, NO_SCROLL</dd> <dt><b>Events:</b></dt> <dd>Selection, DefaultSelection, SetData, MeasureItem, EraseItem, PaintItem</dd> </dl> </p><p> Note: Only one of the styles SINGLE, and MULTI may be specified. </p><p> IMPORTANT: This class is <em>not</em> intended to be subclassed. </p>

Meta