Browse Source

CHART-20498 主题配色控件选中逻辑

persist/11.0
白岳 3 years ago
parent
commit
8804789738
  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