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