Browse Source

Pull request #6628: CHART-21665 design fix:仪表盘刻度配色保存异常处理

Merge in DESIGN/design from ~ZHENG/c-design:release/10.0 to release/10.0

* commit 'ddc6bdfadb87ba5166c01a2c0c3fb3eb438f3171':
  CHART-21665 design fix:仪表盘刻度配色保存异常处理
zheng-1641779399395
zheng 3 years ago
parent
commit
10b9a92e10
  1. 12
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/UIColorPickerPane.java

12
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/UIColorPickerPane.java

@ -29,8 +29,6 @@ import javax.swing.JPanel;
import javax.swing.SwingConstants; import javax.swing.SwingConstants;
import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener; import javax.swing.event.ChangeListener;
import java.util.ArrayList;
import java.util.List;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Color; import java.awt.Color;
import java.awt.Component; import java.awt.Component;
@ -42,6 +40,8 @@ import java.awt.LayoutManager;
import java.awt.Point; import java.awt.Point;
import java.awt.event.MouseAdapter; import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
import java.util.ArrayList;
import java.util.List;
public class UIColorPickerPane extends BasicPane implements UIObserver { public class UIColorPickerPane extends BasicPane implements UIObserver {
private static final int MARGIN_TOP = 7; private static final int MARGIN_TOP = 7;
@ -691,14 +691,18 @@ public class UIColorPickerPane extends BasicPane implements UIObserver {
fillStyleCombox.setSelectObject(mainColor); fillStyleCombox.setSelectObject(mainColor);
designTypeButtonGroup.setSelectedIndex(hotAreaColor.getUseType()); designTypeButtonGroup.setSelectedIndex(hotAreaColor.getUseType());
double value = (double) hotAreaColor.getAreaNumber(); int value = hotAreaColor.getAreaNumber();
UIColorPickerPane.this.add(textGroup); UIColorPickerPane.this.add(textGroup);
UIColorPickerPane.this.add(colorGroup); UIColorPickerPane.this.add(colorGroup);
Color[] colors = hotAreaColor.initColor(); Color[] colors = hotAreaColor.initColor();
BaseFormula[] values = hotAreaColor.initValues(); BaseFormula[] values = hotAreaColor.initValues();
if (value != colors.length && hotAreaColor.getUseType() == MapHotAreaColor.CUSTOM) {
colors = getColorArray(mainColor, value);
values = getValueArray(value);
}
refreshGroupPane(colors, values); refreshGroupPane(colors, values);
this.initContainerLister(); this.initContainerLister();
regionNumPane.populateBean(value); regionNumPane.populateBean((double) value);
refreshPane(); refreshPane();
} }

Loading…
Cancel
Save