Browse Source
* commit '06fff3dde04dffca511112a63fbe493e13fc9655': SLN-280 规范国际化 SLN-280 二开需求(将原导出打印纸张背景,分开设置),经产品决定做到产品里面master
superman
8 years ago
7 changed files with 68 additions and 46 deletions
@ -1,47 +1,57 @@ |
|||||||
package com.fr.design.report; |
package com.fr.design.report; |
||||||
|
|
||||||
import java.awt.BorderLayout; |
import java.awt.BorderLayout; |
||||||
|
|
||||||
import com.fr.page.ReportSettingsProvider; |
import javax.swing.JPanel; |
||||||
import com.fr.design.gui.icheckbox.UICheckBox; |
|
||||||
import com.fr.design.layout.FRGUIPaneFactory; |
import com.fr.page.ReportSettingsProvider; |
||||||
import com.fr.design.dialog.BasicPane; |
import com.fr.design.gui.icheckbox.UICheckBox; |
||||||
import com.fr.general.Inter; |
import com.fr.design.layout.FRGUIPaneFactory; |
||||||
import com.fr.design.style.background.BackgroundPane; |
import com.fr.design.dialog.BasicPane; |
||||||
|
import com.fr.general.Inter; |
||||||
public class ReportBackgroundPane extends BasicPane { |
import com.fr.design.style.background.BackgroundPane; |
||||||
private UICheckBox isPrintBackgroundCheckBox; |
|
||||||
private BackgroundPane backgroundPane; |
public class ReportBackgroundPane extends BasicPane { |
||||||
|
private UICheckBox isPrintBackgroundCheckBox; |
||||||
public ReportBackgroundPane() { |
private UICheckBox isExportBackgroundCheckBox; |
||||||
this.setLayout(FRGUIPaneFactory.createBorderLayout()); |
private BackgroundPane backgroundPane; |
||||||
|
|
||||||
backgroundPane = new BackgroundPane(); |
public ReportBackgroundPane() { |
||||||
this.add(backgroundPane, BorderLayout.CENTER); |
this.setLayout(FRGUIPaneFactory.createBorderLayout()); |
||||||
|
|
||||||
isPrintBackgroundCheckBox = new UICheckBox( |
backgroundPane = new BackgroundPane(); |
||||||
Inter.getLocText("ReportGUI-Print_Background")); |
this.add(backgroundPane, BorderLayout.CENTER); |
||||||
this.add(isPrintBackgroundCheckBox, BorderLayout.SOUTH); |
|
||||||
} |
isPrintBackgroundCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_Print_Background")); |
||||||
|
isExportBackgroundCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_Export_Background")); |
||||||
@Override |
JPanel sourth = new JPanel(); |
||||||
protected String title4PopupWindow() { |
sourth.add(isExportBackgroundCheckBox); |
||||||
return Inter.getLocText(new String[]{"paper", "Background"}); |
sourth.add(isPrintBackgroundCheckBox); |
||||||
} |
this.add(sourth, BorderLayout.SOUTH); |
||||||
|
|
||||||
/** |
this.add(isPrintBackgroundCheckBox, BorderLayout.SOUTH); |
||||||
* Populate |
} |
||||||
*/ |
|
||||||
public void populate(ReportSettingsProvider reportSettings) { |
@Override |
||||||
this.backgroundPane.populate(reportSettings.getBackground()); |
protected String title4PopupWindow() { |
||||||
this.isPrintBackgroundCheckBox.setSelected(reportSettings.isPrintBackground()); |
return Inter.getLocText(new String[]{"paper", "Background"}); |
||||||
} |
} |
||||||
|
|
||||||
/** |
/** |
||||||
* update |
* Populate |
||||||
*/ |
*/ |
||||||
public void update(ReportSettingsProvider reportSettings) { |
public void populate(ReportSettingsProvider reportSettings) { |
||||||
reportSettings.setBackground(this.backgroundPane.update()); |
this.backgroundPane.populate(reportSettings.getBackground()); |
||||||
reportSettings.setPrintBackground(this.isPrintBackgroundCheckBox.isSelected()); |
this.isPrintBackgroundCheckBox.setSelected(reportSettings.isPrintBackground()); |
||||||
} |
this.isExportBackgroundCheckBox.setSelected(reportSettings.isExportBackground()); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* update |
||||||
|
*/ |
||||||
|
public void update(ReportSettingsProvider reportSettings) { |
||||||
|
reportSettings.setBackground(this.backgroundPane.update()); |
||||||
|
reportSettings.setPrintBackground(this.isPrintBackgroundCheckBox.isSelected()); |
||||||
|
reportSettings.setExportBackground(this.isExportBackgroundCheckBox.isSelected()); |
||||||
|
} |
||||||
} |
} |
Loading…
Reference in new issue