Browse Source

Pull request #1912: REPORT-35552 设计器日志级别:WARN对应的为严重 && REPORT-31992 日文设计器显示不全的问题

Merge in DESIGN/design from ~YVAN/design:release/10.0 to release/10.0

* commit '60e2a8b2bf8b94fa1e61db4a37a7e926c4d73dba':
  REPORT-31992 日文设计器显示不全的问题 1.通过设置border数据,调整组件间距,使得被挤出界面的文本框正常显示 2.测试了每种语言下的bug所在的界面,发现改动并没有引起其它显示问题
  1.原本输出的日志里,WARN标签对应严重,ERROR标签对应警告 2.修改后,ERROR标签对应严重,WARN标签对应警告,并相应的修改其配色和计数 3.添加一些常量,使代码更符合帆软规范
feature/big-screen
Yvan 4 years ago
parent
commit
4d81e342ad
  1. 4
      designer-base/src/main/java/com/fr/design/hyperlink/ReportletHyperNorthPane.java
  2. 25
      designer-base/src/main/java/com/fr/design/mainframe/loghandler/DesignerLogHandler.java

4
designer-base/src/main/java/com/fr/design/hyperlink/ReportletHyperNorthPane.java

@ -395,7 +395,7 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane<ReportletHyp
// 自定义
custom = new UIRadioButton(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Dialog_Position_Custom"));
custom.setBorder(BorderFactory.createEmptyBorder(4, 20, 4, 5));
custom.setBorder(BorderFactory.createEmptyBorder(4, 15, 4, 5));
ButtonGroup group = new ButtonGroup();
group.setSelected(center.getModel(), true);
group.add(center);
@ -405,7 +405,7 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane<ReportletHyp
// 位置 距左
final UILabel leftLabel = new UILabel(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Dialog_Position_Left"));
leftLabel.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 10));
leftLabel.setBorder(BorderFactory.createEmptyBorder(0, 15, 0, 10));
leftLocation = new UINumberField();
leftLocation.setMinValue(0);
leftLocation.setPreferredSize(new Dimension(40, 20));

25
designer-base/src/main/java/com/fr/design/mainframe/loghandler/DesignerLogHandler.java

@ -8,6 +8,7 @@ import com.fr.design.ui.util.UIUtil;
import com.fr.general.ComparatorUtils;
import com.fr.general.log.Log4jConfig;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils;
import com.fr.third.apache.log4j.Level;
import com.fr.third.apache.log4j.spi.LoggingEvent;
import com.fr.third.apache.log4j.spi.ThrowableInformation;
@ -53,12 +54,14 @@ public class DesignerLogHandler {
private static final int SERVER_GAP_Y = -20;
private static final String ERROR_MARK = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Alert") + ":";
private static final String ERROR_MARK = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Seriously") + ":";
private static final String WARN_MARK = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Seriously") + ":";
private static final String WARN_MARK = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Alert") + ":";
private static final String NORMAL_MARK = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Normal") + ":";
private static final String ACTION_MAP_KEY = "clear";
public static DesignerLogHandler getInstance() {
return HOLDER.singleton;
@ -223,14 +226,14 @@ public class DesignerLogHandler {
InputMap inputMap = resultPane.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_C, DEFAULT_MODIFIER), DefaultEditorKit.copyAction);
inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_A, DEFAULT_MODIFIER), DefaultEditorKit.selectAllAction);
inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_L, DEFAULT_MODIFIER), "clear");
inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_L, DEFAULT_MODIFIER), ACTION_MAP_KEY);
ActionMap actionMap = resultPane.getActionMap();
actionMap.put("clear", new AbstractAction() {
actionMap.put(ACTION_MAP_KEY, new AbstractAction() {
@Override
public void actionPerformed(ActionEvent evt) {
resultPane.setText("");
resultPane.setText(StringUtils.EMPTY);
caption.clearMessage();
}
});
@ -293,10 +296,10 @@ public class DesignerLogHandler {
SimpleAttributeSet attrSet = new SimpleAttributeSet();
if (style == DesignerLogger.ERROR_INT) {
StyleConstants.setForeground(attrSet, new Color(247, 148, 29));
StyleConstants.setForeground(attrSet, Color.RED);
StyleConstants.setBold(attrSet, true);
} else if (style == DesignerLogger.WARN_INT) {
StyleConstants.setForeground(attrSet, Color.red);
StyleConstants.setForeground(attrSet, new Color(247, 148, 29));
StyleConstants.setBold(attrSet, true);
} else if (style == DesignerLogger.INFO_INT) {
StyleConstants.setForeground(attrSet, Color.black);
@ -330,9 +333,9 @@ public class DesignerLogHandler {
LogMessageBar.getInstance().setMessage(message);
if (level == DesignerLogger.INFO_INT && showInfo.isSelected()) {
caption.infoAdd();
} else if (level == DesignerLogger.ERROR_INT && showError.isSelected()) {
} else if (level == DesignerLogger.WARN_INT && showError.isSelected()) {
caption.errorAdd();
} else if (level == DesignerLogger.WARN_INT && showServer.isSelected()) {
} else if (level == DesignerLogger.ERROR_INT && showServer.isSelected()) {
caption.serverAdd();
}
}
@ -343,7 +346,7 @@ public class DesignerLogHandler {
this.copy.setEnabled(true);
this.clear.setEnabled(true);
if (ComparatorUtils.equals(this.jTextArea.getText(), "")) {
if (ComparatorUtils.equals(this.jTextArea.getText(), StringUtils.EMPTY)) {
this.selectAll.setEnabled(false);
this.clear.setEnabled(false);
}
@ -367,7 +370,7 @@ public class DesignerLogHandler {
} else if (ComparatorUtils.equals(evt.getActionCommand(), LogHandlerArea.this.copy.getText())) {
LogHandlerArea.this.jTextArea.copy();
} else if (ComparatorUtils.equals(evt.getActionCommand(), LogHandlerArea.this.clear.getText())) {
LogHandlerArea.this.jTextArea.setText("");
LogHandlerArea.this.jTextArea.setText(StringUtils.EMPTY);
caption.clearMessage();
}
}

Loading…
Cancel
Save