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