Browse Source

Merge pull request #173 in BA/design from ~NEIL/design:release to master

* commit 'a371b8d62e6c550dbccfa80cc78ad0d33f034371': (37 commits)
  module
  1
  单元格血缘关系, 自定义gridui接口
  rt
  不可变接口增加一个层级系数,用于可以指定插件的优先级
  设计器部分接口简化
  简化插件接口添加
  rt
  表单设计器获取数据集参数
  rt
  rt
  rt
  rt
  rt
  rt
  rt
  rt
  rt
  rt
  rt
  ...
master
superman 9 years ago
parent
commit
fe480d5a92
  1. 3
      designer/src/com/fr/design/actions/utils/DeprecatedActionManager.java
  2. 3
      designer/src/com/fr/design/condition/HighLightConditionAttributesPane.java
  3. 2
      designer/src/com/fr/design/condition/PaddingPane.java
  4. 3
      designer/src/com/fr/design/mainframe/ElementCasePane.java
  5. 6
      designer/src/com/fr/design/mainframe/JWorkBook.java
  6. 2
      designer/src/com/fr/design/mainframe/cell/CellElementEditPane.java
  7. 37
      designer/src/com/fr/design/module/DesignerModule.java
  8. 3
      designer/src/com/fr/design/present/PresentPane.java
  9. 5
      designer/src/com/fr/design/report/ReportExportAttrPane.java
  10. 2
      designer/src/com/fr/design/report/VerifierListPane.java
  11. 4
      designer/src/com/fr/design/webattr/EditToolBar.java
  12. 2
      designer/src/com/fr/design/widget/WidgetPane.java
  13. 15
      designer/src/com/fr/design/write/submit/SubmitVisitorListPane.java
  14. 17
      designer/src/com/fr/grid/DefaultGridUIProcessor.java
  15. 26
      designer/src/com/fr/grid/Grid.java
  16. 49
      designer/src/com/fr/grid/GridUI.java
  17. 920
      designer_base/src/com/fr/design/ExtraDesignClassManager.java
  18. 4
      designer_base/src/com/fr/design/data/datapane/TableDataCreatorProducer.java
  19. 2
      designer_base/src/com/fr/design/data/datapane/TableDataTreePane.java
  20. 14
      designer_base/src/com/fr/design/data/datapane/connect/ConnectionListPane.java
  21. 2
      designer_base/src/com/fr/design/data/tabledata/tabledatapane/TableDataManagerPane.java
  22. 4
      designer_base/src/com/fr/design/data/tabledata/wrapper/TableDataFactory.java
  23. 2
      designer_base/src/com/fr/design/formula/FormulaFactory.java
  24. 3
      designer_base/src/com/fr/design/fun/BackgroundQuickUIProvider.java
  25. 5
      designer_base/src/com/fr/design/fun/BackgroundUIProvider.java
  26. 4
      designer_base/src/com/fr/design/fun/CellAttributeProvider.java
  27. 2
      designer_base/src/com/fr/design/fun/CellWidgetOptionProvider.java
  28. 4
      designer_base/src/com/fr/design/fun/ConnectionProvider.java
  29. 4
      designer_base/src/com/fr/design/fun/DesignerEnvProcessor.java
  30. 4
      designer_base/src/com/fr/design/fun/ElementUIProvider.java
  31. 4
      designer_base/src/com/fr/design/fun/ExportAttrTabProvider.java
  32. 4
      designer_base/src/com/fr/design/fun/ExportToolBarProvider.java
  33. 4
      designer_base/src/com/fr/design/fun/FormElementCaseEditorProcessor.java
  34. 4
      designer_base/src/com/fr/design/fun/FormWidgetOptionProvider.java
  35. 4
      designer_base/src/com/fr/design/fun/GlobalListenerProvider.java
  36. 23
      designer_base/src/com/fr/design/fun/GridUIProcessor.java
  37. 3
      designer_base/src/com/fr/design/fun/HighlightProvider.java
  38. 3
      designer_base/src/com/fr/design/fun/HyperlinkProvider.java
  39. 4
      designer_base/src/com/fr/design/fun/IndentationUnitProcessor.java
  40. 4
      designer_base/src/com/fr/design/fun/JavaScriptActionProvider.java
  41. 4
      designer_base/src/com/fr/design/fun/MenuHandler.java
  42. 4
      designer_base/src/com/fr/design/fun/ParameterWidgetOptionProvider.java
  43. 4
      designer_base/src/com/fr/design/fun/PresentKindProvider.java
  44. 4
      designer_base/src/com/fr/design/fun/PreviewProvider.java
  45. 4
      designer_base/src/com/fr/design/fun/SubmitProvider.java
  46. 5
      designer_base/src/com/fr/design/fun/TableDataDefineProvider.java
  47. 4
      designer_base/src/com/fr/design/fun/TableDataPaneProcessor.java
  48. 4
      designer_base/src/com/fr/design/fun/TitlePlaceProcessor.java
  49. 4
      designer_base/src/com/fr/design/fun/ToolbarItemProvider.java
  50. 4
      designer_base/src/com/fr/design/fun/UIFormulaProcessor.java
  51. 5
      designer_base/src/com/fr/design/fun/VerifyDefineProvider.java
  52. 4
      designer_base/src/com/fr/design/fun/WidgetDesignHandler.java
  53. 4
      designer_base/src/com/fr/design/fun/WidgetPropertyUIProvider.java
  54. 2
      designer_base/src/com/fr/design/fun/impl/AbstractBackgroundQuickUIProvider.java
  55. 2
      designer_base/src/com/fr/design/fun/impl/AbstractBackgroundUIProvider.java
  56. 6
      designer_base/src/com/fr/design/fun/impl/AbstractCellAttributeProvider.java
  57. 10
      designer_base/src/com/fr/design/fun/impl/AbstractCellWidgetOptionProvider.java
  58. 10
      designer_base/src/com/fr/design/fun/impl/AbstractConnectionProvider.java
  59. 6
      designer_base/src/com/fr/design/fun/impl/AbstractDesignerEnvProcessor.java
  60. 2
      designer_base/src/com/fr/design/fun/impl/AbstractElementUIProvider.java
  61. 2
      designer_base/src/com/fr/design/fun/impl/AbstractExportAttrTabProvider.java
  62. 6
      designer_base/src/com/fr/design/fun/impl/AbstractFormElementCaseEditorProcessor.java
  63. 9
      designer_base/src/com/fr/design/fun/impl/AbstractFormWidgetOptionProvider.java
  64. 10
      designer_base/src/com/fr/design/fun/impl/AbstractGlobalListenerProvider.java
  65. 15
      designer_base/src/com/fr/design/fun/impl/AbstractGridUIProcessor.java
  66. 9
      designer_base/src/com/fr/design/fun/impl/AbstractHighlightProvider.java
  67. 9
      designer_base/src/com/fr/design/fun/impl/AbstractHyperlinkProvider.java
  68. 8
      designer_base/src/com/fr/design/fun/impl/AbstractIndentationUnitProcessor.java
  69. 9
      designer_base/src/com/fr/design/fun/impl/AbstractJavaScriptActionProvider.java
  70. 2
      designer_base/src/com/fr/design/fun/impl/AbstractMenuHandler.java
  71. 9
      designer_base/src/com/fr/design/fun/impl/AbstractParameterWidgetOptionProvider.java
  72. 10
      designer_base/src/com/fr/design/fun/impl/AbstractPresentKindProvider.java
  73. 9
      designer_base/src/com/fr/design/fun/impl/AbstractPreviewProvider.java
  74. 29
      designer_base/src/com/fr/design/fun/impl/AbstractServerTableDataDefineProvider.java
  75. 10
      designer_base/src/com/fr/design/fun/impl/AbstractSubmitProvider.java
  76. 6
      designer_base/src/com/fr/design/fun/impl/AbstractTDPaneProcessor.java
  77. 25
      designer_base/src/com/fr/design/fun/impl/AbstractTableDataDefineProvider.java
  78. 6
      designer_base/src/com/fr/design/fun/impl/AbstractTitleProcessor.java
  79. 9
      designer_base/src/com/fr/design/fun/impl/AbstractToolbarItem.java
  80. 6
      designer_base/src/com/fr/design/fun/impl/AbstractUIFormulaProcessor.java
  81. 2
      designer_base/src/com/fr/design/fun/impl/AbstractVerifyDefineProvider.java
  82. 11
      designer_base/src/com/fr/design/fun/impl/AbstractWidgetDesignHandler.java
  83. 2
      designer_base/src/com/fr/design/fun/impl/AbstractWidgetPropertyUIProvider.java
  84. 5
      designer_base/src/com/fr/design/gui/frpane/HyperlinkGroupPane.java
  85. 6
      designer_base/src/com/fr/design/gui/style/AlignmentPane.java
  86. 3
      designer_base/src/com/fr/design/gui/style/BackgroundPane.java
  87. 3
      designer_base/src/com/fr/design/javascript/JavaScriptActionPane.java
  88. 15
      designer_base/src/com/fr/design/mainframe/AbstractAppProvider.java
  89. 5
      designer_base/src/com/fr/design/mainframe/App.java
  90. 2
      designer_base/src/com/fr/design/mainframe/DesignerFrame.java
  91. 3
      designer_base/src/com/fr/design/mainframe/DesignerFrameFileDealerPane.java
  92. 17
      designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java
  93. 16
      designer_base/src/com/fr/design/menu/ShortCut.java
  94. 5
      designer_base/src/com/fr/design/module/DesignModule.java
  95. 5
      designer_base/src/com/fr/design/style/AlignmentPane.java
  96. 4
      designer_base/src/com/fr/design/style/background/BackgroundFactory.java
  97. 2
      designer_base/src/com/fr/design/utils/DesignUtils.java
  98. 2
      designer_base/src/com/fr/env/RemoteEnv.java
  99. 9
      designer_base/src/com/fr/start/BaseDesigner.java
  100. 2
      designer_chart/src/com/fr/design/module/ChartDesignerModule.java
  101. Some files were not shown because too many files have changed in this diff Show More

3
designer/src/com/fr/design/actions/utils/DeprecatedActionManager.java

