Skip to content
Snippets Groups Projects
Commit cefcc908 authored by Raphael GIRARDOT's avatar Raphael GIRARDOT
Browse files

prefer using SplitPaneUtils to get divider location

parent efd455ac
Branches
Tags
No related merge requests found
...@@ -33,6 +33,7 @@ import fr.soleil.comete.swing.util.EDTManager; ...@@ -33,6 +33,7 @@ import fr.soleil.comete.swing.util.EDTManager;
import fr.soleil.lib.project.ObjectUtils; import fr.soleil.lib.project.ObjectUtils;
import fr.soleil.lib.project.SystemUtils; import fr.soleil.lib.project.SystemUtils;
import fr.soleil.lib.project.swing.Splash; import fr.soleil.lib.project.swing.Splash;
import fr.soleil.lib.project.swing.SplitPaneUtils;
public class CometeTrend extends JFrame implements ITrendFileListener { public class CometeTrend extends JFrame implements ITrendFileListener {
...@@ -407,8 +408,10 @@ public class CometeTrend extends JFrame implements ITrendFileListener { ...@@ -407,8 +408,10 @@ public class CometeTrend extends JFrame implements ITrendFileListener {
}); });
} else { } else {
if (splitPane != null) { if (splitPane != null) {
dividerLocation = splitPane.getDividerLocation() double tmp = SplitPaneUtils.getDividerLocation(splitPane);
/ (double) (splitPane.getWidth() - splitPane.getDividerSize()); if (!Double.isNaN(tmp)) {
dividerLocation = tmp;
}
mainPanel.remove(splitPane); mainPanel.remove(splitPane);
splitPane.remove(chartPanel); splitPane.remove(chartPanel);
splitPane = null; splitPane = null;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment