[Overview] [Sample] [User's Guide] [Tutorial] [Requirements] [Limitations] [API Documentation]
Some of the features of the multicolumn listbox are:
All elements within the listbox are Objects. You can put any Object into the listbox and the listbox will draw it. By default, the MultiColumnListbox will only draw the text representation of the Object that you insert. However, you can insert any Java Component as well as graphical elements into the listbox. To insert special graphical objects into the listbox, create an object that implements the Paintable interface.
When using a multi-columned listbox, you will typically create a series of columns and then, during run-time, rows of data are added, edited, and removed from the list. MultiColumnListbox encapsulates all methods required to accomplish these and other useful tasks. The listbox is easy to extend to provide additional functionality.
Every row of data in the listbox has an associated key value that you can set and query. These keys are internal to the listbox and are provided to associate cell data with other internal data structures. Since all of the keys are Objects, any class can be used as a key value to a row of data.
If you want to see how the v3.0p1 version of this Bean differs from the earlier version, see Changes in this Version.
Users use the MultiColumnListbox the same way that they use a standard system listbox. Users can select and deselect rows in the listbox with a single mouse click. Ranges of contiguous and discontiguous rows can be selected when you set the listbox to allow multiple selections (see setMultipleSelections).
To select a range of rows, first select a single row and then
select a second row while holding down the Shift key. To
add a single row to the list of selected rows, select a row while
holding down the Ctrl key (on the Windows platform) or
the key (on the Macintosh). The Shift and Ctrl
key work in combination to add an additional range of rows to the
list of rows already selected.
Where a standard listbox stops, however, the MultiColumnListbox continues in functionality. Since the listbox has multiple columns, it displays a caption bar at the top of the component, spanning the columns you have defined. Each caption labels the column and can be used to select or resize the column.
When a column is selected, the caption appears in bold. If the column is resizable, the cursor changes to indicate resizability when you move the mouse pointer over the right most edge of the caption. Holding the mouse button down and dragging left or right from this point changes the width of the column. If the column is sortable, a triangle appears next to the name when the column is selected; the direction of the triangle denotes the direction of the sort (for example, a triangle pointing down is a descending sort).
Copyright Taligent,
Inc. 1996 - 1997.
Copyright © IBM Corporation 1996 - 1997.
All Rights Reserved