Browse Source

REPORT-1096 取色板=》调整代码

master
plough 8 years ago
parent
commit
e596f2aca7
  1. 12
      designer_base/src/com/fr/design/style/color/ColorPicker.java

12
designer_base/src/com/fr/design/style/color/ColorPicker.java

@ -112,12 +112,10 @@ public class ColorPicker extends JDialog implements ActionListener
validate(); // 更新所有子控件
}
public void pickComplete(Boolean setColor) {
public void pickComplete(Color color) {
timer.stop();
if (setColor) {
colorSelectable.setColor(colorToSet);
} else if (setColorRealTime) {
colorSelectable.setColor(initColor);
if (color != null) {
colorSelectable.setColor(color);
}
this.dispose();
}
@ -134,9 +132,9 @@ public class ColorPicker extends JDialog implements ActionListener
public void mousePressed(MouseEvent e)
{
if (e.getButton() == e.BUTTON1) { // 左键确定
pickComplete(true);
pickComplete(colorToSet);
} else {
pickComplete(false);
pickComplete(setColorRealTime ? initColor : null);
}
}
}

Loading…
Cancel
Save