|
|
|
@ -3,9 +3,8 @@ package com.fr.design.mainframe.backgroundpane;
|
|
|
|
|
import com.fr.base.background.ColorBackground; |
|
|
|
|
import com.fr.design.event.UIObserverListener; |
|
|
|
|
import com.fr.design.layout.FRGUIPaneFactory; |
|
|
|
|
import com.fr.design.style.color.NewColorSelectPane; |
|
|
|
|
import com.fr.design.style.color.NewColorSelectBox; |
|
|
|
|
import com.fr.general.Background; |
|
|
|
|
|
|
|
|
|
import java.awt.BorderLayout; |
|
|
|
|
import java.awt.Color; |
|
|
|
|
|
|
|
|
@ -15,13 +14,13 @@ import java.awt.Color;
|
|
|
|
|
*/ |
|
|
|
|
public class ColorBackgroundQuickPane extends BackgroundQuickPane { |
|
|
|
|
|
|
|
|
|
private NewColorSelectPane detailColorSelectPane; |
|
|
|
|
private NewColorSelectBox colorSelectBox; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public ColorBackgroundQuickPane() { |
|
|
|
|
this.setLayout(FRGUIPaneFactory.createBorderLayout()); |
|
|
|
|
|
|
|
|
|
detailColorSelectPane = new NewColorSelectPane(false); |
|
|
|
|
this.add(detailColorSelectPane, BorderLayout.NORTH); |
|
|
|
|
colorSelectBox = new NewColorSelectBox(100); |
|
|
|
|
this.add(colorSelectBox, BorderLayout.NORTH); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void populateBean(Background background) { |
|
|
|
@ -34,12 +33,11 @@ public class ColorBackgroundQuickPane extends BackgroundQuickPane {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void populateColor(Color color) { |
|
|
|
|
this.detailColorSelectPane.setColor(color); |
|
|
|
|
this.colorSelectBox.setSelectObject(color); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public Color updateColor() { |
|
|
|
|
this.detailColorSelectPane.updateUsedColor(); |
|
|
|
|
return this.detailColorSelectPane.getNotNoneColor(); |
|
|
|
|
return this.colorSelectBox.getSelectObject(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -49,7 +47,7 @@ public class ColorBackgroundQuickPane extends BackgroundQuickPane {
|
|
|
|
|
*/ |
|
|
|
|
@Override |
|
|
|
|
public void registerChangeListener(final UIObserverListener listener) { |
|
|
|
|
detailColorSelectPane.addChangeListener(new ChangeListenerImpl(listener)); |
|
|
|
|
this.colorSelectBox.addSelectChangeListener(new ChangeListenerImpl(listener)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@ -75,6 +73,6 @@ public class ColorBackgroundQuickPane extends BackgroundQuickPane {
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void reset() { |
|
|
|
|
this.detailColorSelectPane.setColor(null); |
|
|
|
|
this.colorSelectBox.setSelectObject(null); |
|
|
|
|
} |
|
|
|
|
} |