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