Browse Source

Pull request #5739: CHART-20498 主题配色控件选中逻辑

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

* commit '8804789738b514c02ce8afaf6aaaee3bf9cda878':
  CHART-20498 主题配色控件选中逻辑
persist/11.0
Bjorn 3 years ago
parent
commit
b183ed9e9b
  1. 13
      designer-base/src/main/java/com/fr/design/style/color/ColorControlWindow.java
  2. 5
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/UIColorPickerPane.java

13
designer-base/src/main/java/com/fr/design/style/color/ColorControlWindow.java

@ -62,19 +62,28 @@ public abstract class ColorControlWindow extends JPopupMenu {
}
protected void initSelectionPopupPane(boolean isSupportTransparent) {
selectionPopupPane = new ColorSelectionPopupPane(isSupportTransparent, supportThemeColor());
selectionPopupPane = createColorSelectionPopupPane(isSupportTransparent);
this.add(selectionPopupPane, BorderLayout.CENTER);
}
protected ColorSelectionPopupPane createColorSelectionPopupPane(boolean isSupportTransparent) {
return new ColorSelectionPopupPane(isSupportTransparent, supportThemeColor());
}
protected boolean supportThemeColor(){
return true;
}
class ColorSelectionPopupPane extends NewColorSelectPane {
protected class ColorSelectionPopupPane extends NewColorSelectPane {
private static final long serialVersionUID = 7822856562329146354L;
public ColorSelectionPopupPane(boolean isSupportTransparent, boolean isSupportThemeColor) {
this(isSupportTransparent, isSupportThemeColor, null);
}
public ColorSelectionPopupPane(boolean isSupportTransparent, boolean isSupportThemeColor, Color color) {
super(isSupportTransparent, isSupportThemeColor);
this.setColor(color);
this.addChangeListener(new ChangeListener() {
@Override

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

@ -370,6 +370,11 @@ public class UIColorPickerPane extends BasicPane implements UIObserver {
ColorRecButton.this.repaint();
}
@Override
protected ColorSelectionPopupPane createColorSelectionPopupPane(boolean isSupportTransparent) {
return new ColorSelectionPopupPane(isSupportTransparent, supportThemeColor(), ColorRecButton.this.color);
}
};
}

Loading…
Cancel
Save