Browse Source

CHART-17958 自定义配色取色器异常

feature/big-screen
白岳 4 years ago
parent
commit
dbf0cba2f6
  1. 4
      designer-base/src/main/java/com/fr/design/style/color/ColorAdjustPane.java
  2. 6
      designer-base/src/main/java/com/fr/design/style/color/ColorSelectPane.java

4
designer-base/src/main/java/com/fr/design/style/color/ColorAdjustPane.java

@ -206,6 +206,10 @@ public class ColorAdjustPane extends JPanel implements UIObserver {
public void setVisible(boolean b) { public void setVisible(boolean b) {
super.setVisible(b); super.setVisible(b);
} }
protected boolean selectRealTime() {
return false;
}
}; };
colorPane.addChangeListener(new ChangeListener() { colorPane.addChangeListener(new ChangeListener() {
public void stateChanged(ChangeEvent e) { public void stateChanged(ChangeEvent e) {

6
designer-base/src/main/java/com/fr/design/style/color/ColorSelectPane.java

@ -115,12 +115,16 @@ public class ColorSelectPane extends TransparentPane implements ColorSelectable
row1Pane.setPreferredSize(new Dimension(135, 24)); // 宽度为 16 * 8 + 7 row1Pane.setPreferredSize(new Dimension(135, 24)); // 宽度为 16 * 8 + 7
// 最近使用 // 最近使用
UsedColorPane usedColorPane = new UsedColorPane(1, 8, 1, this, true, true); UsedColorPane usedColorPane = new UsedColorPane(1, 8, 1, this, true, selectRealTime());
usedColorPane.getPane().setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 8)); usedColorPane.getPane().setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 8));
row1Pane.add(usedColorPane.getPane()); row1Pane.add(usedColorPane.getPane());
return row1Pane; return row1Pane;
} }
protected boolean selectRealTime() {
return true;
}
protected Color[] getColorArray() { protected Color[] getColorArray() {
return ColorFactory.MenuColors; return ColorFactory.MenuColors;
} }

Loading…
Cancel
Save