@ -34,6 +34,7 @@ import com.fr.report.cell.cellattr.BarcodePresent;
import com.fr.report.cell.cellattr.CurrencyLinePresent;
import javax.swing.*;
import java.util.Set;
/**
* peter: 这个方法只是临时放在这边的, 等插件系统全部完善后,立刻删除.
@ -131,7 +132,7 @@ public class DeprecatedActionManager {
presentMenu.addShortCut(barcodeAction);
presentMenu.addShortCut(currencyLineAction);
PresentKindProvider[] providers = ExtraDesignClassManager.getInstance().getPresentKindProviders();
Set<PresentKindProvider> providers = ExtraDesignClassManager.getInstance().getArray(PresentKindProvider.MARK_STRING);
for (PresentKindProvider provider : providers) {
NewPresentAction action = new NewPresentAction(ePane, provider.title(), provider.kindOfPresent().getName());
action.setMnemonic(provider.mnemonic());

3
designer/src/com/fr/design/condition/HighLightConditionAttributesPane.java

@ -9,6 +9,7 @@ import com.fr.report.cell.cellattr.highlight.*;
import javax.swing.*;
import java.awt.*;
import java.util.Iterator;
import java.util.Set;
public class HighLightConditionAttributesPane extends ConditionAttributesPane<DefaultHighlight> {
@ -48,7 +49,7 @@ public class HighLightConditionAttributesPane extends ConditionAttributesPane<De
classPaneMap.put(BorderHighlightAction.class, new BorderHighlightPane(this));
classPaneMap.put(WidgetHighlightAction.class, new WidgetHighlightPane(this));
classPaneMap.put(ValueHighlightAction.class, new NewRealValuePane(this));
HighlightProvider[] providers = ExtraDesignClassManager.getInstance().getHighlightProviders();
Set<HighlightProvider> providers = ExtraDesignClassManager.getInstance().getArray(HighlightProvider.MARK_STRING);
for (HighlightProvider provider : providers) {
classPaneMap.put(provider.classForHighlightAction(), provider.appearanceForCondition(this));
}

2
designer/src/com/fr/design/condition/PaddingPane.java

@ -46,7 +46,7 @@ public class PaddingPane extends ConditionAttrSingleConditionPane<HighlightActio
this.paddingLeftSpinner.setValue(new Integer(0));
this.paddingRightSpinner.setValue(new Integer(0));
this.indentationUnitProcessor = ExtraDesignClassManager.getInstance().getIndentationUnitEditor();
this.indentationUnitProcessor = ExtraDesignClassManager.getInstance().getSingle(IndentationUnitProcessor.MARK_STRING);
if (null == this.indentationUnitProcessor) {
this.indentationUnitProcessor = new DefaultIndentationUnitProcessor();
}

3
designer/src/com/fr/design/mainframe/ElementCasePane.java

@ -18,6 +18,7 @@ import java.awt.event.KeyEvent;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.lang.reflect.Constructor;
import java.util.Set;
import javax.swing.AbstractAction;
import javax.swing.ActionMap;
@ -384,7 +385,7 @@ public abstract class ElementCasePane<T extends TemplateElementCase> extends Tar
}
private void addExtraCellEditor(Grid grid) {
ElementUIProvider[] providers = ExtraDesignClassManager.getInstance().getElementUIProviders();
Set<ElementUIProvider> providers = ExtraDesignClassManager.getInstance().getArray(ElementUIProvider.MARK_STRING);
for (ElementUIProvider provider : providers) {
CellEditor editor = null;
Class<?> clazz = provider.targetCellEditorClass();

6
designer/src/com/fr/design/mainframe/JWorkBook.java

@ -69,6 +69,7 @@ import java.io.FileOutputStream;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Set;
/**
* JWorkBook used to edit WorkBook.
@ -660,9 +661,10 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> {
*
*/
public PreviewProvider[] supportPreview() {
return (PreviewProvider[])ArrayUtils.addAll(new PreviewProvider[]{
Set<PreviewProvider> set = ExtraDesignClassManager.getInstance().getArray(PreviewProvider.MARK_STRING);
return ArrayUtils.addAll(new PreviewProvider[]{
new PagePreview(), new WritePreview(), new ViewPreview()
}, ExtraDesignClassManager.getInstance().getPreviewProviders());
}, set.toArray(new PreviewProvider[set.size()]));
}
/**

2
designer/src/com/fr/design/mainframe/cell/CellElementEditPane.java

@ -180,7 +180,7 @@ public class CellElementEditPane extends BasicPane {
paneList.add(new CellPresentPane());
paneList.add(new CellOtherSetPane());
cellAttributeProvider = ExtraDesignClassManager.getInstance().getCelllAttributeProvider();
cellAttributeProvider = ExtraDesignClassManager.getInstance().getSingle(CellAttributeProvider.MARK_STRING);
if (cellAttributeProvider != null){
paneList.add((AbstractCellAttrPane) cellAttributeProvider.createCellAttributePane());
}

37
designer/src/com/fr/design/module/DesignerModule.java

@ -14,15 +14,8 @@ import com.fr.design.actions.insert.flot.ImageFloatAction;
import com.fr.design.actions.insert.flot.TextBoxFloatAction;
import com.fr.design.actions.server.StyleListAction;
import com.fr.design.fun.ElementUIProvider;
import com.fr.design.gui.controlpane.NameObjectCreator;
import com.fr.design.gui.controlpane.NameableCreator;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.hyperlink.ReportletHyperlinkPane;
import com.fr.design.hyperlink.WebHyperlinkPane;
import com.fr.design.javascript.EmailPane;
import com.fr.design.javascript.JavaScriptImplPane;
import com.fr.design.javascript.ParameterJavaScriptPane;
import com.fr.design.javascript.ProcessTransitionAdapter;
import com.fr.design.mainframe.*;
import com.fr.design.mainframe.bbs.BBSGuestPane;
@ -38,7 +31,6 @@ import com.fr.general.*;
import com.fr.general.xml.GeneralXMLTools;
import com.fr.io.importer.Excel2007ReportImporter;
import com.fr.io.importer.ExcelReportImporter;
import com.fr.js.*;
import com.fr.main.impl.WorkBook;
import com.fr.plugin.ExtraClassManager;
import com.fr.quickeditor.ChartQuickEditor;
@ -54,9 +46,12 @@ import com.fr.stable.ArrayUtils;
import com.fr.stable.ParameterProvider;
import com.fr.stable.StringUtils;
import com.fr.stable.bridge.StableFactory;
import com.fr.stable.module.Module;
import com.fr.stable.fun.LogProvider;
import com.fr.stable.plugin.PluginSimplify;
import com.fr.stable.script.CalculatorProviderContext;
import com.fr.stable.script.ValueConverter;
import com.fr.stable.web.ServletContext;
import com.fr.stable.web.ServletContextAdapter;
import com.fr.stable.xml.ObjectTokenizer;
import com.fr.stable.xml.ObjectXMLWriterFinder;
import com.fr.start.BBSGuestPaneProvider;
@ -69,9 +64,19 @@ import java.awt.event.ActionListener;
import java.awt.image.BufferedImage;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.Set;
public class DesignerModule extends DesignModule {
static {
ServletContext.addServletContextListener(new ServletContextAdapter() {
public void onServletStart() {
ModuleContext.startModule(DesignerModule.class.getName());
}
});
}
/**
* 启动设计器模块
*/
@ -94,7 +99,7 @@ public class DesignerModule extends DesignModule {
InformationCollector.getInstance().collectStartTime();
ExtraDesignClassManager.getInstance().getFeedback().didFeedback();
ExtraClassManager.getInstance().addLogProvider(DesignerLogImpl.getInstance());
ExtraClassManager.getInstance().addMutable(LogProvider.MARK_STRING, DesignerLogImpl.getInstance(), PluginSimplify.NULL);
}
private void registerOtherPane() {
@ -118,7 +123,7 @@ public class DesignerModule extends DesignModule {
ActionFactory.registerChartCellEditorInEditor(ChartQuickEditor.getInstance());
ElementUIProvider[] providers = ExtraDesignClassManager.getInstance().getElementUIProviders();
Set<ElementUIProvider> providers = ExtraDesignClassManager.getInstance().getArray(ElementUIProvider.MARK_STRING);
for (ElementUIProvider provider : providers) {
ActionFactory.registerCellEditor(provider.targetObjectClass(), provider.quickEditor());
}
@ -222,6 +227,16 @@ public class DesignerModule extends DesignModule {
public JTemplate<WorkBook, ?> openTemplate(FILE tplFile) {
return new JWorkBook(asIOFile(tplFile), tplFile);
}
@Override
public String mark4Provider() {
return getClass().getName();
}
@Override
public void process() {
}
}
@Override

3
designer/src/com/fr/design/present/PresentPane.java

@ -16,6 +16,7 @@ import com.fr.report.cell.cellattr.CurrencyLinePresent;
import java.awt.event.ItemListener;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
/**
* @author zhou
@ -86,7 +87,7 @@ public class PresentPane extends UIComboBoxPane<Present> {
keys.add(CurrencyLinePresent.class.getName());
displays.add(currency.title4PopupWindow());
PresentKindProvider[] providers = ExtraDesignClassManager.getInstance().getPresentKindProviders();
Set<PresentKindProvider> providers = ExtraDesignClassManager.getInstance().getArray(PresentKindProvider.MARK_STRING);
for (PresentKindProvider provider : providers) {
FurtherBasicBeanPane<? extends Present> extra = provider.appearanceForPresent();
paneList.add(extra);

5
designer/src/com/fr/design/report/ReportExportAttrPane.java

@ -11,6 +11,7 @@ import com.fr.io.attr.ReportExportAttr;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
public class ReportExportAttrPane extends BasicPane {
@ -29,8 +30,8 @@ public class ReportExportAttrPane extends BasicPane {
uiTabbedPane.addTab("PDF", pdfExportPane);
wordExportPane = new WordExportPane();
uiTabbedPane.addTab("Word", wordExportPane);
ExportAttrTabProvider[] providers = ExtraDesignClassManager.getInstance().getExportAttrTabProviders();
paneList = new ArrayList<AbstractExportPane>();
Set<ExportAttrTabProvider> providers = ExtraDesignClassManager.getInstance().getArray(ExportAttrTabProvider.XML_TAG);
paneList = new ArrayList<>();
for (ExportAttrTabProvider provider : providers) {
uiTabbedPane.addTab(provider.title(), provider.toSwingComponent());
paneList.add(provider.toExportPane());

2
designer/src/com/fr/design/report/VerifierListPane.java

@ -1 +1 @@
package com.fr.design.report; import com.fr.data.Verifier; import com.fr.design.ExtraDesignClassManager; import com.fr.design.fun.VerifyDefineProvider; import com.fr.design.gui.controlpane.NameObjectCreator; import com.fr.design.gui.controlpane.NameableCreator; import com.fr.design.gui.controlpane.ObjectJControlPane; import com.fr.design.mainframe.ElementCasePane; import com.fr.general.Inter; import com.fr.general.NameObject; import com.fr.report.write.ReportWriteAttr; import com.fr.report.write.ValueVerifier; import com.fr.report.write.WClassVerifier; import com.fr.stable.ArrayUtils; import com.fr.stable.Nameable; import java.util.ArrayList; /** * 校验列表 */ public class VerifierListPane extends ObjectJControlPane { public VerifierListPane(ElementCasePane ePane) { super(ePane); } /** * 创建选项 * * @return 选项 */ public NameableCreator[] createNameableCreators() { NameableCreator[] creators = new NameableCreator[]{ new NameObjectCreator(Inter.getLocText(new String[]{"BuildIn", "Verify"}), "/com/fr/web/images/reportlet.png", ValueVerifier.class, BuildInVerifierPane.class) }; for (VerifyDefineProvider provider : ExtraDesignClassManager.getInstance().getVerifyDefineProviders()) { creators = ArrayUtils.add(creators, new NameObjectCreator( provider.nameForVerifier(), provider.iconPath(), provider.classForVerifier(), provider.appearanceForVerifier() ) { }); } creators = ArrayUtils.add(creators, new NameObjectCreator( Inter.getLocText(new String[]{"Custom", "Verify"}), "/com/fr/web/images/reportlet.png", WClassVerifier.class, CustomVerifierPane.class)); return creators; } @Override protected String title4PopupWindow() { return "Verify Collections"; } public void populate(ReportWriteAttr reportWriteAttr) { if (reportWriteAttr == null) { return; } java.util.List<NameObject> nameObjectList = new ArrayList<>(); int verifierCount = reportWriteAttr.getVerifierCount(); for (int i = 0; i < verifierCount; i++) { Verifier verifier = reportWriteAttr.getVerifier(i); nameObjectList.add(new NameObject(verifier.getName(), verifier)); } this.populate(nameObjectList.toArray(new NameObject[nameObjectList.size()])); } public void updateReportWriteAttr(ReportWriteAttr reportWriteAttr) { // Nameable[]居然不能强转成NameObject[],一定要这么写... Nameable[] res = this.update(); NameObject[] res_array = new NameObject[res.length]; java.util.Arrays.asList(res).toArray(res_array); reportWriteAttr.clearVerifiers(); for (int i = 0; i < res_array.length; i++) { NameObject nameObject = res_array[i]; if (nameObject.getObject() instanceof Verifier) { Verifier verifier = (Verifier) nameObject.getObject(); verifier.setName(nameObject.getName()); reportWriteAttr.addVerifier(verifier); } } } }
package com.fr.design.report; import com.fr.data.Verifier; import com.fr.design.ExtraDesignClassManager; import com.fr.design.fun.VerifyDefineProvider; import com.fr.design.gui.controlpane.NameObjectCreator; import com.fr.design.gui.controlpane.NameableCreator; import com.fr.design.gui.controlpane.ObjectJControlPane; import com.fr.design.mainframe.ElementCasePane; import com.fr.general.Inter; import com.fr.general.NameObject; import com.fr.report.write.ReportWriteAttr; import com.fr.report.write.ValueVerifier; import com.fr.report.write.WClassVerifier; import com.fr.stable.ArrayUtils; import com.fr.stable.Nameable; import java.util.ArrayList; import java.util.Set; /** * 校验列表 */ public class VerifierListPane extends ObjectJControlPane { public VerifierListPane(ElementCasePane ePane) { super(ePane); } /** * 创建选项 * * @return 选项 */ public NameableCreator[] createNameableCreators() { NameableCreator[] creators = new NameableCreator[]{ new NameObjectCreator(Inter.getLocText(new String[]{"BuildIn", "Verify"}), "/com/fr/web/images/reportlet.png", ValueVerifier.class, BuildInVerifierPane.class) }; Set<VerifyDefineProvider> set = ExtraDesignClassManager.getInstance().getArray(VerifyDefineProvider.MARK_STRING); for (VerifyDefineProvider provider : set) { creators = ArrayUtils.add(creators, new NameObjectCreator( provider.nameForVerifier(), provider.iconPath(), provider.classForVerifier(), provider.appearanceForVerifier() ) { }); } creators = ArrayUtils.add(creators, new NameObjectCreator( Inter.getLocText(new String[]{"Custom", "Verify"}), "/com/fr/web/images/reportlet.png", WClassVerifier.class, CustomVerifierPane.class)); return creators; } @Override protected String title4PopupWindow() { return "Verify Collections"; } public void populate(ReportWriteAttr reportWriteAttr) { if (reportWriteAttr == null) { return; } java.util.List<NameObject> nameObjectList = new ArrayList<>(); int verifierCount = reportWriteAttr.getVerifierCount(); for (int i = 0; i < verifierCount; i++) { Verifier verifier = reportWriteAttr.getVerifier(i); nameObjectList.add(new NameObject(verifier.getName(), verifier)); } this.populate(nameObjectList.toArray(new NameObject[nameObjectList.size()])); } public void updateReportWriteAttr(ReportWriteAttr reportWriteAttr) { // Nameable[]居然不能强转成NameObject[],一定要这么写... Nameable[] res = this.update(); NameObject[] res_array = new NameObject[res.length]; java.util.Arrays.asList(res).toArray(res_array); reportWriteAttr.clearVerifiers(); for (int i = 0; i < res_array.length; i++) { NameObject nameObject = res_array[i]; if (nameObject.getObject() instanceof Verifier) { Verifier verifier = (Verifier) nameObject.getObject(); verifier.setName(nameObject.getName()); reportWriteAttr.addVerifier(verifier); } } } }

4
designer/src/com/fr/design/webattr/EditToolBar.java

@ -47,6 +47,7 @@ import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
public class EditToolBar extends BasicPane {
@ -354,7 +355,8 @@ public class EditToolBar extends BasicPane {
* 初始化元素
*/
public void initComponents() {
exportToolBarProviders = ExtraDesignClassManager.getInstance().getExportToolBarProviders();
Set<ExportToolBarProvider> set = ExtraDesignClassManager.getInstance().getArray(ExportToolBarProvider.XML_TAG);
exportToolBarProviders = set.toArray(new ExportToolBarProvider[set.size()]);
this.setLayout(FRGUIPaneFactory.createBorderLayout());
JPanel north = FRGUIPaneFactory.createBorderLayout_S_Pane();
icon = new UICheckBox(Inter.getLocText("FR-Designer_Show_Icon"));

2
designer/src/com/fr/design/widget/WidgetPane.java

@ -69,7 +69,7 @@ public class WidgetPane extends BasicPane implements ItemListener {
if (e.getStateChange() == ItemEvent.SELECTED) {
Widget oldWidget = update();
Widget selectedItem = editorTypeComboBox.getCellWidget();
WidgetDesignHandler handler = ExtraDesignClassManager.getInstance().getWidgetDesignHandler();
WidgetDesignHandler handler = ExtraDesignClassManager.getInstance().getSingle(WidgetDesignHandler.XML_TAG);
if (handler != null) {
handler.transferWidgetProperties(oldWidget, selectedItem);
}

15
designer/src/com/fr/design/write/submit/SubmitVisitorListPane.java

@ -21,7 +21,6 @@ import com.fr.report.write.BuiltInSQLSubmiter;
import com.fr.report.write.ReportWriteAttr;
import com.fr.report.write.SubmitVisitor;
import com.fr.report.write.WClassSubmiter;
import com.fr.stable.ArrayUtils;
import com.fr.stable.Nameable;
import com.fr.write.BuiltInSQLSubmiterProvider;
import com.fr.write.DBManipulation;
@ -31,10 +30,8 @@ import javax.swing.*;
import java.awt.*;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.*;
import java.util.List;
import java.util.Map;
public class SubmitVisitorListPane extends ObjectJControlPane {
@ -172,17 +169,17 @@ public class SubmitVisitorListPane extends ObjectJControlPane {
public CustomPane() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
customCardPane = FRGUIPaneFactory.createCardLayout_S_Pane();
customSubmitPanes = new HashMap<String, BasicBeanPane>();
comboItemsMap = new HashMap<String, String>();
customSubmitPanes = new HashMap<>();
comboItemsMap = new HashMap<>();
SubmitProvider[] providers = ExtraDesignClassManager.getInstance().getSubmitProviders();
providers = (SubmitProvider[]) ArrayUtils.add(providers, new DefaultSubmit());
Set<SubmitProvider> providers = ExtraDesignClassManager.getInstance().getArray(SubmitProvider.MARK_STRING);
providers.add(new DefaultSubmit());
for (SubmitProvider provider : providers) {
customSubmitPanes.put(provider.keyForSubmit(), provider.appearanceForSubmit());
comboItemsMap.put(provider.keyForSubmit(), provider.dataForSubmit());
}
configTypes = new ArrayList<String>();
configTypes = new ArrayList<>();
for (Map.Entry<String, BasicBeanPane> entry : customSubmitPanes.entrySet()) {
String key = entry.getKey();
configTypes.add(comboItemsMap.get(key));

17
designer/src/com/fr/grid/DefaultGridUIProcessor.java

@ -0,0 +1,17 @@
package com.fr.grid;
import com.fr.design.fun.impl.AbstractGridUIProcessor;
import javax.swing.plaf.ComponentUI;
/**
* Created by Administrator on 2016/6/28/0028.
*/
public class DefaultGridUIProcessor extends AbstractGridUIProcessor{
@Override
public ComponentUI appearanceForGrid(int resolution) {
return new GridUI(resolution);
}
}

26
designer/src/com/fr/grid/Grid.java

@ -3,20 +3,11 @@
*/
package com.fr.grid;
import java.awt.*;
import java.awt.event.MouseEvent;
import java.awt.geom.Point2D;
import java.util.Hashtable;
import java.util.Iterator;
import com.fr.base.DynamicUnitList;
import com.fr.design.cell.editor.CellEditor;
import com.fr.design.cell.editor.FloatEditor;
import com.fr.design.cell.editor.FormulaCellEditor;
import com.fr.design.cell.editor.GeneralCellEditor;
import com.fr.design.cell.editor.GeneralFloatEditor;
import com.fr.design.cell.editor.TextCellEditor;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.cell.editor.*;
import com.fr.design.constants.UIConstants;
import com.fr.design.fun.GridUIProcessor;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.mainframe.ElementCasePane;
import com.fr.design.utils.gui.GUICoreUtils;
@ -40,6 +31,13 @@ import com.fr.report.elementcase.ElementCase;
import com.fr.report.elementcase.TemplateElementCase;
import com.fr.stable.StringUtils;
import javax.swing.plaf.ComponentUI;
import java.awt.*;
import java.awt.event.MouseEvent;
import java.awt.geom.Point2D;
import java.util.Hashtable;
import java.util.Iterator;
/**
* Grid used to paint and edit grid.
*
@ -144,7 +142,9 @@ public class Grid extends BaseGridComponent {
*
*/
public void updateUI() {
this.setUI(new GridUI(resolution));
GridUIProcessor localGridUIProcessor = ExtraDesignClassManager.getInstance().getSingle(GridUIProcessor.MARK_STRING, new DefaultGridUIProcessor());
ComponentUI localComponentUI = localGridUIProcessor.appearanceForGrid(this.resolution);
setUI(localComponentUI);
}
/**

49
designer/src/com/fr/grid/GridUI.java

@ -1,38 +1,6 @@
package com.fr.grid;
import java.awt.AlphaComposite;
import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Composite;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Paint;
import java.awt.Rectangle;
import java.awt.Shape;
import java.awt.Stroke;
import java.awt.geom.Area;
import java.awt.geom.GeneralPath;
import java.awt.geom.Line2D;
import java.awt.geom.Line2D.Double;
import java.awt.geom.Path2D;
import java.awt.geom.Rectangle2D;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import javax.swing.JComponent;
import javax.swing.UIManager;
import javax.swing.plaf.ComponentUI;
import com.fr.base.BaseUtils;
import com.fr.base.DynamicUnitList;
import com.fr.base.FRContext;
import com.fr.base.Formula;
import com.fr.base.GraphHelper;
import com.fr.base.Margin;
import com.fr.base.PaperSize;
import com.fr.base.Utils;
import com.fr.base.*;
import com.fr.base.background.ColorBackground;
import com.fr.base.background.ImageBackground;
import com.fr.design.constants.UIConstants;
@ -70,6 +38,15 @@ import com.fr.stable.script.CalculatorUtils;
import com.fr.stable.unit.FU;
import com.fr.third.antlr.ANTLRException;
import javax.swing.*;
import javax.swing.plaf.ComponentUI;
import java.awt.*;
import java.awt.geom.*;
import java.awt.geom.Line2D.Double;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
public class GridUI extends ComponentUI {
public static int INVALID_INTEGER = Integer.MIN_VALUE;// 作为不合法的数值.
@ -438,7 +415,7 @@ public class GridUI extends ComponentUI {
paintDetailedCellElements(g2d, cells, tmpCellElement, reportPane, selectedCellElement, hideWidth, hideHeight, oldClip, report);
paintBorder(g2d, tmpCellElement, report);
paintFatherLeft(g2d);
paintFatherLeft(g2d, selectedCellElement, report);
}
private void paintDetailedCellElements(Graphics2D g2d, Iterator cells, TemplateCellElement tmpCellElement, ElementCasePane reportPane,
@ -565,7 +542,7 @@ public class GridUI extends ComponentUI {
}
}
private void paintFatherLeft(Graphics2D g2d) {
protected void paintFatherLeft(Graphics2D g2d, CellElement selectedCellElement, TemplateElementCase report) {
// 画左父格子.
if (validate(this.left_col_row_rect) && this.left_col_row_rect.getHeight() > 5) {
g2d.setPaint(Color.BLUE);
@ -827,7 +804,7 @@ public class GridUI extends ComponentUI {
}
}
private void paintFormulaCellArea(Graphics2D g2d, Area formulaCellArea, int i) {
protected void paintFormulaCellArea(Graphics2D g2d, Area formulaCellArea, int i) {
// denny: 标记格子的边框
formulaCellArea = new Area(new Rectangle2D.Double(this.tmpRectangle.getX(),
this.tmpRectangle.getY(), this.tmpRectangle.getWidth(),

920
designer_base/src/com/fr/design/ExtraDesignClassManager.java

File diff suppressed because it is too large Load Diff

4
designer_base/src/com/fr/design/data/datapane/TableDataCreatorProducer.java

@ -100,10 +100,6 @@ public class TableDataCreatorProducer {
TableDataNameObjectCreator[] creators = new TableDataNameObjectCreator[]{dataBase, ds_Class, table, fileTable, storeProcedure, multiTable, treeTable};
TableDataCreatorProvider creatorProvider = ExtraDesignClassManager.getInstance().getTableDataCreatorProvider();
if (creatorProvider != null) {
return creatorProvider.produceServerTableDataCreator(creators);
}
return merge(creators, ExtraDesignClassManager.getInstance().getServerTableDataCreators());
}

2
designer_base/src/com/fr/design/data/datapane/TableDataTreePane.java

@ -47,7 +47,7 @@ public class TableDataTreePane extends BasicTableDataTreePane {
public synchronized static BasicTableDataTreePane getInstance(DesignModelAdapter<?, ?> tc) {
TableDataPaneProcessor treePaneProcessor = ExtraDesignClassManager.getInstance().getTableDataPaneProcessor();
TableDataPaneProcessor treePaneProcessor = ExtraDesignClassManager.getInstance().getSingle(TableDataPaneProcessor.XML_TAG);
if (treePaneProcessor != null) {
return treePaneProcessor.createTableDataTreePane(tc);
}

14
designer_base/src/com/fr/design/data/datapane/connect/ConnectionListPane.java

@ -4,6 +4,7 @@ import com.fr.data.impl.Connection;
import com.fr.data.impl.JDBCDatabaseConnection;
import com.fr.data.impl.JNDIDatabaseConnection;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.fun.ConnectionProvider;
import com.fr.design.gui.controlpane.JListControlPane;
import com.fr.design.gui.controlpane.NameObjectCreator;
import com.fr.design.gui.controlpane.NameableCreator;
@ -107,9 +108,18 @@ public class ConnectionListPane extends JListControlPane {
JNDIDatabaseConnection.class,
DatabaseConnectionPane.JNDI.class
)};
NameObjectCreator[] pluginCreators = ExtraDesignClassManager.getInstance().getConnections();
Set<ConnectionProvider> pluginCreators = ExtraDesignClassManager.getInstance().getArray(ConnectionProvider.XML_TAG);
for (ConnectionProvider provider : pluginCreators) {
NameObjectCreator creator = new NameObjectCreator(
provider.nameForConnection(),
provider.iconPathForConnection(),
provider.classForConnection(),
provider.appearanceForConnection()
);
creators = ArrayUtils.add(creators, creator);
}
return (NameableCreator[]) ArrayUtils.addAll(creators, pluginCreators);
return creators;
}
@Override

2
designer_base/src/com/fr/design/data/tabledata/tabledatapane/TableDataManagerPane.java

@ -40,7 +40,7 @@ public class TableDataManagerPane extends LoadingBasicPane {
this.tableDataTextField = new UITextField();
tableDataPathPane.add(tableDataTextField, BorderLayout.CENTER);
this.tableDataTextField.setEditable(false);
TableDataPaneProcessor paneProcessor = ExtraDesignClassManager.getInstance().getTableDataPaneProcessor();
TableDataPaneProcessor paneProcessor = ExtraDesignClassManager.getInstance().getSingle(TableDataPaneProcessor.XML_TAG);
TableDataPaneController pane = null;
if (paneProcessor != null) {
pane = paneProcessor.createServerTableDataPane(DesignModelAdapter.getCurrentModelAdapter()

4
designer_base/src/com/fr/design/data/tabledata/wrapper/TableDataFactory.java

@ -59,10 +59,6 @@ public abstract class TableDataFactory {
}
private static TableDataNameObjectCreator getTableDataNameObjectCreator(TableData tabledata) {
TableDataCreatorProvider creatorProvider = ExtraDesignClassManager.getInstance().getTableDataCreatorProvider();
if (creatorProvider != null) {
map.putAll(creatorProvider.registerMap());
}
TableDataNameObjectCreator tableDataNameObjectCreator = map.get(tabledata.getClass().getName());
if (tableDataNameObjectCreator == null) {
tableDataNameObjectCreator = map.get(tabledata.getClass().getSuperclass().getName());

2
designer_base/src/com/fr/design/formula/FormulaFactory.java

@ -20,7 +20,7 @@ public class FormulaFactory {
}
private static UIFormulaProcessor get() {
UIFormulaProcessor processor = ExtraDesignClassManager.getInstance().getUIFormulaProcessor();
UIFormulaProcessor processor = ExtraDesignClassManager.getInstance().getSingle(UIFormulaProcessor.MARK_STRING);
if (processor == null) {
processor = new DefaultUIFormulaProcessor();
}

3
designer_base/src/com/fr/design/fun/BackgroundQuickUIProvider.java

@ -3,12 +3,13 @@ package com.fr.design.fun;
import com.fr.design.mainframe.backgroundpane.BackgroundQuickPane;
import com.fr.stable.fun.Level;
import com.fr.stable.fun.Provider;
import com.fr.stable.fun.mark.Mutable;
/**
* Created by richie on 16/5/18.
* 背景设置界面接口,用于扩展设置更多类型的背景
*/
public interface BackgroundQuickUIProvider extends Level, Provider {
public interface BackgroundQuickUIProvider extends Mutable {
String MARK_STRING = "BackgroundQuickUIProvider";

5
designer_base/src/com/fr/design/fun/BackgroundUIProvider.java

@ -2,13 +2,12 @@ package com.fr.design.fun;
import com.fr.design.style.background.BackgroundDetailPane;
import com.fr.general.Background;
import com.fr.stable.fun.Level;
import com.fr.stable.fun.Provider;
import com.fr.stable.fun.mark.Mutable;
/**
* Created by richie on 16/5/18.
*/
public interface BackgroundUIProvider extends Level, Provider {
public interface BackgroundUIProvider extends Mutable {
String MARK_STRING = "BackgroundUIProvider";

4
designer_base/src/com/fr/design/fun/CellAttributeProvider.java

@ -1,12 +1,12 @@
package com.fr.design.fun;
import com.fr.design.gui.frpane.AbstractAttrNoScrollPane;
import com.fr.stable.fun.Level;
import com.fr.stable.fun.mark.Immutable;
/**
* Created by zhouping on 2015/11/11.
*/
public interface CellAttributeProvider extends Level{
public interface CellAttributeProvider extends Immutable{
String MARK_STRING = "CellAttributeProvider";
int CURRENT_LEVEL = 1;

2
designer_base/src/com/fr/design/fun/CellWidgetOptionProvider.java

@ -10,7 +10,7 @@ import com.fr.stable.fun.Level;
* @since 8.0
* 格子中的自定义控件接口
*/
public interface CellWidgetOptionProvider extends ParameterWidgetOptionProvider, Level {
public interface CellWidgetOptionProvider extends ParameterWidgetOptionProvider {
String XML_TAG = "CellWidgetOptionProvider";

4
designer_base/src/com/fr/design/fun/ConnectionProvider.java

@ -2,13 +2,13 @@ package com.fr.design.fun;
import com.fr.data.impl.Connection;
import com.fr.design.beans.BasicBeanPane;
import com.fr.stable.fun.Level;
import com.fr.stable.fun.mark.Mutable;
/**
* @author : richie
* @since : 8.0
*/
public interface ConnectionProvider extends Level {
public interface ConnectionProvider extends Mutable {
public static final String XML_TAG = "ConnectionProvider";

4
designer_base/src/com/fr/design/fun/DesignerEnvProcessor.java

@ -1,6 +1,6 @@
package com.fr.design.fun;
import com.fr.stable.fun.Level;
import com.fr.stable.fun.mark.Immutable;
/**
* 在env加载之前, 修改env参数的接口
@ -9,7 +9,7 @@ import com.fr.stable.fun.Level;
*
* Created by Administrator on 2016/3/31/0031.
*/
public interface DesignerEnvProcessor extends Level{
public interface DesignerEnvProcessor extends Immutable{
String XML_TAG = "DesignerEnvProcessor";
int CURRENT_LEVEL = 1;

4
designer_base/src/com/fr/design/fun/ElementUIProvider.java

@ -2,14 +2,14 @@ package com.fr.design.fun;
import com.fr.design.actions.UpdateAction;
import com.fr.design.selection.QuickEditor;
import com.fr.stable.fun.Level;
import com.fr.stable.fun.mark.Mutable;
/**
* Created by richie on 16/4/25.
* 单元格元素和悬浮元素扩展,通过实现这个接口,可以在单元格中添加更多类型的元素.
*/
public interface ElementUIProvider extends Level {
public interface ElementUIProvider extends Mutable {
String MARK_STRING = "ElementUIProvider";

4
designer_base/src/com/fr/design/fun/ExportAttrTabProvider.java

@ -1,7 +1,7 @@
package com.fr.design.fun;
import com.fr.design.report.AbstractExportPane;
import com.fr.stable.fun.Level;
import com.fr.stable.fun.mark.Mutable;
import javax.swing.*;
@ -12,7 +12,7 @@ import javax.swing.*;
/**
* 导出属性Tab页的接口
*/
public interface ExportAttrTabProvider extends Level{
public interface ExportAttrTabProvider extends Mutable {
String XML_TAG = "ExportAttrTabProvider";
int CURRENT_LEVEL = 1;

4
designer_base/src/com/fr/design/fun/ExportToolBarProvider.java

@ -1,13 +1,13 @@
package com.fr.design.fun;
import com.fr.stable.fun.Level;
import com.fr.stable.fun.mark.Mutable;
import javax.swing.*;
/**
* 导出菜单设计器端拓展用于控制该菜单是否在web端显示
*/
public interface ExportToolBarProvider extends Level{
public interface ExportToolBarProvider extends Mutable{
String XML_TAG = "ExportToolBarProvider";

4
designer_base/src/com/fr/design/fun/FormElementCaseEditorProcessor.java

@ -1,14 +1,14 @@
package com.fr.design.fun;
import com.fr.stable.fun.Level;
import com.fr.stable.fun.ReportFitAttrProvider;
import com.fr.stable.fun.mark.Immutable;
import java.beans.PropertyDescriptor;
/**
* Created by zhouping on 2015/9/10.
*/
public interface FormElementCaseEditorProcessor extends Level{
public interface FormElementCaseEditorProcessor extends Immutable {
String MARK_STRING = "PropertyEditor";

4
designer_base/src/com/fr/design/fun/FormWidgetOptionProvider.java

@ -1,14 +1,12 @@
package com.fr.design.fun;
import com.fr.stable.fun.Level;
/**
* @author richie
* @date 2015-03-23
* @since 8.0
* 表单控件
*/
public interface FormWidgetOptionProvider extends ParameterWidgetOptionProvider, Level {
public interface FormWidgetOptionProvider extends ParameterWidgetOptionProvider {
String XML_TAG = "FormWidgetOptionProvider";

4
designer_base/src/com/fr/design/fun/GlobalListenerProvider.java

@ -1,7 +1,7 @@
package com.fr.design.fun;
import com.fr.stable.fun.Level;
import com.fr.stable.fun.mark.Mutable;
import java.awt.event.AWTEventListener;
@ -9,7 +9,7 @@ import java.awt.event.AWTEventListener;
* Created by zack on 2015/8/17.
* 全局事件监听
*/
public interface GlobalListenerProvider extends Level{
public interface GlobalListenerProvider extends Mutable{
String XML_TAG = "GlobalListenerProvider";

23
designer_base/src/com/fr/design/fun/GridUIProcessor.java

@ -0,0 +1,23 @@
package com.fr.design.fun;
import com.fr.stable.fun.mark.Immutable;
import javax.swing.plaf.ComponentUI;
/**
* 自定义单元格ui接口
*
* @return
*/
public interface GridUIProcessor extends Immutable {
String MARK_STRING = "GridUIProcessor";
int CURRENT_LEVEL = 1;
/**
* 自定义gridui, 用于实现一些自定义的格子绘制.
*
* @return 自定义gridui
*/
ComponentUI appearanceForGrid(int paramInt);
}

3
designer_base/src/com/fr/design/fun/HighlightProvider.java

@ -3,11 +3,12 @@ package com.fr.design.fun;
import com.fr.design.condition.ConditionAttrSingleConditionPane;
import com.fr.design.condition.ConditionAttributesPane;
import com.fr.stable.fun.Level;
import com.fr.stable.fun.mark.Mutable;
/**
* 条件属性界面设计接口
*/
public interface HighlightProvider extends Level{
public interface HighlightProvider extends Mutable{
String MARK_STRING = "HighlightProvider";

3
designer_base/src/com/fr/design/fun/HyperlinkProvider.java

@ -2,11 +2,12 @@ package com.fr.design.fun;
import com.fr.design.gui.controlpane.NameableCreator;
import com.fr.stable.fun.Level;
import com.fr.stable.fun.mark.Mutable;
/**
* Created by zack on 2016/1/20.
*/
public interface HyperlinkProvider extends Level{
public interface HyperlinkProvider extends Mutable {
String XML_TAG = "HyperlinkProvider";
int CURRENT_LEVEL = 1;

4
designer_base/src/com/fr/design/fun/IndentationUnitProcessor.java

@ -1,11 +1,11 @@
package com.fr.design.fun;
import com.fr.stable.fun.Level;
import com.fr.stable.fun.mark.Immutable;
/**
* Created by zhouping on 2015/9/20.
*/
public interface IndentationUnitProcessor extends Level{
public interface IndentationUnitProcessor extends Immutable {
String MARK_STRING = "IndentationProcessor";
int CURRENT_LEVEL = 1;

4
designer_base/src/com/fr/design/fun/JavaScriptActionProvider.java

@ -2,12 +2,12 @@ package com.fr.design.fun;
import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.js.JavaScript;
import com.fr.stable.fun.Level;
import com.fr.stable.fun.mark.Mutable;
/**
* Created by zack on 2015/8/14.
*/
public interface JavaScriptActionProvider extends Level{
public interface JavaScriptActionProvider extends Mutable{
String XML_TAG = "JavaScriptActionProvider";

4
designer_base/src/com/fr/design/fun/MenuHandler.java

@ -2,7 +2,7 @@ package com.fr.design.fun;
import com.fr.design.mainframe.toolbar.ToolBarMenuDockPlus;
import com.fr.design.menu.ShortCut;
import com.fr.stable.fun.Level;
import com.fr.stable.fun.mark.Mutable;
/**
* @author richie
@ -10,7 +10,7 @@ import com.fr.stable.fun.Level;
* @since 8.0
* 设计器菜单栏插件接口
*/
public interface MenuHandler extends Level {
public interface MenuHandler extends Mutable {
String MARK_STRING = "MenuHandler";

4
designer_base/src/com/fr/design/fun/ParameterWidgetOptionProvider.java

@ -1,14 +1,14 @@
package com.fr.design.fun;
import com.fr.form.ui.Widget;
import com.fr.stable.fun.Level;
import com.fr.stable.fun.mark.Mutable;
/**
* @author : richie
* @since : 8.0
* 自定义参数界面控件
*/
public interface ParameterWidgetOptionProvider extends Level{
public interface ParameterWidgetOptionProvider extends Mutable {
String XML_TAG = "ParameterWidgetOptionProvider";

4
designer_base/src/com/fr/design/fun/PresentKindProvider.java

@ -2,7 +2,7 @@ package com.fr.design.fun;
import com.fr.base.present.Present;
import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.stable.fun.Level;
import com.fr.stable.fun.mark.Mutable;
/**
* @author richie
@ -10,7 +10,7 @@ import com.fr.stable.fun.Level;
* @since 8.0
* 形态类型接口
*/
public interface PresentKindProvider extends Level{
public interface PresentKindProvider extends Mutable{
int CURRENT_LEVEL = 1;

4
designer_base/src/com/fr/design/fun/PreviewProvider.java

@ -1,7 +1,7 @@
package com.fr.design.fun;
import com.fr.design.mainframe.JTemplate;
import com.fr.stable.fun.Level;
import com.fr.stable.fun.mark.Mutable;
import java.util.Map;
@ -11,7 +11,7 @@ import java.util.Map;
* @since 8.0
* 自定义预览方式接口
*/
public interface PreviewProvider extends Level{
public interface PreviewProvider extends Mutable{
String MARK_STRING = "PreviewProvider";

4
designer_base/src/com/fr/design/fun/SubmitProvider.java

@ -1,12 +1,12 @@
package com.fr.design.fun;
import com.fr.design.beans.BasicBeanPane;
import com.fr.stable.fun.Level;
import com.fr.stable.fun.mark.Mutable;
/**
* 自定义提交接口
*/
public interface SubmitProvider extends Level{
public interface SubmitProvider extends Mutable{
String MARK_STRING = "SubmitProvider";

5
designer_base/src/com/fr/design/fun/TableDataDefineProvider.java

@ -2,14 +2,15 @@ package com.fr.design.fun;
import com.fr.base.TableData;
import com.fr.design.data.tabledata.tabledatapane.AbstractTableDataPane;
import com.fr.stable.fun.Level;
import com.fr.stable.fun.mark.Mutable;
import com.fr.stable.fun.mark.Aftermath;
/**
* @author : richie
* @since : 7.1.1
* 自定义报表数据集界面接口单独存在的一个个数据集
*/
public interface TableDataDefineProvider extends Level {
public interface TableDataDefineProvider extends Mutable, Aftermath {
String XML_TAG = "TableDataDefineProvider";

4
designer_base/src/com/fr/design/fun/TableDataPaneProcessor.java

@ -4,7 +4,7 @@ import com.fr.design.DesignModelAdapter;
import com.fr.design.data.BasicTableDataTreePane;
import com.fr.design.data.datapane.TableDataPaneController;
import com.fr.design.menu.ShortCut;
import com.fr.stable.fun.Level;
import com.fr.stable.fun.mark.Immutable;
/**
* 自定义的模板服务器数据集的树样式接口 el:分组样式
@ -12,7 +12,7 @@ import com.fr.stable.fun.Level;
* Date: 2016/4/18
* Time: 9:04
*/
public interface TableDataPaneProcessor extends Level {
public interface TableDataPaneProcessor extends Immutable {
String XML_TAG = "TableDataPaneProcessor";
int CURRENT_LEVEL = 1;

4
designer_base/src/com/fr/design/fun/TitlePlaceProcessor.java

@ -1,10 +1,10 @@
package com.fr.design.fun;
import com.fr.stable.fun.Level;
import com.fr.stable.fun.mark.Immutable;
import java.awt.*;
public interface TitlePlaceProcessor extends Level{
public interface TitlePlaceProcessor extends Immutable {
String MARK_STRING = "TitlePlaceProcessor";

4
designer_base/src/com/fr/design/fun/ToolbarItemProvider.java

@ -1,14 +1,14 @@
package com.fr.design.fun;
import com.fr.form.ui.Widget;
import com.fr.stable.fun.Level;
import com.fr.stable.fun.mark.Mutable;
/**
* @author : focus
* @since : 8.0
* 自定义web工具栏菜单
*/
public interface ToolbarItemProvider extends Level{
public interface ToolbarItemProvider extends Mutable {
String XML_TAG = "ToolbarItemProvider";

4
designer_base/src/com/fr/design/fun/UIFormulaProcessor.java

@ -1,7 +1,7 @@
package com.fr.design.fun;
import com.fr.design.formula.UIFormula;
import com.fr.stable.fun.Level;
import com.fr.stable.fun.mark.Immutable;
/**
* @author richie
@ -9,7 +9,7 @@ import com.fr.stable.fun.Level;
* @since 8.0
* 公式编辑器界面处理接口
*/
public interface UIFormulaProcessor extends Level{
public interface UIFormulaProcessor extends Immutable{
String MARK_STRING = "UIFormulaProcessor";
int CURRENT_LEVEL = 1;

5
designer_base/src/com/fr/design/fun/VerifyDefineProvider.java

@ -2,13 +2,12 @@ package com.fr.design.fun;
import com.fr.data.Verifier;
import com.fr.design.beans.BasicBeanPane;
import com.fr.stable.fun.Level;
import com.fr.stable.fun.Provider;
import com.fr.stable.fun.mark.Mutable;
/**
* Created by richie on 16/6/8.
*/
public interface VerifyDefineProvider extends Level, Provider {
public interface VerifyDefineProvider extends Mutable {
String MARK_STRING = "VerifyDefineProvider";

4
designer_base/src/com/fr/design/fun/WidgetDesignHandler.java

@ -1,14 +1,14 @@
package com.fr.design.fun;
import com.fr.form.ui.Widget;
import com.fr.stable.fun.Level;
import com.fr.stable.fun.mark.Immutable;
/**
* Coder: zack
* Date: 2016/5/12
* Time: 10:37
*/
public interface WidgetDesignHandler extends Level {
public interface WidgetDesignHandler extends Immutable {
String XML_TAG = "WidgetDesignHandler";
int CURRENT_LEVEL = 1;

4
designer_base/src/com/fr/design/fun/WidgetPropertyUIProvider.java

@ -1,13 +1,13 @@
package com.fr.design.fun;
import com.fr.design.gui.itable.AbstractPropertyTable;
import com.fr.stable.fun.Level;
import com.fr.stable.fun.mark.Mutable;
/**
* Created by vito on 16/4/27.
*/
public interface WidgetPropertyUIProvider extends Level {
public interface WidgetPropertyUIProvider extends Mutable {
String XML_TAG = "WidgetPropertyUIProvider";
int CURRENT_LEVEL = 1;

2
designer_base/src/com/fr/design/fun/impl/AbstractBackgroundQuickUIProvider.java

@ -2,10 +2,12 @@ package com.fr.design.fun.impl;
import com.fr.design.fun.BackgroundQuickUIProvider;
import com.fr.stable.fun.impl.AbstractProvider;
import com.fr.stable.fun.mark.API;
/**
* Created by richie on 16/5/18.
*/
@API(level = BackgroundQuickUIProvider.CURRENT_LEVEL)
public abstract class AbstractBackgroundQuickUIProvider extends AbstractProvider implements BackgroundQuickUIProvider {
@Override

2
designer_base/src/com/fr/design/fun/impl/AbstractBackgroundUIProvider.java

@ -2,10 +2,12 @@ package com.fr.design.fun.impl;
import com.fr.design.fun.BackgroundUIProvider;
import com.fr.stable.fun.impl.AbstractProvider;
import com.fr.stable.fun.mark.API;
/**
* Created by richie on 16/5/18.
*/
@API(level = BackgroundUIProvider.CURRENT_LEVEL)
public abstract class AbstractBackgroundUIProvider extends AbstractProvider implements BackgroundUIProvider {
@Override

6
designer_base/src/com/fr/design/fun/impl/AbstractCellAttributeProvider.java

@ -1,14 +1,20 @@
package com.fr.design.fun.impl;
import com.fr.design.fun.CellAttributeProvider;
import com.fr.stable.fun.mark.API;
/**
* Created by zhouping on 2015/11/11.
*/
@API(level = CellAttributeProvider.CURRENT_LEVEL)
public abstract class AbstractCellAttributeProvider implements CellAttributeProvider {
public int currentAPILevel() {
return CURRENT_LEVEL;
}
public int layerIndex() {
return DEFAULT_LAYER_INDEX;
}
}

10
designer_base/src/com/fr/design/fun/impl/AbstractCellWidgetOptionProvider.java

@ -1,17 +1,23 @@
package com.fr.design.fun.impl;
import com.fr.design.fun.CellWidgetOptionProvider;
import com.fr.stable.fun.impl.AbstractProvider;
import com.fr.stable.fun.mark.API;
/**
* @author richie
* @date 2015-05-13
* @since 8.0
*/
public abstract class AbstractCellWidgetOptionProvider implements CellWidgetOptionProvider {
@API(level = CellWidgetOptionProvider.CURRENT_LEVEL)
public abstract class AbstractCellWidgetOptionProvider extends AbstractProvider implements CellWidgetOptionProvider {
public int currentAPILevel() {
return CURRENT_LEVEL;
}
@Override
public String mark4Provider() {
return getClass().getName();
}
}

10
designer_base/src/com/fr/design/fun/impl/AbstractConnectionProvider.java

@ -1,16 +1,24 @@
package com.fr.design.fun.impl;
import com.fr.design.fun.ConnectionProvider;
import com.fr.stable.fun.impl.AbstractProvider;
import com.fr.stable.fun.mark.API;
/**
* @author richie
* @date 2015-05-13
* @since 8.0
*/
public abstract class AbstractConnectionProvider implements ConnectionProvider {
@API(level = ConnectionProvider.CURRENT_LEVEL)
public abstract class AbstractConnectionProvider extends AbstractProvider implements ConnectionProvider {
@Override
public int currentAPILevel() {
return CURRENT_LEVEL;
}
@Override
public String mark4Provider() {
return getClass().getName();
}
}

6
designer_base/src/com/fr/design/fun/impl/AbstractDesignerEnvProcessor.java

@ -1,16 +1,22 @@
package com.fr.design.fun.impl;
import com.fr.design.fun.DesignerEnvProcessor;
import com.fr.stable.fun.mark.API;
/**
* Created by Administrator on 2016/3/31/0031.
*/
@API(level = DesignerEnvProcessor.CURRENT_LEVEL)
public abstract class AbstractDesignerEnvProcessor implements DesignerEnvProcessor {
public int currentAPILevel() {
return CURRENT_LEVEL;
}
public int layerIndex() {
return DEFAULT_LAYER_INDEX;
}
public String changeEnvPathBeforeConnect(String userName, String password, String path){
return path;
}

2
designer_base/src/com/fr/design/fun/impl/AbstractElementUIProvider.java

@ -2,10 +2,12 @@ package com.fr.design.fun.impl;
import com.fr.design.fun.ElementUIProvider;
import com.fr.stable.fun.impl.AbstractProvider;
import com.fr.stable.fun.mark.API;
/**
* Created by richie on 16/4/25.
*/
@API(level = ElementUIProvider.CURRENT_LEVEL)
public abstract class AbstractElementUIProvider extends AbstractProvider implements ElementUIProvider {
@Override

2
designer_base/src/com/fr/design/fun/impl/AbstractExportAttrTabProvider.java

@ -2,10 +2,12 @@ package com.fr.design.fun.impl;
import com.fr.design.fun.ExportAttrTabProvider;
import com.fr.stable.fun.impl.AbstractProvider;
import com.fr.stable.fun.mark.API;
/**
* Created by vito on 16/5/5.
*/
@API(level = ExportAttrTabProvider.CURRENT_LEVEL)
public abstract class AbstractExportAttrTabProvider extends AbstractProvider implements ExportAttrTabProvider {
@Override
public int currentAPILevel() {

6
designer_base/src/com/fr/design/fun/impl/AbstractFormElementCaseEditorProcessor.java

@ -2,18 +2,24 @@ package com.fr.design.fun.impl;
import com.fr.design.fun.FormElementCaseEditorProcessor;
import com.fr.stable.fun.ReportFitAttrProvider;
import com.fr.stable.fun.mark.API;
import java.beans.PropertyDescriptor;
/**
* Created by zhouping on 2015/9/10.
*/
@API(level = FormElementCaseEditorProcessor.CURRENT_LEVEL)
public abstract class AbstractFormElementCaseEditorProcessor implements FormElementCaseEditorProcessor {
public int currentAPILevel() {
return CURRENT_LEVEL;
}
public int layerIndex() {
return DEFAULT_LAYER_INDEX;
}
/**
* 生成属性表

9
designer_base/src/com/fr/design/fun/impl/AbstractFormWidgetOptionProvider.java

@ -1,18 +1,25 @@
package com.fr.design.fun.impl;
import com.fr.design.fun.FormWidgetOptionProvider;
import com.fr.stable.fun.impl.AbstractProvider;
import com.fr.stable.fun.mark.API;
/**
* @author richie
* @date 2015-05-13
* @since 8.0
*/
public abstract class AbstractFormWidgetOptionProvider implements FormWidgetOptionProvider {
@API(level = FormWidgetOptionProvider.CURRENT_LEVEL)
public abstract class AbstractFormWidgetOptionProvider extends AbstractProvider implements FormWidgetOptionProvider {
public int currentAPILevel() {
return CURRENT_LEVEL;
}
@Override
public String mark4Provider() {
return getClass().getName();
}
@Override
public boolean isContainer() {

10
designer_base/src/com/fr/design/fun/impl/AbstractGlobalListenerProvider.java

@ -1,15 +1,21 @@
package com.fr.design.fun.impl;
import com.fr.design.fun.GlobalListenerProvider;
import com.fr.stable.fun.impl.AbstractProvider;
import com.fr.stable.fun.mark.API;
/**
* Created by zack on 2015/8/17.
*/
public abstract class AbstractGlobalListenerProvider implements GlobalListenerProvider {
@API(level = GlobalListenerProvider.CURRENT_LEVEL)
public abstract class AbstractGlobalListenerProvider extends AbstractProvider implements GlobalListenerProvider {
public int currentAPILevel() {
return CURRENT_LEVEL;
}
@Override
public String mark4Provider() {
return getClass().getName();
}
}

15
designer_base/src/com/fr/design/fun/impl/AbstractGridUIProcessor.java

@ -0,0 +1,15 @@
package com.fr.design.fun.impl;
import com.fr.design.fun.GridUIProcessor;
import com.fr.stable.fun.mark.API;
@API(level = GridUIProcessor.CURRENT_LEVEL)
public abstract class AbstractGridUIProcessor implements GridUIProcessor {
public int currentAPILevel() {
return CURRENT_LEVEL;
}
public int layerIndex() {
return DEFAULT_LAYER_INDEX;
}
}

9
designer_base/src/com/fr/design/fun/impl/AbstractHighlightProvider.java

@ -1,16 +1,23 @@
package com.fr.design.fun.impl;
import com.fr.design.fun.HighlightProvider;
import com.fr.stable.fun.impl.AbstractProvider;
import com.fr.stable.fun.mark.API;
/**
* @author richie
* @date 2015-05-13
* @since 8.0
*/
public abstract class AbstractHighlightProvider implements HighlightProvider {
@API(level = HighlightProvider.CURRENT_LEVEL)
public abstract class AbstractHighlightProvider extends AbstractProvider implements HighlightProvider {
public int currentAPILevel() {
return CURRENT_LEVEL;
}
@Override
public String mark4Provider() {
return getClass().getName();
}
}

9
designer_base/src/com/fr/design/fun/impl/AbstractHyperlinkProvider.java

@ -1,14 +1,21 @@
package com.fr.design.fun.impl;
import com.fr.design.fun.HyperlinkProvider;
import com.fr.stable.fun.impl.AbstractProvider;
import com.fr.stable.fun.mark.API;
/**
* Created by zack on 2016/1/18.
*/
public abstract class AbstractHyperlinkProvider implements HyperlinkProvider {
@API(level = HyperlinkProvider.CURRENT_LEVEL)
public abstract class AbstractHyperlinkProvider extends AbstractProvider implements HyperlinkProvider {
public int currentAPILevel() {
return CURRENT_LEVEL;
}
@Override
public String mark4Provider() {
return getClass().getName();
}
}

8
designer_base/src/com/fr/design/fun/impl/AbstractIndentationUnitProcessor.java

@ -1,17 +1,23 @@
package com.fr.design.fun.impl;
import com.fr.design.fun.IndentationUnitProcessor;
import com.fr.stable.fun.mark.API;
/**
* Created by zhouping on 2015/9/20.
*/
public class AbstractIndentationUnitProcessor implements IndentationUnitProcessor {
@API(level = IndentationUnitProcessor.CURRENT_LEVEL)
public abstract class AbstractIndentationUnitProcessor implements IndentationUnitProcessor {
private int indentationUnit = 1;
public int currentAPILevel() {
return CURRENT_LEVEL;
}
public int layerIndex() {
return DEFAULT_LAYER_INDEX;
}
public void setIndentationUnit(int value){
this.indentationUnit = value;

9
designer_base/src/com/fr/design/fun/impl/AbstractJavaScriptActionProvider.java

@ -1,14 +1,21 @@
package com.fr.design.fun.impl;
import com.fr.design.fun.JavaScriptActionProvider;
import com.fr.stable.fun.impl.AbstractProvider;
import com.fr.stable.fun.mark.API;
/**
* Created by zack on 2015/8/20.
*/
public abstract class AbstractJavaScriptActionProvider implements JavaScriptActionProvider {
@API(level = JavaScriptActionProvider.CURRENT_LEVEL)
public abstract class AbstractJavaScriptActionProvider extends AbstractProvider implements JavaScriptActionProvider {
public int currentAPILevel() {
return CURRENT_LEVEL;
}
@Override
public String mark4Provider() {
return getClass().getName();
}
}

2
designer_base/src/com/fr/design/fun/impl/AbstractMenuHandler.java

@ -4,12 +4,14 @@ import com.fr.design.fun.MenuHandler;
import com.fr.design.mainframe.toolbar.ToolBarMenuDockPlus;
import com.fr.design.menu.ShortCut;
import com.fr.stable.fun.impl.AbstractProvider;
import com.fr.stable.fun.mark.API;
/**
* @author richie
* @date 2015-05-13
* @since 8.0
*/
@API(level = MenuHandler.CURRENT_LEVEL)
public abstract class AbstractMenuHandler extends AbstractProvider implements MenuHandler {
public int currentAPILevel() {

9
designer_base/src/com/fr/design/fun/impl/AbstractParameterWidgetOptionProvider.java

@ -1,16 +1,23 @@
package com.fr.design.fun.impl;
import com.fr.design.fun.ParameterWidgetOptionProvider;
import com.fr.stable.fun.impl.AbstractProvider;
import com.fr.stable.fun.mark.API;
/**
* @author richie
* @date 2015-05-13
* @since 8.0
*/
public abstract class AbstractParameterWidgetOptionProvider implements ParameterWidgetOptionProvider {
@API(level = ParameterWidgetOptionProvider.CURRENT_LEVEL)
public abstract class AbstractParameterWidgetOptionProvider extends AbstractProvider implements ParameterWidgetOptionProvider {
public int currentAPILevel() {
return CURRENT_LEVEL;
}
@Override
public String mark4Provider() {
return getClass().getName();
}
}

10
designer_base/src/com/fr/design/fun/impl/AbstractPresentKindProvider.java

@ -1,17 +1,23 @@
package com.fr.design.fun.impl;
import com.fr.design.fun.PresentKindProvider;
import com.fr.stable.fun.impl.AbstractProvider;
import com.fr.stable.fun.mark.API;
/**
* @author richie
* @date 2015-05-22
* @since 8.0
*/
public abstract class AbstractPresentKindProvider implements PresentKindProvider {
@API(level = PresentKindProvider.CURRENT_LEVEL)
public abstract class AbstractPresentKindProvider extends AbstractProvider implements PresentKindProvider {
public int currentAPILevel() {
return CURRENT_LEVEL;
}
@Override
public String mark4Provider() {
return getClass().getName();
}
}

9
designer_base/src/com/fr/design/fun/impl/AbstractPreviewProvider.java

@ -3,6 +3,8 @@ package com.fr.design.fun.impl;
import com.fr.design.fun.PreviewProvider;
import com.fr.design.mainframe.JTemplate;
import com.fr.general.ComparatorUtils;
import com.fr.stable.fun.impl.AbstractProvider;
import com.fr.stable.fun.mark.API;
import java.util.Collections;
import java.util.Map;
@ -12,12 +14,17 @@ import java.util.Map;
* @date 2015-05-13
* @since 8.0
*/
public abstract class AbstractPreviewProvider implements PreviewProvider {
@API(level = PreviewProvider.CURRENT_LEVEL)
public abstract class AbstractPreviewProvider extends AbstractProvider implements PreviewProvider {
public int currentAPILevel() {
return CURRENT_LEVEL;
}
@Override
public String mark4Provider() {
return getClass().getName();
}
@Override
public void onClick(JTemplate<?, ?> jt) {

29
designer_base/src/com/fr/design/fun/impl/AbstractServerTableDataDefineProvider.java

@ -1,12 +1,39 @@
package com.fr.design.fun.impl;
import com.fr.design.data.datapane.TableDataNameObjectCreator;
import com.fr.design.data.tabledata.wrapper.TableDataFactory;
import com.fr.design.fun.ServerTableDataDefineProvider;
import com.fr.stable.fun.impl.AbstractProvider;
import com.fr.stable.fun.mark.API;
/**
* @author richie
* @date 2015-05-13
* @since 8.0
*/
public abstract class AbstractServerTableDataDefineProvider implements ServerTableDataDefineProvider {
@API(level = ServerTableDataDefineProvider.CURRENT_LEVEL)
public abstract class AbstractServerTableDataDefineProvider extends AbstractProvider implements ServerTableDataDefineProvider {
@Override
public int currentAPILevel() {
return CURRENT_LEVEL;
}
@Override
public String mark4Provider() {
return getClass().getName();
}
@Override
public void process() {
TableDataNameObjectCreator creator = new TableDataNameObjectCreator(
nameForTableData(),
prefixForTableData(),
iconPathForTableData(),
classForTableData(),
classForInitTableData(),
appearanceForTableData()
);
TableDataFactory.register(classForTableData(), creator);
}
}

10
designer_base/src/com/fr/design/fun/impl/AbstractSubmitProvider.java

@ -1,12 +1,18 @@
package com.fr.design.fun.impl;
import com.fr.design.fun.SubmitProvider;
import com.fr.stable.fun.impl.AbstractProvider;
import com.fr.stable.fun.mark.API;
public abstract class AbstractSubmitProvider implements SubmitProvider {
@API(level = SubmitProvider.CURRENT_LEVEL)
public abstract class AbstractSubmitProvider extends AbstractProvider implements SubmitProvider {
public int currentAPILevel() {
return CURRENT_LEVEL;
}
@Override
public String mark4Provider() {
return getClass().getName();
}
}

6
designer_base/src/com/fr/design/fun/impl/AbstractTDPaneProcessor.java

@ -1,15 +1,21 @@
package com.fr.design.fun.impl;
import com.fr.design.fun.TableDataPaneProcessor;
import com.fr.stable.fun.mark.API;
/**
* Coder: zack
* Date: 2016/4/18
* Time: 10:30
*/
@API(level = TableDataPaneProcessor.CURRENT_LEVEL)
public abstract class AbstractTDPaneProcessor implements TableDataPaneProcessor {
@Override
public int currentAPILevel() {
return CURRENT_LEVEL;
}
public int layerIndex() {
return DEFAULT_LAYER_INDEX;
}
}

25
designer_base/src/com/fr/design/fun/impl/AbstractTableDataDefineProvider.java

@ -1,16 +1,39 @@
package com.fr.design.fun.impl;
import com.fr.design.data.datapane.TableDataNameObjectCreator;
import com.fr.design.data.tabledata.wrapper.TableDataFactory;
import com.fr.design.fun.TableDataDefineProvider;
import com.fr.stable.fun.impl.AbstractProvider;
import com.fr.stable.fun.mark.API;
/**
* @author richie
* @date 2015-05-13
* @since 8.0
*/
public abstract class AbstractTableDataDefineProvider implements TableDataDefineProvider {
@API(level = TableDataDefineProvider.CURRENT_LEVEL)
public abstract class AbstractTableDataDefineProvider extends AbstractProvider implements TableDataDefineProvider {
@Override
public int currentAPILevel() {
return CURRENT_LEVEL;
}
@Override
public String mark4Provider() {
return getClass().getName();
}
@Override
public void process() {
TableDataNameObjectCreator creator = new TableDataNameObjectCreator(
nameForTableData(),
prefixForTableData(),
iconPathForTableData(),
classForTableData(),
classForInitTableData(),
appearanceForTableData()
);
TableDataFactory.register(classForTableData(), creator);
}
}

6
designer_base/src/com/fr/design/fun/impl/AbstractTitleProcessor.java

@ -1,12 +1,18 @@
package com.fr.design.fun.impl;
import com.fr.design.fun.TitlePlaceProcessor;
import com.fr.stable.fun.mark.API;
@API(level = TitlePlaceProcessor.CURRENT_LEVEL)
public abstract class AbstractTitleProcessor implements TitlePlaceProcessor {
public int currentAPILevel() {
return CURRENT_LEVEL;
}
public int layerIndex() {
return DEFAULT_LAYER_INDEX;
}
}

9
designer_base/src/com/fr/design/fun/impl/AbstractToolbarItem.java

@ -1,14 +1,21 @@
package com.fr.design.fun.impl;
import com.fr.design.fun.ToolbarItemProvider;
import com.fr.stable.fun.impl.AbstractProvider;
import com.fr.stable.fun.mark.API;
/**
* Created by richie on 15/12/1.
*/
public abstract class AbstractToolbarItem implements ToolbarItemProvider {
@API(level = ToolbarItemProvider.CURRENT_LEVEL)
public abstract class AbstractToolbarItem extends AbstractProvider implements ToolbarItemProvider {
public int currentAPILevel() {
return CURRENT_LEVEL;
}
@Override
public String mark4Provider() {
return getClass().getName();
}
}

6
designer_base/src/com/fr/design/fun/impl/AbstractUIFormulaProcessor.java

@ -1,16 +1,22 @@
package com.fr.design.fun.impl;
import com.fr.design.fun.UIFormulaProcessor;
import com.fr.stable.fun.mark.API;
/**
* @author richie
* @date 2015-05-13
* @since 8.0
*/
@API(level = UIFormulaProcessor.CURRENT_LEVEL)
public abstract class AbstractUIFormulaProcessor implements UIFormulaProcessor {
public int currentAPILevel() {
return CURRENT_LEVEL;
}
public int layerIndex() {
return DEFAULT_LAYER_INDEX;
}
}

2
designer_base/src/com/fr/design/fun/impl/AbstractVerifyDefineProvider.java

@ -2,10 +2,12 @@ package com.fr.design.fun.impl;
import com.fr.design.fun.VerifyDefineProvider;
import com.fr.stable.fun.impl.AbstractProvider;
import com.fr.stable.fun.mark.API;
/**
* Created by richie on 16/6/8.
*/
@API(level = VerifyDefineProvider.CURRENT_LEVEL)
public abstract class AbstractVerifyDefineProvider extends AbstractProvider implements VerifyDefineProvider {
@Override

11
designer_base/src/com/fr/design/fun/impl/AbstractWidgetDesignHandler.java

@ -1,11 +1,22 @@
package com.fr.design.fun.impl;
import com.fr.design.fun.WidgetDesignHandler;
import com.fr.stable.fun.mark.API;
/**
* Coder: zack
* Date: 2016/5/12
* Time: 10:41
*/
@API(level = WidgetDesignHandler.CURRENT_LEVEL)
public abstract class AbstractWidgetDesignHandler implements WidgetDesignHandler {
@Override
public int currentAPILevel() {
return CURRENT_LEVEL;
}
public int layerIndex() {
return DEFAULT_LAYER_INDEX;
}
}

2
designer_base/src/com/fr/design/fun/impl/AbstractWidgetPropertyUIProvider.java

@ -2,11 +2,13 @@ package com.fr.design.fun.impl;
import com.fr.design.fun.WidgetPropertyUIProvider;
import com.fr.stable.fun.impl.AbstractProvider;
import com.fr.stable.fun.mark.API;
/**
* Created by vito on 16/4/27.
*/
@API(level = WidgetPropertyUIProvider.CURRENT_LEVEL)
public abstract class AbstractWidgetPropertyUIProvider extends AbstractProvider implements WidgetPropertyUIProvider {
@Override

5
designer_base/src/com/fr/design/gui/frpane/HyperlinkGroupPane.java

@ -18,6 +18,7 @@ import com.fr.stable.Nameable;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
/**
* 超级链接 界面.
@ -43,13 +44,13 @@ public class HyperlinkGroupPane extends JListControlPane {
for (int i = 0; i < templateArrayLisy.size(); i++) {
pluginCreators[i] = ((HyperlinkPluginAction) templateArrayLisy.get(i)).getHyperlinkCreator();
}
HyperlinkProvider[] providers = ExtraDesignClassManager.getInstance().getHyperlinkProvider();
Set<HyperlinkProvider> providers = ExtraDesignClassManager.getInstance().getArray(HyperlinkProvider.XML_TAG);
List<NameableCreator> creatorList = new ArrayList<NameableCreator>();
for (HyperlinkProvider provider : providers) {
NameableCreator nc = provider.createHyperlinkCreator();
creatorList.add(nc);
}
return (NameableCreator[]) ArrayUtils.addAll(creatorList.toArray(new NameableCreator[creatorList.size()]), ArrayUtils.addAll(creators, pluginCreators));
return ArrayUtils.addAll(creatorList.toArray(new NameableCreator[creatorList.size()]), ArrayUtils.addAll(creators, pluginCreators));
}
/**

6
designer_base/src/com/fr/design/gui/style/AlignmentPane.java

@ -95,7 +95,7 @@ public class AlignmentPane extends AbstractBasicStylePane implements GlobalNameO
initOtherComponent();
initAllNames();
indentationUnitProcessor = ExtraDesignClassManager.getInstance().getIndentationUnitEditor();
indentationUnitProcessor = ExtraDesignClassManager.getInstance().getSingle(IndentationUnitProcessor.MARK_STRING);
if (null == indentationUnitProcessor){
indentationUnitProcessor = new DefaultIndentationUnitProcessor();
}
@ -134,7 +134,7 @@ public class AlignmentPane extends AbstractBasicStylePane implements GlobalNameO
private void initTextRotationCombox(){
ArrayList<String> selectOption = new ArrayList<String>();
selectOption.add(Inter.getLocText("FR-Designer_Custom-Angle"));
VerticalTextProcessor processor = ExtraClassManager.getInstance().getVerticalTextProcessor();
VerticalTextProcessor processor = ExtraClassManager.getInstance().getSingle(VerticalTextProcessor.XML_TAG);
if (processor != null){
selectOption.addAll(Arrays.asList(processor.getComboxOption()));
}
@ -241,7 +241,7 @@ public class AlignmentPane extends AbstractBasicStylePane implements GlobalNameO
} else {
this.textComboBox.setSelectedIndex(0);
}
if (style.getVerticalText() == Style.VERTICALTEXT && ExtraClassManager.getInstance().getVerticalTextProcessor() != null) {
if (style.getVerticalText() == Style.VERTICALTEXT && ExtraClassManager.getInstance().getSingle(VerticalTextProcessor.XML_TAG) != null) {
textRotationComboBox.setSelectedIndex(style.getTextDirection() == Style.LEFT_TO_RIGHT ? 1 : 2);
} else {
textRotationComboBox.setSelectedIndex(0);

3
designer_base/src/com/fr/design/gui/style/BackgroundPane.java

@ -15,6 +15,7 @@ import java.awt.*;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.util.ArrayList;
import java.util.Set;
/**
* @author zhou
@ -68,7 +69,7 @@ public class BackgroundPane extends AbstractBasicStylePane {
kinds.add(new PatternBackgroundQuickPane());
kinds.add(new ImageBackgroundQuickPane());
kinds.add(new GradientBackgroundQuickPane());
BackgroundQuickUIProvider[] providers = ExtraDesignClassManager.getInstance().getBackgroundQuickUIProviders();
Set<BackgroundQuickUIProvider> providers = ExtraDesignClassManager.getInstance().getArray(BackgroundQuickUIProvider.MARK_STRING);
for (BackgroundQuickUIProvider provider : providers) {
kinds.add(provider.appearanceForBackground());

3
designer_base/src/com/fr/design/javascript/JavaScriptActionPane.java

@ -21,6 +21,7 @@ import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
public abstract class JavaScriptActionPane extends UIComboBoxPane<JavaScript> {
@ -52,7 +53,7 @@ public abstract class JavaScriptActionPane extends UIComboBoxPane<JavaScript> {
}
);
paneList.add(initEmaiPane());
List<JavaScriptActionProvider> javaScriptActionProviders = ExtraDesignClassManager.getInstance().getJavaScriptActionProvider();
Set<JavaScriptActionProvider> javaScriptActionProviders = ExtraDesignClassManager.getInstance().getArray(JavaScriptActionProvider.XML_TAG);
if (javaScriptActionProviders != null) {
for (JavaScriptActionProvider jsp : javaScriptActionProviders) {
paneList.add(jsp.getJavaScriptActionPane());

15
designer_base/src/com/fr/design/mainframe/AbstractAppProvider.java

@ -1,13 +1,26 @@
package com.fr.design.mainframe;
import com.fr.base.io.IOFile;
import com.fr.stable.fun.impl.AbstractProvider;
import com.fr.stable.fun.mark.API;
/**
* Created by Administrator on 2016/3/17/0017.
*/
public abstract class AbstractAppProvider<T extends IOFile> implements App{
@API(level = App.CURRENT_LEVEL)
public abstract class AbstractAppProvider<T extends IOFile> extends AbstractProvider implements App{
public int currentAPILevel() {
return CURRENT_LEVEL;
}
@Override
public String mark4Provider() {
return getClass().getName();
}
@Override
public void process() {
DesignerFrame.registApp(this);
}
}

5
designer_base/src/com/fr/design/mainframe/App.java

@ -2,12 +2,13 @@ package com.fr.design.mainframe;
import com.fr.base.io.IOFile;
import com.fr.file.FILE;
import com.fr.stable.fun.Level;
import com.fr.stable.fun.mark.Mutable;
import com.fr.stable.fun.mark.Aftermath;
/**
* Created by Administrator on 2016/3/17/0017.
*/
public interface App<T extends IOFile> extends Level{
public interface App<T extends IOFile> extends Mutable, Aftermath {
String MARK_STRING = "DesignerApp";

2
designer_base/src/com/fr/design/mainframe/DesignerFrame.java

@ -263,7 +263,7 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
GeneralContext.addPluginReadListener(new PluginReadListener() {
@Override
public void success() {
TitlePlaceProcessor processor = ExtraDesignClassManager.getInstance().getTitlePlaceProcessor();
TitlePlaceProcessor processor = ExtraDesignClassManager.getInstance().getSingle(TitlePlaceProcessor.MARK_STRING);
if (processor == null) {
processor = new DefaultTitlePlace();
}

3
designer_base/src/com/fr/design/mainframe/DesignerFrameFileDealerPane.java

@ -43,6 +43,7 @@ import java.awt.event.KeyEvent;
import java.io.File;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarStateChangeListener, ResponseDataSourceChange {
private static final String FILE = "file";
@ -127,7 +128,7 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt
toolbarDef.addShortCut(openFolderAction, renameAction);
}
toolbarDef.addShortCut(delFileAction);
ShortCut[] extraShortCuts = ExtraDesignClassManager.getInstance().getTemplateTreeShortCutProviders();
Set<ShortCut> extraShortCuts = ExtraDesignClassManager.getInstance().getArray(ShortCut.TEMPLATE_TREE);
for (ShortCut shortCut : extraShortCuts){
toolbarDef.addShortCut(shortCut);
}

17
designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java

@ -55,9 +55,7 @@ import com.fr.stable.ProductConstants;
import javax.swing.*;
import java.awt.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Locale;
import java.util.*;
/**
* @author richer
@ -299,7 +297,7 @@ public abstract class ToolBarMenuDock {
}
private ShortCut createGlobalTDAction() {
TableDataPaneProcessor processor = ExtraDesignClassManager.getInstance().getTableDataPaneProcessor();
TableDataPaneProcessor processor = ExtraDesignClassManager.getInstance().getSingle(TableDataPaneProcessor.XML_TAG);
return processor == null ? new GlobalTableDataAction() : processor.createServerTDAction();
}
@ -528,8 +526,15 @@ public abstract class ToolBarMenuDock {
protected void insertMenu(MenuDef menuDef, String anchor, ShortCutMethodAction action) {
// 下面是插件接口接入点
MenuHandler[] menuHandlers = ExtraDesignClassManager.getInstance().getMenuHandlers(anchor);
for (MenuHandler handler : menuHandlers) {
Set<MenuHandler> set = ExtraDesignClassManager.getInstance().getArray(MenuHandler.MARK_STRING);
java.util.List<MenuHandler> target = new ArrayList<>();
for (MenuHandler handler : set) {
if (ComparatorUtils.equals(handler.category(), anchor)) {
target.add(handler);
}
}
for (MenuHandler handler : target) {
int insertPosition = handler.insertPosition(menuDef.getShortCutCount());
ShortCut shortCut = action.methodAction(handler);
if (shortCut == null){

16
designer_base/src/com/fr/design/menu/ShortCut.java

@ -1,16 +1,20 @@
package com.fr.design.menu;
import com.fr.stable.fun.Level;
import com.fr.stable.fun.impl.AbstractProvider;
import com.fr.stable.fun.mark.API;
import com.fr.stable.fun.mark.Mutable;
import javax.swing.JPopupMenu;
import javax.swing.JToolBar;
import javax.swing.*;
/**
* 用来往MenuDef或是ToolBarDef里面加东西时用的接口
* august:ShortCut没有必要序列化和XMLabled
* 原来那么多Menudef都提供持久化操作太浪费资源
*/
public abstract class ShortCut implements Level{
@API(level = ShortCut.CURRENT_LEVEL)
public abstract class ShortCut extends AbstractProvider implements Mutable {
public static final String TEMPLATE_TREE = "TemplateTreeShortCut";
public static final int CURRENT_LEVEL = 1;
@ -18,6 +22,10 @@ public abstract class ShortCut implements Level{
return CURRENT_LEVEL;
}
@Override
public String mark4Provider() {
return getClass().getName();
}
private MenuKeySet menuKeySet = null;

5
designer_base/src/com/fr/design/module/DesignModule.java

@ -22,6 +22,7 @@ import com.fr.stable.plugin.ExtraDesignClassManagerProvider;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
/**
* Created by IntelliJ IDEA.
@ -66,7 +67,7 @@ public abstract class DesignModule extends TopModule {
public Class<?>[] actionsForInsertCellElement() {
List<Class<?>> classes = new ArrayList<>();
ElementUIProvider[] providers = ExtraDesignClassManager.getInstance().getElementUIProviders();
Set<ElementUIProvider> providers = ExtraDesignClassManager.getInstance().getArray(ElementUIProvider.MARK_STRING);
for (ElementUIProvider provider : providers) {
classes.add(provider.actionForInsertCellElement());
}
@ -75,7 +76,7 @@ public abstract class DesignModule extends TopModule {
public Class<?>[] actionsForInsertFloatElement() {
List<Class<?>> classes = new ArrayList<>();
ElementUIProvider[] providers = ExtraDesignClassManager.getInstance().getElementUIProviders();
Set<ElementUIProvider> providers = ExtraDesignClassManager.getInstance().getArray(ElementUIProvider.MARK_STRING);
for (ElementUIProvider provider : providers) {
classes.add(provider.actionForInsertFloatElement());
}

5
designer_base/src/com/fr/design/style/AlignmentPane.java

@ -17,6 +17,7 @@ import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.ComparatorUtils;
import com.fr.general.Inter;
import com.fr.plugin.ExtraClassManager;
import com.fr.report.fun.VerticalTextProcessor;
import com.fr.stable.CoreConstants;
import javax.swing.*;
@ -125,7 +126,7 @@ public class AlignmentPane extends BasicPane {
directionBG.add(rightToLeftRB);
rightToLeftRB.setSelected(true);
if (ExtraClassManager.getInstance().getVerticalTextProcessor() == null){
if (ExtraClassManager.getInstance().getSingle(VerticalTextProcessor.XML_TAG) == null){
return;
}
isVerticalTextPanel.add(isVerticalTextCheckBox);
@ -301,7 +302,7 @@ public class AlignmentPane extends BasicPane {
}
private void populateVertical(Style style){
if (ExtraClassManager.getInstance().getVerticalTextProcessor() == null){
if (ExtraClassManager.getInstance().getSingle(VerticalTextProcessor.XML_TAG) == null){
return;
}
this.isVerticalTextCheckBox.setSelected(true);

4
designer_base/src/com/fr/design/style/background/BackgroundFactory.java

@ -3,6 +3,7 @@ package com.fr.design.style.background;
import com.fr.base.background.*;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.fun.BackgroundQuickUIProvider;
import com.fr.design.fun.BackgroundUIProvider;
import com.fr.design.style.background.gradient.GradientBackgroundPane;
import com.fr.design.style.background.impl.*;
@ -54,7 +55,8 @@ public class BackgroundFactory {
}
private static void registerExtra(Map<Class<? extends Background>, BackgroundUIWrapper> map) {
for (BackgroundUIProvider provider : ExtraDesignClassManager.getInstance().getBackgroundUIProviders()) {
Set<BackgroundUIProvider> set = ExtraDesignClassManager.getInstance().getArray(BackgroundUIProvider.MARK_STRING);
for (BackgroundUIProvider provider : set) {
map.put(provider.targetClass(), BackgroundUIWrapper.create()
.setType(provider.targetUIClass()).setTitle(provider.targetTitle()));
}

2
designer_base/src/com/fr/design/utils/DesignUtils.java

@ -324,7 +324,7 @@ public class DesignUtils {
private static String getWebBrowserPath() {
String urlPath = FRContext.getCurrentEnv().getPath();
DesignerEnvProcessor processor = ExtraDesignClassManager.getInstance().getEnvProcessor();
DesignerEnvProcessor processor = ExtraDesignClassManager.getInstance().getSingle(DesignerEnvProcessor.XML_TAG);
if (processor != null) {
//cas访问的时候, url要处理下.
urlPath = processor.getWebBrowserURL(urlPath);

2
designer_base/src/com/fr/env/RemoteEnv.java vendored

@ -388,7 +388,7 @@ public class RemoteEnv implements Env {
private void extraChangeEnvPara() {
//在env连接之前, 加载一下不依赖env的插件. 看看需不需要改变参数.
PluginLoader.init();
DesignerEnvProcessor envProcessor = ExtraDesignClassManager.getInstance().getEnvProcessor();
DesignerEnvProcessor envProcessor = ExtraDesignClassManager.getInstance().getSingle(DesignerEnvProcessor.XML_TAG);
if (envProcessor != null) {
this.path = envProcessor.changeEnvPathBeforeConnect(user, password, path);
}

9
designer_base/src/com/fr/start/BaseDesigner.java

@ -39,6 +39,7 @@ import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.io.File;
import java.lang.reflect.Method;
import java.util.Set;
/**
* The main class of Report Designer.
@ -113,11 +114,9 @@ public abstract class BaseDesigner extends ToolBarMenuDock {
}
private void bindGlobalListener() {
GlobalListenerProvider[] providers = ExtraDesignClassManager.getInstance().getGlobalListenerProvider();
if (ArrayUtils.isNotEmpty(providers)) {
for (GlobalListenerProvider provider : providers) {
Toolkit.getDefaultToolkit().addAWTEventListener(provider.listener(), AWTEvent.KEY_EVENT_MASK);
}
Set<GlobalListenerProvider> providers = ExtraDesignClassManager.getInstance().getArray(GlobalListenerProvider.XML_TAG);
for (GlobalListenerProvider provider : providers) {
Toolkit.getDefaultToolkit().addAWTEventListener(provider.listener(), AWTEvent.KEY_EVENT_MASK);
}
}

2
designer_chart/src/com/fr/design/module/ChartDesignerModule.java

@ -1 +1 @@
package com.fr.design.module; import com.fr.chart.base.ChartInternationalNameContentBean; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.charttypes.ChartTypeManager; import com.fr.design.ChartTypeInterfaceManager; import com.fr.design.actions.core.ActionFactory; import com.fr.design.chart.ChartDialog; import com.fr.design.chart.gui.ChartComponent; import com.fr.design.chart.gui.ChartWidgetOption; import com.fr.design.gui.core.WidgetOption; import com.fr.design.mainframe.App; import com.fr.design.mainframe.ChartAndWidgetPropertyPane; import com.fr.design.mainframe.ChartPropertyPane; import com.fr.form.ui.ChartEditor; import com.fr.general.GeneralContext; import com.fr.general.IOUtils; import com.fr.general.Inter; import com.fr.stable.bridge.StableFactory; import com.fr.stable.plugin.ExtraChartDesignClassManagerProvider; import com.fr.stable.plugin.PluginReadListener; import javax.swing.*; /** * Created by IntelliJ IDEA. * Author : Richer * Version: 7.0.3 * Date: 13-7-8 * Time: 上午9:13 */ public class ChartDesignerModule extends DesignModule { public void start() { super.start(); dealBeforeRegister(); register(); registerFloatEditor(); } protected void dealBeforeRegister(){ StableFactory.registerMarkedClass(ExtraChartDesignClassManagerProvider.XML_TAG, ChartTypeInterfaceManager.class); } private void register(){ DesignModuleFactory.registerHyperlinkGroupType(new ChartHyperlinkGroup()); GeneralContext.addPluginReadListener(new PluginReadListener() { @Override public void success() { DesignModuleFactory.registerExtraWidgetOptions(options4Show()); } }); DesignModuleFactory.registerChartEditorClass(ChartEditor.class); DesignModuleFactory.registerChartComponentClass(ChartComponent.class); DesignModuleFactory.registerChartDialogClass(ChartDialog.class); DesignModuleFactory.registerChartAndWidgetPropertyPane(ChartAndWidgetPropertyPane.class); DesignModuleFactory.registerChartPropertyPaneClass(ChartPropertyPane.class); ActionFactory.registerChartPreStyleAction(new ChartPreStyleAction()); } protected void registerFloatEditor() { ActionFactory.registerChartCollection(ChartCollection.class); } /** * 返回设计器能打开的模板类型的一个数组列表 * * @return 可以打开的模板类型的数组 */ public App<?>[] apps4TemplateOpener() { return new App[0]; } protected WidgetOption[] options4Show() { ChartInternationalNameContentBean[] typeName = ChartTypeManager.getInstance().getAllChartBaseNames(); ChartWidgetOption[] child = new ChartWidgetOption[typeName.length]; for (int i = 0; i < typeName.length; i++) { String plotID = typeName[i].getPlotID(); Chart[] rowChart = ChartTypeManager.getInstance().getChartTypes(plotID); String iconPath = ChartTypeInterfaceManager.getInstance().getIconPath(plotID); Icon icon = IOUtils.readIcon(iconPath); child[i] = new ChartWidgetOption(Inter.getLocText(typeName[i].getName()), icon, ChartEditor.class, rowChart[0]); } return child; } public String getInterNationalName() { return Inter.getLocText("FR-Chart-Design_ChartModule"); } }
package com.fr.design.module; import com.fr.chart.base.ChartInternationalNameContentBean; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.charttypes.ChartTypeManager; import com.fr.design.ChartTypeInterfaceManager; import com.fr.design.actions.core.ActionFactory; import com.fr.design.chart.ChartDialog; import com.fr.design.chart.gui.ChartComponent; import com.fr.design.chart.gui.ChartWidgetOption; import com.fr.design.gui.core.WidgetOption; import com.fr.design.mainframe.App; import com.fr.design.mainframe.ChartAndWidgetPropertyPane; import com.fr.design.mainframe.ChartPropertyPane; import com.fr.form.ui.ChartEditor; import com.fr.general.GeneralContext; import com.fr.general.IOUtils; import com.fr.general.Inter; import com.fr.stable.bridge.StableFactory; import com.fr.stable.plugin.ExtraChartDesignClassManagerProvider; import com.fr.stable.plugin.PluginReadListener; import javax.swing.*; /** * Created by IntelliJ IDEA. * Author : Richer * Version: 7.0.3 * Date: 13-7-8 * Time: 上午9:13 */ public class ChartDesignerModule extends DesignModule { public void start() { super.start(); dealBeforeRegister(); register(); registerFloatEditor(); } protected void dealBeforeRegister(){ StableFactory.registerMarkedClass(ExtraChartDesignClassManagerProvider.XML_TAG, ChartTypeInterfaceManager.class); } private void register(){ DesignModuleFactory.registerHyperlinkGroupType(new ChartHyperlinkGroup()); GeneralContext.addPluginReadListener(new PluginReadListener() { @Override public void success() { DesignModuleFactory.registerExtraWidgetOptions(options4Show()); } }); DesignModuleFactory.registerChartEditorClass(ChartEditor.class); DesignModuleFactory.registerChartComponentClass(ChartComponent.class); DesignModuleFactory.registerChartDialogClass(ChartDialog.class); DesignModuleFactory.registerChartAndWidgetPropertyPane(ChartAndWidgetPropertyPane.class); DesignModuleFactory.registerChartPropertyPaneClass(ChartPropertyPane.class); ActionFactory.registerChartPreStyleAction(new ChartPreStyleAction()); } protected void registerFloatEditor() { ActionFactory.registerChartCollection(ChartCollection.class); } /** * 返回设计器能打开的模板类型的一个数组列表 * * @return 可以打开的模板类型的数组 */ public App<?>[] apps4TemplateOpener() { return new App[0]; } protected WidgetOption[] options4Show() { ChartInternationalNameContentBean[] typeName = ChartTypeManager.getInstance().getAllChartBaseNames(); ChartWidgetOption[] child = new ChartWidgetOption[typeName.length]; for (int i = 0; i < typeName.length; i++) { String plotID = typeName[i].getPlotID(); Chart[] rowChart = ChartTypeManager.getInstance().getChartTypes(plotID); if(rowChart == null) { continue; } String iconPath = ChartTypeInterfaceManager.getInstance().getIconPath(plotID); Icon icon = IOUtils.readIcon(iconPath); child[i] = new ChartWidgetOption(Inter.getLocText(typeName[i].getName()), icon, ChartEditor.class, rowChart[0]); } return child; } public String getInterNationalName() { return Inter.getLocText("FR-Chart-Design_ChartModule"); } }

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save