Browse Source

修改一下判断条件,避免以后重复写判断分支

feature/big-screen
Yvan 4 years ago
parent
commit
1c728c920e
  1. 6
      designer-realize/src/main/java/com/fr/design/report/ReportColumnsPane.java

6
designer-realize/src/main/java/com/fr/design/report/ReportColumnsPane.java

@ -18,6 +18,7 @@ import com.fr.general.GeneralContext;
import com.fr.general.IOUtils; import com.fr.general.IOUtils;
import com.fr.report.stable.WorkSheetAttr; import com.fr.report.stable.WorkSheetAttr;
import com.fr.report.worksheet.WorkSheet; import com.fr.report.worksheet.WorkSheet;
import com.fr.stable.ArrayUtils;
import com.fr.stable.ColumnRow; import com.fr.stable.ColumnRow;
import com.fr.stable.Constants; import com.fr.stable.Constants;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
@ -38,11 +39,12 @@ import java.awt.Graphics;
import java.awt.GridLayout; import java.awt.GridLayout;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
import java.util.List;
public class ReportColumnsPane extends BasicPane{ public class ReportColumnsPane extends BasicPane{
public static final int ROW = 0; public static final int ROW = 0;
public static final int COLUMN = 1; public static final int COLUMN = 1;
private static final String LOCALE_LANGUAGE_EN = "en"; private static final List<String> LOCALE_LANGUAGE = ArrayUtils.toList(new String[]{"en"});
private int rowOrColumn; private int rowOrColumn;
private boolean isRepeate; private boolean isRepeate;
@ -314,7 +316,7 @@ public class ReportColumnsPane extends BasicPane{
rowPane.setBorder(explainBorder); rowPane.setBorder(explainBorder);
rowPane.setLayout(new FlowLayout(FlowLayout.LEFT, 5,13)); rowPane.setLayout(new FlowLayout(FlowLayout.LEFT, 5,13));
// Yvan: REPORT-37398 判断设计器语言是否为英文 // Yvan: REPORT-37398 判断设计器语言是否为英文
if (StringUtils.equals(GeneralContext.getLocale().getLanguage(), LOCALE_LANGUAGE_EN)) { if (LOCALE_LANGUAGE.contains(GeneralContext.getLocale().getLanguage())) {
// 如果是英文,需要为这个panel设置更大的height,否则显示不全 // 如果是英文,需要为这个panel设置更大的height,否则显示不全
rowPane.setPreferredSize(new Dimension(500,135)); rowPane.setPreferredSize(new Dimension(500,135));
} else { } else {

Loading…
Cancel
Save