Browse Source

使服务器配置能够读取到插件中添加的控件

master
hugh 8 years ago
parent
commit
62a9e14c4e
  1. 12
      designer/src/com/fr/design/webattr/WriteToolBarPane.java

12
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 {
@ -108,7 +111,7 @@ public class WriteToolBarPane extends AbstractEditToolBarPane {
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

Loading…
Cancel
Save