Module org.autogui

Class GuiSwingTableColumnCollection.TableSelectionSourceDynamicForList

java.lang.Object
org.autogui.swing.table.GuiSwingTableColumnCollection.TableSelectionSourceDynamicBase
org.autogui.swing.table.GuiSwingTableColumnCollection.TableSelectionSourceDynamicForList
All Implemented Interfaces:
GuiSwingTableColumnSet.TableSelectionSource
Direct Known Subclasses:
GuiSwingTableColumnCollection.TableSelectionSourceDynamicForIndices
Enclosing class:
GuiSwingTableColumnCollection

public static class GuiSwingTableColumnCollection.TableSelectionSourceDynamicForList extends GuiSwingTableColumnCollection.TableSelectionSourceDynamicBase implements GuiSwingTableColumnSet.TableSelectionSource
     class T { List<List<E>> list; }
     class E {
         String n;
         List<Float> l;
         void act(List<Float> selected) {...}
     }
 
the class T will be bound to a table like the following columns
     #  | n[0] |  l[0,0]  | l[0,1] | ... | n[1] | l[1,0] | l[1,1] | ...
    ----|------|----------|--------|-----|------|--------|--------|-----
     0  |      |      a   |    b   | ... |      |   c    |        | ...
 
If a user selects the columns "a", "b", and "c", and runs the action "act", then the following code will be executed
        T t = ...;
        t.list.get(0).get(0).act(asList(
                         t.list.get(0).get(1).l.get(0),   //a
                         t.list.get(0).get(1).l.get(1))); //b
        t.list.get(0).get(1).act(asList(
                         t.list.get(0).get(1).l.get(0))); //c