Browse Source

Merge pull request #350 in BA/design from ~HUGH_FINEREPORT.COM/zsydesign:master to master

* commit '0de680847888a0ed999e5d472c686873ece1723d':
  输出日志国际化
  使服务器配置能够读取到插件中添加的控件
master
superman 8 years ago
parent
commit
e4911a578b
  1. 14
      designer/src/com/fr/design/webattr/WriteToolBarPane.java
  2. 7
      designer_base/src/com/fr/design/DesignerEnvManager.java

14
designer/src/com/fr/design/webattr/WriteToolBarPane.java

@ -2,6 +2,7 @@ package com.fr.design.webattr;
import com.fr.base.BaseUtils;
import com.fr.base.ConfigManager;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.gui.core.WidgetOption;
@ -22,10 +23,12 @@ import com.fr.stable.Constants;
import com.fr.web.attr.ReportWebAttr;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class WriteToolBarPane extends AbstractEditToolBarPane {
@ -103,12 +106,12 @@ public class WriteToolBarPane extends AbstractEditToolBarPane {
toolBarManager.setToolBarLocation(Location.createTopEmbedLocation());
this.toolBarManagers = new ToolBarManager[]{toolBarManager};
}
private ActionListener editBtnListener = new ActionListener() {
public void actionPerformed(ActionEvent e) {
final DragToolBarPane dragToolbarPane = new DragToolBarPane();
dragToolbarPane.setDefaultToolBar(ToolBarManager.createDefaultWriteToolBar(), ReportWebWidgetConstants.getWriteToolBarInstance());
dragToolbarPane.setDefaultToolBar(ToolBarManager.createDefaultWriteToolBar(), getToolBarInstance());
dragToolbarPane.populateBean(WriteToolBarPane.this.toolBarManagers);
BasicDialog toobarDialog = dragToolbarPane.showWindow(SwingUtilities.getWindowAncestor(WriteToolBarPane.this));
toobarDialog.addDialogActionListener(new DialogActionAdapter() {
@ -130,7 +133,12 @@ public class WriteToolBarPane extends AbstractEditToolBarPane {
@Override
protected WidgetOption[] getToolBarInstance() {
return ReportWebWidgetConstants.getWriteToolBarInstance();
List<WidgetOption> defaultOptions = Arrays.asList(ReportWebWidgetConstants.getWriteToolBarInstance());
List<WidgetOption> extraOptions = Arrays.asList(ExtraDesignClassManager.getInstance().getWebWidgetOptions());
List<WidgetOption> options = new ArrayList<WidgetOption>();
options.addAll(defaultOptions);
options.addAll(extraOptions);
return options.toArray(new WidgetOption[options.size()]);
}
@Override

7
designer_base/src/com/fr/design/DesignerEnvManager.java

@ -20,6 +20,7 @@ import com.fr.stable.xml.*;
import javax.swing.*;
import javax.swing.SwingWorker.StateValue;
import java.awt.*;
import java.io.*;
import java.util.*;
@ -28,6 +29,7 @@ import java.util.Map.Entry;
import java.util.logging.FileHandler;
import java.util.logging.Handler;
import java.util.logging.Level;
import java.util.logging.LogRecord;
import java.util.logging.SimpleFormatter;
/**
@ -226,7 +228,8 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
StableUtils.makesureFileExist(new java.io.File(fileName));
}
Handler handler = new FileHandler(fileName, true);
handler.setFormatter(new SimpleFormatter());
handler.setFormatter(new FRLogFormatter());
FRContext.getLogger().addLogHandler(handler);
} catch (SecurityException e) {
FRContext.getLogger().error(e.getMessage(), e);
@ -235,7 +238,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
}
}
}
private File getDesignerEnvFile() {
File envFile = getEnvFile();
// james:FineReportEnv.xml文件没有必要做兼容,里面保存的主要是界面布局以及设计器激活的信息

Loading…
Cancel
Save