Introducing List and List Styles : List « SWT « Java Tutorial






List boxes display lists of strings and allow users to select one or more of them.

StyleEffect
SWT.BORDERDraws a border around this List.
SWT.SINGLECreates a List that allows selection of only one item at a time. This is the default.
SWT.MULTICreates a List that allows selection of multiple items at a time. You may specify only one of SWT.SINGLE or SWT.MULTI.
SWT.H_SCROLLCreates a horizontal scrollbar to scroll this List.
SWT.V_SCROLLCreates a vertical scrollbar to scroll this List.










17.23.List
17.23.1.Introducing List and List Styles
17.23.2.Create a single-selection list and add itemsCreate a single-selection list and add items
17.23.3.List Item Single SelectionList Item Single Selection
17.23.4.Create a multiple-selection listCreate a multiple-selection list
17.23.5.Create a List with a vertical ScrollBar and Add a bunch of items to itCreate a List with a vertical ScrollBar and Add a bunch of items to it
17.23.6.Setting Items: Add the items all at onceSetting Items: Add the items all at once
17.23.7.Make List Scroll to the bottomMake List Scroll to the bottom
17.23.8.Show the selection value by using ScrollBarShow the selection value by using ScrollBar
17.23.9.Select a rangeSelect a range
17.23.10.Copying Lists: public static void copy(List dest, List src)
17.23.11.Multiple-Copy Collections
17.23.12.Reversing Lists: public static void reverse(List list)
17.23.13.public static void fill(List list, Object element): method copies the same object reference to every element of the list
17.23.14.Shuffling Lists: randomly reorder the elements of a list
17.23.15.Sorting Lists: reordering the elements of a List