## SwingOSC – Java-based GUI classes

This class is meant as an emulation of SCListView. last mod: 16-Jan-08 sciss
Also refer to JSCView for different behaviour affecting all widgets

different behaviour
colors | default background is white, cannot have alpha < 1.0
extended functionality
allowsDeselection | can be set to 'true' to allow complete deselection (value is nil)

# JSCListView

Note: please use the abstraction layer GUI.listView if possible! (see GUI)

The list view displays a top-down list of text `items`. When there are more items than fit into the bounding box, a vertical scrollbar is displayed. The `value` of the gadget reflects the selected item's index. For similar functionality in a collapsed view, see JSCPopUpMenu.

    (
        var items;
        w = JSCWindow( "JSCListView", Rect( 200, 200, 200, 120 ));
        items = [
            "absolute","relative",
            "absolute","relative",
            "absolute","relative",
            "absolute","relative",
            "absolute","relative",
            "absolute","relative",
            "absolute","relative",
            "absolute","relative",
            "absolute","relative"
            ];
        v = JSCListView( w, w.view.bounds.insetBy( 8, 8 ));
        v.resize = 5;  // elastic
        v.items = items;
        v.background_(Color.white);
        v.action = { arg butt;
            [ butt.value, butt.items.at( butt.value )].postcs;  // .value returns the integer
        };
        v.enterKeyAction = {
            "Hossa!".postln;
        };
        w.front;
    )

    v.value = 16.rand;
    v.valueAction = 16.rand;
    v.enabled = false;
    v.visible = false;
    v.visible = true;
    v.enabled = true;

### default keyboard mappings

`space bar` | select next item
`csr up/down` | decrease/increase selected item (look-and-feel dependant)
`csr left` | decrease selected item
`A ... Z` | select item beginning with typed letter
`return` | evaluate custom enterKeyAction (if assigned)
`csr right` | evaluate custom enterKeyAction (if assigned)