EventTableModelTypeHandler add EventSelectionModel

1 view
Skip to first unread message

hugh

unread,
Jan 5, 2011, 5:36:48 AM1/5/11
to JavaBuilders
Ji Jacec, first of all congratulations for a very neat Framework. I
use it a lot for Swing Gui Projects. My programming Language is Scala
and I can do some smart things on top of your Framework code. Now to
my problem: Because I need to take care of the GlazedList
EventSelectionModel I overwrite your EventTableModelTypeHandler with
a few lines of code:

//put it all together, in the right order for GlazedLists to work
EventTableModel model = new EventTableModel(actualSource,
format);
table.setModel(model);
EventSelectionModel selectionModel = new
EventSelectionModel(actualSource); // NEW
table.setSelectionModel(selectionModel); // NEW
if (sortedList != null) {
TableComparatorChooser tableSorter =
TableComparatorChooser.install(table, (SortedList) sortedList,
sortedChooser);
}
return model;

Maybe you can include it in the next build, so I can kick my own
EventTableModelTypeHandler class.

Have a nice time and keep coding,

Tom
Reply all
Reply to author
Forward
0 new messages