|
From: Johannes S. (JIRA) <no...@sp...> - 2008-01-25 16:39:46
|
Prepare ExtTabbedPane for late addition of tabs
-----------------------------------------------
Key: RCP-528
URL: http://jira.springframework.org/browse/RCP-528
Project: Spring Framework Rich Client Project
Issue Type: Improvement
Affects Versions: 1.0.0
Reporter: Johannes Schneider
adding a tab when the pane is shown results in exceptions.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.springframework.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|
|
From: Johannes S. (JIRA) <no...@sp...> - 2008-01-25 16:41:43
|
[ http://jira.springframework.org/browse/RCP-528?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Johannes Schneider updated RCP-528:
-----------------------------------
Attachment: allows_the_late_addition_of_tabs_.patch
> Prepare ExtTabbedPane for late addition of tabs
> -----------------------------------------------
>
> Key: RCP-528
> URL: http://jira.springframework.org/browse/RCP-528
> Project: Spring Framework Rich Client Project
> Issue Type: Improvement
> Affects Versions: 1.0.0
> Reporter: Johannes Schneider
> Attachments: allows_the_late_addition_of_tabs_.patch
>
>
> adding a tab when the pane is shown results in exceptions.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.springframework.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|
|
From: Peter De B. (JIRA) <no...@sp...> - 2008-01-29 12:03:49
|
[ http://jira.springframework.org/browse/RCP-528?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_31366 ]
Peter De Bruycker commented on RCP-528:
---------------------------------------
can you specify what exceptions are thrown?
I'm trying to reproduce this behaviour, but I'm not having any problems:
<code>
public class ExtTabbedPaneTest implements Runnable {
public static void main(String[] args) {
SwingUtilities.invokeLater(new ExtTabbedPaneTest());
}
public void run() {
JFrame frame = new JFrame("test");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
final ExtTabbedPane tabbedPane = new ExtTabbedPane();
tabbedPane.addTab(new Tab("test", new JLabel("test")));
tabbedPane.addTab(new Tab("test2", new JLabel("test2")));
tabbedPane.addTab(new Tab("test3", new JLabel("test3")));
frame.add(tabbedPane.getControl(), BorderLayout.CENTER);
JButton btn = new JButton("test");
btn.addActionListener(new ActionListener() {
int counter = 4;
public void actionPerformed(ActionEvent e) {
Tab tab = new Tab("test" + counter, new JLabel("test" + counter));
tabbedPane.addTab(tab);
tabbedPane.selectTab(tab);
counter++;
}
});
frame.add(btn, BorderLayout.SOUTH);
frame.pack();
frame.setLocationRelativeTo(null);
frame.setVisible(true);
}
}
</code>
Perhaps you can modify the above code to demonstrate the problem. That would even be beter.
Thanks,
Peter
> Prepare ExtTabbedPane for late addition of tabs
> -----------------------------------------------
>
> Key: RCP-528
> URL: http://jira.springframework.org/browse/RCP-528
> Project: Spring Framework Rich Client Project
> Issue Type: Improvement
> Affects Versions: 1.0.0
> Reporter: Johannes Schneider
> Assignee: Peter De Bruycker
> Attachments: allows_the_late_addition_of_tabs_.patch
>
>
> adding a tab when the pane is shown results in exceptions.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.springframework.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|
|
From: Johannes S. (JIRA) <no...@sp...> - 2008-01-29 12:33:48
|
[ http://jira.springframework.org/browse/RCP-528?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_31368 ]
Johannes Schneider commented on RCP-528:
----------------------------------------
Hmm... I can't reproduce the problem anymore...
It was a quite complex scenario related to a TabbedDialogPage.
I think there might be a problem:
That addition of a tab to the JTabbedPane results in notification of listeners. But the tab is added to the list of tabs after that notification.
So if a notified listeners calls "ExtTabbedPane#getTab" we might get an IndexOutOfBoundsException or get the wrong index.
> Prepare ExtTabbedPane for late addition of tabs
> -----------------------------------------------
>
> Key: RCP-528
> URL: http://jira.springframework.org/browse/RCP-528
> Project: Spring Framework Rich Client Project
> Issue Type: Improvement
> Affects Versions: 1.0.0
> Reporter: Johannes Schneider
> Assignee: Peter De Bruycker
> Attachments: allows_the_late_addition_of_tabs_.patch
>
>
> adding a tab when the pane is shown results in exceptions.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.springframework.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|
|
From: Peter De B. (JIRA) <no...@sp...> - 2008-01-29 14:33:46
|
[ http://jira.springframework.org/browse/RCP-528?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Peter De Bruycker resolved RCP-528.
-----------------------------------
Resolution: Fixed
> Prepare ExtTabbedPane for late addition of tabs
> -----------------------------------------------
>
> Key: RCP-528
> URL: http://jira.springframework.org/browse/RCP-528
> Project: Spring Framework Rich Client Project
> Issue Type: Improvement
> Affects Versions: 1.0.0
> Reporter: Johannes Schneider
> Assignee: Peter De Bruycker
> Attachments: allows_the_late_addition_of_tabs_.patch
>
>
> adding a tab when the pane is shown results in exceptions.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.springframework.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|
|
From: Peter De B. (JIRA) <no...@sp...> - 2008-01-29 14:33:46
|
[ http://jira.springframework.org/browse/RCP-528?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_31381 ]
Peter De Bruycker commented on RCP-528:
---------------------------------------
I managed to reproduce it, and created a testcase for it.
the error has been fixed and checked in
> Prepare ExtTabbedPane for late addition of tabs
> -----------------------------------------------
>
> Key: RCP-528
> URL: http://jira.springframework.org/browse/RCP-528
> Project: Spring Framework Rich Client Project
> Issue Type: Improvement
> Affects Versions: 1.0.0
> Reporter: Johannes Schneider
> Assignee: Peter De Bruycker
> Attachments: allows_the_late_addition_of_tabs_.patch
>
>
> adding a tab when the pane is shown results in exceptions.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.springframework.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|