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 5 years ago
parent
commit
f08d4bf290
  1. 21
      designer-chart/src/main/java/com/fr/design/chartx/component/combobox/ColorSchemeComboBox.java
  2. 18
      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

21
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.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.UIComboBoxRenderer;
import com.fr.design.i18n.Toolkit;
@ -60,13 +62,20 @@ public class ColorSchemeComboBox extends UIComboBox {
//添加默认的方案和第一个方案
String defaultName = config.getCurrentStyle();
ChartColorMatching defaultStyle = (ChartColorMatching) config.getPreStyle(defaultName);
Object firstName = names.next();
ChartColorMatching firstStyle = (ChartColorMatching) config.getPreStyle(firstName);
if (defaultStyle == null) {
defaultStyle = firstStyle;
if (names.hasNext()) {
Object firstName = names.next();
ChartColorMatching firstStyle = (ChartColorMatching) config.getPreStyle(firstName);
if (defaultStyle == null) {
defaultStyle = firstStyle;
}
colorSchemes.put(Toolkit.i18nText("Fine-Design_Report_Default"), colorMatchingToColorInfo(defaultStyle));
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);
}
colorSchemes.put(Toolkit.i18nText("Fine-Design_Report_Default"), colorMatchingToColorInfo(defaultStyle));
colorSchemes.put(firstStyle.getId(), colorMatchingToColorInfo(firstStyle));
//添加其他的配色方案
while (names.hasNext()) {

18
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();
}

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() {
@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();
}

Loading…
Cancel
Save