|
|
|
@ -4,7 +4,7 @@ import com.fr.base.background.ColorBackground;
|
|
|
|
|
import com.fr.design.event.UIObserver; |
|
|
|
|
import com.fr.design.event.UIObserverListener; |
|
|
|
|
import com.fr.design.style.AbstractSelectBox; |
|
|
|
|
import com.fr.design.style.color.ColorSelectPane; |
|
|
|
|
import com.fr.design.style.color.NewColorSelectPane; |
|
|
|
|
|
|
|
|
|
import javax.swing.JPanel; |
|
|
|
|
import javax.swing.event.ChangeEvent; |
|
|
|
@ -130,7 +130,7 @@ public class ColorListPane extends JPanel implements UIObserver {
|
|
|
|
|
|
|
|
|
|
private static class ColorButton extends AbstractSelectBox<Color> { |
|
|
|
|
private Color color; |
|
|
|
|
private ColorSelectPane colorPane; |
|
|
|
|
private NewColorSelectPane colorPane; |
|
|
|
|
private ChangeListener changeListener; |
|
|
|
|
|
|
|
|
|
public ColorButton(Color color) { |
|
|
|
@ -145,7 +145,7 @@ public class ColorListPane extends JPanel implements UIObserver {
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public JPanel initWindowPane(double preferredWidth) { |
|
|
|
|
colorPane = new ColorSelectPane(false) { |
|
|
|
|
colorPane = new NewColorSelectPane(false) { |
|
|
|
|
@Override |
|
|
|
|
public void setVisible(boolean b) { |
|
|
|
|
super.setVisible(b); |
|
|
|
@ -156,10 +156,11 @@ public class ColorListPane extends JPanel implements UIObserver {
|
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
colorPane.setColor(this.getSelectObject()); |
|
|
|
|
colorPane.addChangeListener(new ChangeListener() { |
|
|
|
|
public void stateChanged(ChangeEvent e) { |
|
|
|
|
hidePopupMenu(); |
|
|
|
|
color = ((ColorSelectPane) e.getSource()).getColor(); |
|
|
|
|
color = ((NewColorSelectPane) e.getSource()).getColor(); |
|
|
|
|
fireDisplayComponent(ColorBackground.getInstance(color)); |
|
|
|
|
ColorListPane.ColorButton.this.fireStateChanged(); |
|
|
|
|
} |
|
|
|
|