[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[List Home]
|
Re: [ufk-dev] Swing ObservableListTableModel remove glitch
|
- From: Tom Schindl <tom.schindl@xxxxxxxxxxxxxxx>
- Date: Tue, 08 Feb 2011 08:52:12 +0100
- Delivered-to: ufk-dev@eclipse.org
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=bestsolution.at; h=content-transfer-encoding:content-type:content-type :in-reply-to:references:subject:subject:mime-version:user-agent :from:from:date:date:message-id:received:received; s=default; t= 1297151531; x=1298965931; bh=BebmlqYGOGLdyT4hnWrROpZ8tv2dAj6bhRp 35OCAlEc=; b=X1XKUDzABf198+aMt4EL9XKXOCLG8IjHVpzTM+bNxN+aaU2580L flpPk7/Zk5eXkCIctAVFYrUIKoXyC9ou6abRK54PinXPj+wTGUPB7ftqgcGf2rGA L9QdhQG/GoxxveSQ7DI/cF4po4K1rNEbAVSUrAXCUFP6ArL8XvRt6/1A=
- User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; de; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7
Hi,
I'll try to take a look in the evening.
Tom
Am 08.02.11 02:45, schrieb Max Gordienko:
> Hi there!
>
> I think there is a problem with the way ObservableListTableModel
> handles row delete.
> If multiple top rows are removed from the model for some reason a part
> of the JTable is not updated.
> I cannot pinpoint what causes this problem, mimicking the same
> scenario with DefaultTableModel works just fine.
> ObservableListTableModel handles all the remove operations correctly,
> all the required events are fired... but still.
>
> Could anyone help me?
>
> Thank you!
>
>
>
> A simple demo to demonstrate the issue - run and click the "Remove"
> button:the result will be just like it on the attached screenshot.
>
> SwingUtilities.invokeLater(new Runnable() {
>
> @Override
> public void run() {
> SwingRealm.createDefault();
> final IObservableList l = WritableList.withElementType(Object.class);
> l.add("1");
> l.add("2");
> l.add("3");
> ObservableListTableModel model = new ObservableListTableModel(l);
> model.addColumn("val");
> JTable t = new JTable(model);
>
> JFrame f = new JFrame();
> f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
> f.setLayout(new BorderLayout());
> f.add(t, BorderLayout.CENTER);
> f.add(new JButton(new AbstractAction("Remove") {
>
> @Override
> public void actionPerformed(ActionEvent e) {
> l.removeAll(Arrays.asList("1", "2"));
> }
> }), BorderLayout.NORTH);
>
> f.pack();
> f.setVisible(true);
> }
> });
>
>
>
> _______________________________________________
> ufk-dev mailing list
> ufk-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/ufk-dev
--
B e s t S o l u t i o n . a t EDV Systemhaus GmbH
------------------------------------------------------------------------
tom schindl geschaeftsfuehrer/CEO
------------------------------------------------------------------------
eduard-bodem-gasse 5/1 A-6020 innsbruck phone ++43 512 935834