Browse Source

代码修改

research/11.0
kerry 3 years ago
parent
commit
2ce997a6b8
  1. 8
      designer-base/src/main/java/com/fr/design/gui/style/BorderPane.java
  2. 20
      designer-base/src/main/java/com/fr/design/mainframe/backgroundpane/ColorBackgroundQuickPane.java

8
designer-base/src/main/java/com/fr/design/gui/style/BorderPane.java

@ -95,8 +95,14 @@ public class BorderPane extends AbstractBasicStylePane implements GlobalNameObse
borderPanel = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Border"), 280, 24, panel); borderPanel = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Border"), 280, 24, panel);
this.add(borderPanel, BorderLayout.NORTH); this.add(borderPanel, BorderLayout.NORTH);
UILabel backgroundFillLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Background_Fill"));
backgroundFillLabel.setPreferredSize(new Dimension(60, 20));
backgroundPane = new BackgroundPane(); backgroundPane = new BackgroundPane();
backgroundPanel = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Background"), 280, 24, backgroundPane); JPanel backgroundContainPane = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{backgroundFillLabel, backgroundPane}},
TableLayoutHelper.FILL_LASTCOLUMN, LayoutConstants.VGAP_SMALL, LayoutConstants.VGAP_MEDIUM);
backgroundPanel = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Background"), 280, 24, backgroundContainPane);
this.add(backgroundPanel, BorderLayout.CENTER); this.add(backgroundPanel, BorderLayout.CENTER);
initAllNames(); initAllNames();
outerToggleButton.addChangeListener(outerToggleButtonChangeListener); outerToggleButton.addChangeListener(outerToggleButtonChangeListener);

20
designer-base/src/main/java/com/fr/design/mainframe/backgroundpane/ColorBackgroundQuickPane.java

@ -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);
} }
} }
Loading…
Cancel
Save