From 9f7ae36eee9903209276c524c1dd5800ff96bda5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=B2=B3?= <445798420@qq.com> Date: Wed, 10 Jun 2020 14:40:00 +0800 Subject: [PATCH] =?UTF-8?q?CHART-14106=20=E6=8E=A7=E4=BB=B6=E7=9A=84?= =?UTF-8?q?=E9=BC=A0=E6=A0=87=E6=97=B6=E9=97=B4=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../designer/style/VanChartPlotLegendPane.java | 18 +++++------------- .../designer/style/VanChartTitlePane.java | 17 ++++------------- 2 files changed, 9 insertions(+), 26 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartPlotLegendPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartPlotLegendPane.java index 7e597bd5d..3c5e992b9 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartPlotLegendPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartPlotLegendPane.java @@ -253,23 +253,15 @@ public class VanChartPlotLegendPane extends BasicPane { }); customFloatPositionButton.addMouseListener(new MouseAdapter() { - @Override - public void mouseClicked(MouseEvent e) { - if(!customFloatPositionButton.isSelected()){ - customFloatPositionButton.setSelected(true); - checkLayoutPaneVisible(); - checkDisplayStrategyUse(); - } - } - - @Override - public void mousePressed(MouseEvent e) { - location.setSelectedIndex(-1); - } @Override public void mouseReleased(MouseEvent e) { super.mouseReleased(e); + location.setSelectedIndex(-1); + customFloatPositionButton.setSelected(true); + checkLayoutPaneVisible(); + checkDisplayStrategyUse(); + if(customFloatPositionPane == null) { customFloatPositionPane = new VanChartFloatPositionPane(); } diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartTitlePane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartTitlePane.java index 908a75d21..761bf12fd 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartTitlePane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartTitlePane.java @@ -214,23 +214,14 @@ public class VanChartTitlePane extends AbstractVanChartScrollPane { }); customFloatPositionButton.addMouseListener(new MouseAdapter() { - @Override - public void mouseClicked(MouseEvent e) { - if (!customFloatPositionButton.isSelected()) { - customFloatPositionButton.setSelected(true); - checkDisplayStrategyUse(); - } - } - - @Override - public void mousePressed(MouseEvent e) { - alignmentPane.setSelectedIndex(-1); - } - @Override public void mouseReleased(MouseEvent e) { super.mouseReleased(e); + alignmentPane.setSelectedIndex(-1); + customFloatPositionButton.setSelected(true); + checkDisplayStrategyUse(); + if (customFloatPositionPane == null) { customFloatPositionPane = new VanChartFloatPositionPane(); }