Browse Source

Pull request #1737: CHART-14106 && CHART-14062 bugfix

Merge in DESIGN/design from ~BJORN/design:release/10.0 to release/10.0

* commit '1db565b58cfec6482668d9237b3463c3f4ba7b23':
  CHART-14062 预定义配色都被删光之后的逻辑
  CHART-14106 控件的鼠标时间修改
feature/big-screen
Bjorn 4 years ago
parent
commit
f08d4bf290
  1. 9
      designer-chart/src/main/java/com/fr/design/chartx/component/combobox/ColorSchemeComboBox.java
  2. 16
      designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartPlotLegendPane.java
  3. 17
      designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartTitlePane.java

9
designer-chart/src/main/java/com/fr/design/chartx/component/combobox/ColorSchemeComboBox.java

@ -2,6 +2,8 @@ package com.fr.design.chartx.component.combobox;
import com.fr.base.ChartColorMatching; import com.fr.base.ChartColorMatching;
import com.fr.base.ChartPreStyleConfig; import com.fr.base.ChartPreStyleConfig;
import com.fr.cert.token.lang.Collections;
import com.fr.chart.base.ChartConstants;
import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.icombobox.UIComboBoxRenderer; import com.fr.design.gui.icombobox.UIComboBoxRenderer;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
@ -60,6 +62,7 @@ public class ColorSchemeComboBox extends UIComboBox {
//添加默认的方案和第一个方案 //添加默认的方案和第一个方案
String defaultName = config.getCurrentStyle(); String defaultName = config.getCurrentStyle();
ChartColorMatching defaultStyle = (ChartColorMatching) config.getPreStyle(defaultName); ChartColorMatching defaultStyle = (ChartColorMatching) config.getPreStyle(defaultName);
if (names.hasNext()) {
Object firstName = names.next(); Object firstName = names.next();
ChartColorMatching firstStyle = (ChartColorMatching) config.getPreStyle(firstName); ChartColorMatching firstStyle = (ChartColorMatching) config.getPreStyle(firstName);
if (defaultStyle == null) { if (defaultStyle == null) {
@ -67,6 +70,12 @@ public class ColorSchemeComboBox extends UIComboBox {
} }
colorSchemes.put(Toolkit.i18nText("Fine-Design_Report_Default"), colorMatchingToColorInfo(defaultStyle)); colorSchemes.put(Toolkit.i18nText("Fine-Design_Report_Default"), colorMatchingToColorInfo(defaultStyle));
colorSchemes.put(firstStyle.getId(), colorMatchingToColorInfo(firstStyle)); colorSchemes.put(firstStyle.getId(), colorMatchingToColorInfo(firstStyle));
} else {
ColorInfo colorInfo = new ColorInfo();
colorInfo.setGradient(false);
colorInfo.setColors(Collections.arrayToList(ChartConstants.CHART_COLOR_ARRAY));
colorSchemes.put(Toolkit.i18nText("Fine-Design_Report_Default"), colorInfo);
}
//添加其他的配色方案 //添加其他的配色方案
while (names.hasNext()) { while (names.hasNext()) {

16
designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartPlotLegendPane.java

@ -254,21 +254,13 @@ public class VanChartPlotLegendPane extends BasicPane {
customFloatPositionButton.addMouseListener(new MouseAdapter() { customFloatPositionButton.addMouseListener(new MouseAdapter() {
@Override @Override
public void mouseClicked(MouseEvent e) { public void mouseReleased(MouseEvent e) {
if(!customFloatPositionButton.isSelected()){ super.mouseReleased(e);
location.setSelectedIndex(-1);
customFloatPositionButton.setSelected(true); customFloatPositionButton.setSelected(true);
checkLayoutPaneVisible(); checkLayoutPaneVisible();
checkDisplayStrategyUse(); checkDisplayStrategyUse();
}
}
@Override
public void mousePressed(MouseEvent e) {
location.setSelectedIndex(-1);
}
@Override
public void mouseReleased(MouseEvent e) {
super.mouseReleased(e);
if(customFloatPositionPane == null) { if(customFloatPositionPane == null) {
customFloatPositionPane = new VanChartFloatPositionPane(); customFloatPositionPane = new VanChartFloatPositionPane();

17
designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartTitlePane.java

@ -214,23 +214,14 @@ public class VanChartTitlePane extends AbstractVanChartScrollPane<VanChart> {
}); });
customFloatPositionButton.addMouseListener(new MouseAdapter() { 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 @Override
public void mouseReleased(MouseEvent e) { public void mouseReleased(MouseEvent e) {
super.mouseReleased(e); super.mouseReleased(e);
alignmentPane.setSelectedIndex(-1);
customFloatPositionButton.setSelected(true);
checkDisplayStrategyUse();
if (customFloatPositionPane == null) { if (customFloatPositionPane == null) {
customFloatPositionPane = new VanChartFloatPositionPane(); customFloatPositionPane = new VanChartFloatPositionPane();
} }

Loading…
Cancel
Save