|
|
@ -20,12 +20,19 @@ public class NewColorSelectBox extends AbstractSelectBox<Color> implements UIObs |
|
|
|
private static final long serialVersionUID = 2782150678943960557L; |
|
|
|
private static final long serialVersionUID = 2782150678943960557L; |
|
|
|
|
|
|
|
|
|
|
|
private Color color; |
|
|
|
private Color color; |
|
|
|
private NewColorSelectPane colorPane = new NewColorSelectPane(false); |
|
|
|
private NewColorSelectPane colorPane; |
|
|
|
private UIObserverListener uiObserverListener; |
|
|
|
private UIObserverListener uiObserverListener; |
|
|
|
private String newColorSelectBoxName = ""; |
|
|
|
private String newColorSelectBoxName = ""; |
|
|
|
private GlobalNameListener globalNameListener = null; |
|
|
|
private GlobalNameListener globalNameListener = null; |
|
|
|
|
|
|
|
private boolean supportTransparent; |
|
|
|
|
|
|
|
|
|
|
|
public NewColorSelectBox(int preferredWidth) { |
|
|
|
public NewColorSelectBox(int preferredWidth) { |
|
|
|
|
|
|
|
this(preferredWidth, false); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public NewColorSelectBox(int preferredWidth, boolean supportTransparent) { |
|
|
|
|
|
|
|
this.colorPane = new NewColorSelectPane(supportTransparent); |
|
|
|
|
|
|
|
this.supportTransparent = supportTransparent; |
|
|
|
initBox(preferredWidth); |
|
|
|
initBox(preferredWidth); |
|
|
|
iniListener(); |
|
|
|
iniListener(); |
|
|
|
} |
|
|
|
} |
|
|
@ -58,7 +65,7 @@ public class NewColorSelectBox extends AbstractSelectBox<Color> implements UIObs |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public JPanel initWindowPane(double preferredWidth) { |
|
|
|
public JPanel initWindowPane(double preferredWidth) { |
|
|
|
// 下拉的时候重新生成面板,以刷新最近使用颜色
|
|
|
|
// 下拉的时候重新生成面板,以刷新最近使用颜色
|
|
|
|
colorPane = new NewColorSelectPane(false); |
|
|
|
colorPane = new NewColorSelectPane(this.supportTransparent); |
|
|
|
colorPane.setColor(this.getSelectObject()); |
|
|
|
colorPane.setColor(this.getSelectObject()); |
|
|
|
colorPane.addChangeListener(new ChangeListener() { |
|
|
|
colorPane.addChangeListener(new ChangeListener() { |
|
|
|
public void stateChanged(ChangeEvent e) { |
|
|
|
public void stateChanged(ChangeEvent e) { |
|
|
|