|
|
|
@ -14,6 +14,7 @@ import com.fr.design.gui.itextfield.UITextField;
|
|
|
|
|
import com.fr.design.layout.FRGUIPaneFactory; |
|
|
|
|
import com.fr.design.utils.gui.GUICoreUtils; |
|
|
|
|
import com.fr.general.FRFont; |
|
|
|
|
import com.fr.general.GeneralContext; |
|
|
|
|
import com.fr.general.IOUtils; |
|
|
|
|
import com.fr.report.stable.WorkSheetAttr; |
|
|
|
|
import com.fr.report.worksheet.WorkSheet; |
|
|
|
@ -41,6 +42,7 @@ import java.awt.event.ActionListener;
|
|
|
|
|
public class ReportColumnsPane extends BasicPane{ |
|
|
|
|
public static final int ROW = 0; |
|
|
|
|
public static final int COLUMN = 1; |
|
|
|
|
private static final String LOCALE_LANGUAGE_EN = "en"; |
|
|
|
|
private int rowOrColumn; |
|
|
|
|
private boolean isRepeate; |
|
|
|
|
|
|
|
|
@ -87,6 +89,7 @@ public class ReportColumnsPane extends BasicPane{
|
|
|
|
|
this.setLayout(FRGUIPaneFactory.createBorderLayout()); |
|
|
|
|
|
|
|
|
|
JPanel north = new JPanel(new BorderLayout()) { |
|
|
|
|
@Override |
|
|
|
|
public void paint(Graphics g) { |
|
|
|
|
super.paint(g); |
|
|
|
|
super.paintBorder(g); |
|
|
|
@ -310,21 +313,33 @@ public class ReportColumnsPane extends BasicPane{
|
|
|
|
|
UITitledBorder explainBorder = UITitledBorder.createBorderWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Column_Area")); |
|
|
|
|
rowPane.setBorder(explainBorder); |
|
|
|
|
rowPane.setLayout(new FlowLayout(FlowLayout.LEFT, 5,13)); |
|
|
|
|
rowPane.setPreferredSize(new Dimension(500,80)); |
|
|
|
|
rowPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Column_Data") + ":")); |
|
|
|
|
// Yvan: REPORT-37398 判断设计器语言是否为英文
|
|
|
|
|
if (StringUtils.equals(GeneralContext.getLocale().getLanguage(), LOCALE_LANGUAGE_EN)) { |
|
|
|
|
// 如果是英文,需要为这个panel设置更大的height,否则显示不全
|
|
|
|
|
rowPane.setPreferredSize(new Dimension(500,135)); |
|
|
|
|
} else { |
|
|
|
|
// 其它语言环境下也需要将height调高一点点,因为后面将组件分块了,如果不调整height会造成上下间距不等
|
|
|
|
|
rowPane.setPreferredSize(new Dimension(500,90)); |
|
|
|
|
} |
|
|
|
|
// 将组件分成两块,分别装在各自的JPanel中,然后把两个JPanel添加到rowPane中,第二个JPanel放不下时会自动换行
|
|
|
|
|
// 左边的JPanel:分栏数据
|
|
|
|
|
JPanel multiData = new JPanel(); |
|
|
|
|
multiData.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Column_Data") + ":")); |
|
|
|
|
repeatColDataTextField = new UITextField(); |
|
|
|
|
repeatColDataTextField.setPreferredSize(new Dimension(107,24)); |
|
|
|
|
rowPane.add(repeatColDataTextField); |
|
|
|
|
rowPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Base_Format") + ": A2:D5 ")); |
|
|
|
|
multiData.add(repeatColDataTextField); |
|
|
|
|
multiData.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Base_Format") + ": A2:D5 ")); |
|
|
|
|
// 右边的JPanel:复制行序列
|
|
|
|
|
JPanel copyRowSequence = new JPanel(); |
|
|
|
|
copyLabel = new UILabel(REPORT_COLUMN_RAPEAT[rowOrColumn] + ":"); |
|
|
|
|
rowPane.add(copyLabel); |
|
|
|
|
|
|
|
|
|
copyRowSequence.add(copyLabel); |
|
|
|
|
copyTitleTextField = new UITextField(); |
|
|
|
|
copyTitleTextField.setPreferredSize(new Dimension(107,24)); |
|
|
|
|
rowPane.add(copyTitleTextField); |
|
|
|
|
rowPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Base_Format") + ": 1,2-3,5,18")); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
copyRowSequence.add(copyTitleTextField); |
|
|
|
|
copyRowSequence.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Base_Format") + ": 1,2-3,5,18")); |
|
|
|
|
// 添加JPanel
|
|
|
|
|
rowPane.add(multiData); |
|
|
|
|
rowPane.add(copyRowSequence); |
|
|
|
|
return rowPane; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|