xiaohu 9 years ago
parent
commit
bf5b47ec94
  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/InformationCollector.java
  6. 6
      designer/src/com/fr/design/mainframe/JWorkBook.java
  7. 117
      designer/src/com/fr/design/mainframe/bbs/BBSLoginDialog.java
  8. 2
      designer/src/com/fr/design/mainframe/cell/CellElementEditPane.java
  9. 17
      designer/src/com/fr/design/module/DesignerModule.java
  10. 3
      designer/src/com/fr/design/present/PresentPane.java
  11. 5
      designer/src/com/fr/design/report/ReportExportAttrPane.java
  12. 2
      designer/src/com/fr/design/report/VerifierListPane.java
  13. 4
      designer/src/com/fr/design/webattr/EditToolBar.java
  14. 7
      designer/src/com/fr/design/webattr/WebSettingPane.java
  15. 19
      designer/src/com/fr/design/widget/WidgetPane.java
  16. 15
      designer/src/com/fr/design/write/submit/SubmitVisitorListPane.java
  17. 31
      designer_base/.classpath
  18. 866
      designer_base/src/com/fr/design/ExtraDesignClassManager.java
  19. 74
      designer_base/src/com/fr/design/actions/community/BBSAction.java
  20. 72
      designer_base/src/com/fr/design/actions/community/BugAction.java
  21. 70
      designer_base/src/com/fr/design/actions/community/NeedAction.java
  22. 69
      designer_base/src/com/fr/design/actions/community/QuestionAction.java
  23. 70
      designer_base/src/com/fr/design/actions/community/SignAction.java
  24. 70
      designer_base/src/com/fr/design/actions/community/UpAction.java
  25. 70
      designer_base/src/com/fr/design/actions/community/VideoAction.java
  26. 9
      designer_base/src/com/fr/design/actions/help/TutorialAction.java
  27. 2
      designer_base/src/com/fr/design/condition/LiteConditionPane.java
  28. 4
      designer_base/src/com/fr/design/data/datapane/TableDataCreatorProducer.java
  29. 2
      designer_base/src/com/fr/design/data/datapane/TableDataTreePane.java
  30. 16
      designer_base/src/com/fr/design/data/datapane/connect/ConnectionListPane.java
  31. 2
      designer_base/src/com/fr/design/data/tabledata/tabledatapane/TableDataManagerPane.java
  32. 4
      designer_base/src/com/fr/design/data/tabledata/wrapper/TableDataFactory.java
  33. 1
      designer_base/src/com/fr/design/dialog/BasicScrollPane.java
  34. 1
      designer_base/src/com/fr/design/editor/editor/ColumnSelectedEditor.java
  35. 2
      designer_base/src/com/fr/design/extra/PluginWebBridge.java
  36. 4
      designer_base/src/com/fr/design/extra/exe/GetPluginFromStoreExecutor.java
  37. 15
      designer_base/src/com/fr/design/extra/exe/ReadUpdateOnlineExecutor.java
  38. 4
      designer_base/src/com/fr/design/extra/exe/SearchOnlineExecutor.java
  39. 2
      designer_base/src/com/fr/design/formula/FormulaFactory.java
  40. 1
      designer_base/src/com/fr/design/formula/FormulaPane.java
  41. 4
      designer_base/src/com/fr/design/formula/FormulaPaneWhenReserveFormula.java
  42. 3
      designer_base/src/com/fr/design/fun/BackgroundQuickUIProvider.java
  43. 5
      designer_base/src/com/fr/design/fun/BackgroundUIProvider.java
  44. 4
      designer_base/src/com/fr/design/fun/CellAttributeProvider.java
  45. 2
      designer_base/src/com/fr/design/fun/CellWidgetOptionProvider.java
  46. 4
      designer_base/src/com/fr/design/fun/ConnectionProvider.java
  47. 4
      designer_base/src/com/fr/design/fun/DesignerEnvProcessor.java
  48. 4
      designer_base/src/com/fr/design/fun/ElementUIProvider.java
  49. 29
      designer_base/src/com/fr/design/fun/ExportAttrTabProvider.java
  50. 4
      designer_base/src/com/fr/design/fun/ExportToolBarProvider.java
  51. 16
      designer_base/src/com/fr/design/fun/FormElementCaseEditorProcessor.java
  52. 4
      designer_base/src/com/fr/design/fun/FormWidgetOptionProvider.java
  53. 4
      designer_base/src/com/fr/design/fun/GlobalListenerProvider.java
  54. 3
      designer_base/src/com/fr/design/fun/HighlightProvider.java
  55. 3
      designer_base/src/com/fr/design/fun/HyperlinkProvider.java
  56. 4
      designer_base/src/com/fr/design/fun/IndentationUnitProcessor.java
  57. 4
      designer_base/src/com/fr/design/fun/JavaScriptActionProvider.java
  58. 4
      designer_base/src/com/fr/design/fun/MenuHandler.java
  59. 4
      designer_base/src/com/fr/design/fun/ParameterWidgetOptionProvider.java
  60. 4
      designer_base/src/com/fr/design/fun/PresentKindProvider.java
  61. 4
      designer_base/src/com/fr/design/fun/PreviewProvider.java
  62. 4
      designer_base/src/com/fr/design/fun/SubmitProvider.java
  63. 5
      designer_base/src/com/fr/design/fun/TableDataDefineProvider.java
  64. 4
      designer_base/src/com/fr/design/fun/TableDataPaneProcessor.java
  65. 4
      designer_base/src/com/fr/design/fun/TitlePlaceProcessor.java
  66. 4
      designer_base/src/com/fr/design/fun/ToolbarItemProvider.java
  67. 4
      designer_base/src/com/fr/design/fun/UIFormulaProcessor.java
  68. 5
      designer_base/src/com/fr/design/fun/VerifyDefineProvider.java
  69. 22
      designer_base/src/com/fr/design/fun/WidgetDesignHandler.java
  70. 4
      designer_base/src/com/fr/design/fun/WidgetPropertyUIProvider.java
  71. 2
      designer_base/src/com/fr/design/fun/impl/AbstractBackgroundQuickUIProvider.java
  72. 2
      designer_base/src/com/fr/design/fun/impl/AbstractBackgroundUIProvider.java
  73. 2
      designer_base/src/com/fr/design/fun/impl/AbstractCellAttributeProvider.java
  74. 10
      designer_base/src/com/fr/design/fun/impl/AbstractCellWidgetOptionProvider.java
  75. 10
      designer_base/src/com/fr/design/fun/impl/AbstractConnectionProvider.java
  76. 2
      designer_base/src/com/fr/design/fun/impl/AbstractDesignerEnvProcessor.java
  77. 2
      designer_base/src/com/fr/design/fun/impl/AbstractElementUIProvider.java
  78. 2
      designer_base/src/com/fr/design/fun/impl/AbstractExportAttrTabProvider.java
  79. 17
      designer_base/src/com/fr/design/fun/impl/AbstractFormElementCaseEditorProcessor.java
  80. 9
      designer_base/src/com/fr/design/fun/impl/AbstractFormWidgetOptionProvider.java
  81. 10
      designer_base/src/com/fr/design/fun/impl/AbstractGlobalListenerProvider.java
  82. 9
      designer_base/src/com/fr/design/fun/impl/AbstractHighlightProvider.java
  83. 9
      designer_base/src/com/fr/design/fun/impl/AbstractHyperlinkProvider.java
  84. 2
      designer_base/src/com/fr/design/fun/impl/AbstractIndentationUnitProcessor.java
  85. 9
      designer_base/src/com/fr/design/fun/impl/AbstractJavaScriptActionProvider.java
  86. 2
      designer_base/src/com/fr/design/fun/impl/AbstractMenuHandler.java
  87. 9
      designer_base/src/com/fr/design/fun/impl/AbstractParameterWidgetOptionProvider.java
  88. 10
      designer_base/src/com/fr/design/fun/impl/AbstractPresentKindProvider.java
  89. 9
      designer_base/src/com/fr/design/fun/impl/AbstractPreviewProvider.java
  90. 29
      designer_base/src/com/fr/design/fun/impl/AbstractServerTableDataDefineProvider.java
  91. 10
      designer_base/src/com/fr/design/fun/impl/AbstractSubmitProvider.java
  92. 2
      designer_base/src/com/fr/design/fun/impl/AbstractTDPaneProcessor.java
  93. 25
      designer_base/src/com/fr/design/fun/impl/AbstractTableDataDefineProvider.java
  94. 2
      designer_base/src/com/fr/design/fun/impl/AbstractTitleProcessor.java
  95. 9
      designer_base/src/com/fr/design/fun/impl/AbstractToolbarItem.java
  96. 2
      designer_base/src/com/fr/design/fun/impl/AbstractUIFormulaProcessor.java
  97. 2
      designer_base/src/com/fr/design/fun/impl/AbstractVerifyDefineProvider.java
  98. 18
      designer_base/src/com/fr/design/fun/impl/AbstractWidgetDesignHandler.java
  99. 2
      designer_base/src/com/fr/design/fun/impl/AbstractWidgetPropertyUIProvider.java
  100. 5
      designer_base/src/com/fr/design/gui/frpane/HyperlinkGroupPane.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 com.fr.report.cell.cellattr.CurrencyLinePresent;
import javax.swing.*; import javax.swing.*;
import java.util.Set;
/** /**
* peter: 这个方法只是临时放在这边的, 等插件系统全部完善后,立刻删除. * peter: 这个方法只是临时放在这边的, 等插件系统全部完善后,立刻删除.
@ -131,7 +132,7 @@ public class DeprecatedActionManager {
presentMenu.addShortCut(barcodeAction); presentMenu.addShortCut(barcodeAction);
presentMenu.addShortCut(currencyLineAction); presentMenu.addShortCut(currencyLineAction);
PresentKindProvider[] providers = ExtraDesignClassManager.getInstance().getPresentKindProviders(); Set<PresentKindProvider> providers = ExtraDesignClassManager.getInstance().getArray(PresentKindProvider.MARK_STRING);
for (PresentKindProvider provider : providers) { for (PresentKindProvider provider : providers) {
NewPresentAction action = new NewPresentAction(ePane, provider.title(), provider.kindOfPresent().getName()); NewPresentAction action = new NewPresentAction(ePane, provider.title(), provider.kindOfPresent().getName());
action.setMnemonic(provider.mnemonic()); 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 javax.swing.*;
import java.awt.*; import java.awt.*;
import java.util.Iterator; import java.util.Iterator;
import java.util.Set;
public class HighLightConditionAttributesPane extends ConditionAttributesPane<DefaultHighlight> { 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(BorderHighlightAction.class, new BorderHighlightPane(this));
classPaneMap.put(WidgetHighlightAction.class, new WidgetHighlightPane(this)); classPaneMap.put(WidgetHighlightAction.class, new WidgetHighlightPane(this));
classPaneMap.put(ValueHighlightAction.class, new NewRealValuePane(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) { for (HighlightProvider provider : providers) {
classPaneMap.put(provider.classForHighlightAction(), provider.appearanceForCondition(this)); 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.paddingLeftSpinner.setValue(new Integer(0));
this.paddingRightSpinner.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) { if (null == this.indentationUnitProcessor) {
this.indentationUnitProcessor = new DefaultIndentationUnitProcessor(); 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.MouseAdapter;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
import java.lang.reflect.Constructor; import java.lang.reflect.Constructor;
import java.util.Set;
import javax.swing.AbstractAction; import javax.swing.AbstractAction;
import javax.swing.ActionMap; import javax.swing.ActionMap;
@ -384,7 +385,7 @@ public abstract class ElementCasePane<T extends TemplateElementCase> extends Tar
} }
private void addExtraCellEditor(Grid grid) { private void addExtraCellEditor(Grid grid) {
ElementUIProvider[] providers = ExtraDesignClassManager.getInstance().getElementUIProviders(); Set<ElementUIProvider> providers = ExtraDesignClassManager.getInstance().getArray(ElementUIProvider.MARK_STRING);
for (ElementUIProvider provider : providers) { for (ElementUIProvider provider : providers) {
CellEditor editor = null; CellEditor editor = null;
Class<?> clazz = provider.targetCellEditorClass(); Class<?> clazz = provider.targetCellEditorClass();

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

@ -35,8 +35,8 @@ import java.util.*;
*/ */
public class InformationCollector implements XMLReadable, XMLWriter { public class InformationCollector implements XMLReadable, XMLWriter {
//3天上传一次 // 24小时上传一次
private static final long DELTA = 3 * 24 * 3600 * 1000L; private static final long DELTA = 24 * 3600 * 1000L;
private static final long SEND_DELAY = 30 * 1000L; private static final long SEND_DELAY = 30 * 1000L;
private static final String FILE_NAME = "fr.info"; private static final String FILE_NAME = "fr.info";
private static final String XML_START_STOP_LIST = "StartStopList"; private static final String XML_START_STOP_LIST = "StartStopList";
@ -203,8 +203,6 @@ public class InformationCollector implements XMLReadable, XMLWriter {
//服务器返回true, 说明已经获取成功, 清空当前记录的信息 //服务器返回true, 说明已经获取成功, 清空当前记录的信息
if (success) { if (success) {
deleteLogDB(conn, table); deleteLogDB(conn, table);
//收集设计器信息的服务器下线了, 目测还要一段时间, 不在那边一起setLastTime了.
this.lastTime = dateToString();
} }
} }

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

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

117
designer/src/com/fr/design/mainframe/bbs/BBSLoginDialog.java

@ -9,11 +9,9 @@ import com.fr.design.gui.ipasswordfield.UIPassWordField;
import com.fr.design.gui.itextfield.UITextField; import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.ComparatorUtils; import com.fr.general.*;
import com.fr.general.FRFont;
import com.fr.general.FRLogger;
import com.fr.general.Inter;
import com.fr.general.http.HttpClient; import com.fr.general.http.HttpClient;
import com.fr.stable.EncodeConstants;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import javax.swing.*; import javax.swing.*;
@ -24,8 +22,10 @@ import java.awt.event.ActionListener;
import java.awt.event.KeyAdapter; import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent; import java.awt.event.KeyEvent;
import java.awt.event.KeyListener; import java.awt.event.KeyListener;
import java.io.UnsupportedEncodingException;
import java.net.HttpURLConnection; import java.net.HttpURLConnection;
import java.net.URI; import java.net.URI;
import java.net.URLEncoder;
/** /**
* @author richie * @author richie
@ -36,12 +36,8 @@ public class BBSLoginDialog extends UIDialog {
private static final int DIALOG_WIDTH = 400; private static final int DIALOG_WIDTH = 400;
private static final int DIALOG_HEIGHT = 200; private static final int DIALOG_HEIGHT = 200;
private static final String URL = "http://bbs.finereport.com/member.php?mod=logging&action=login&loginsubmit=yes&infloat=yes&lssubmit=yes&inajax=1";
private static final String PASSWORD_RESET_URL = "http://bbs.finereport.com/portal.php?mod=topic&topicid=2";
private static final String REGISTER_URL = "http://bbs.finereport.com/member.php?mod=register";
private static final String LOGIN_SUCCESS_FLAG = "http://bbs.finereport.com"; private static final String LOGIN_SUCCESS_FLAG = "http://bbs.finereport.com";
private static final Font DEFAULT_FONT = FRFont.getInstance(FRFont.DEFAULT_FONTNAME, 0, 14); private static final Font DEFAULT_FONT = FRFont.getInstance(FRFont.DEFAULT_FONTNAME, 0, 14);
private static final String TEST_CONNECTION_URL = "http://bbs.finereport.com/member.php?mod=logging&action=login&loginsubmit=yes&infloat=yes&lssubmit=yes&inajax=1&username=test&password=123456";
private static final int TIME_OUT = 10000; private static final int TIME_OUT = 10000;
private static final int BUTTON_WIDTH = 90; private static final int BUTTON_WIDTH = 90;
@ -63,14 +59,14 @@ public class BBSLoginDialog extends UIDialog {
private BoxCenterAligmentPane registerLabel; private BoxCenterAligmentPane registerLabel;
private KeyListener keyListener = new KeyAdapter() { private KeyListener keyListener = new KeyAdapter() {
public void keyPressed(KeyEvent e){ public void keyPressed(KeyEvent e) {
int code = e.getKeyCode(); int code = e.getKeyCode();
if(KeyEvent.VK_ESCAPE == code){ if (KeyEvent.VK_ESCAPE == code) {
BBSLoginDialog.this.setVisible(false); BBSLoginDialog.this.setVisible(false);
return; return;
} }
if(KeyEvent.VK_ENTER == code){ if (KeyEvent.VK_ENTER == code) {
login(); login();
} }
} }
@ -91,27 +87,28 @@ public class BBSLoginDialog extends UIDialog {
/** /**
* 构造函数 * 构造函数
*
* @param parent 父窗口 * @param parent 父窗口
* @param userInfoLabel 登录状态label * @param userInfoLabel 登录状态label
*/ */
public BBSLoginDialog(Frame parent,UserInfoLabel userInfoLabel) { public BBSLoginDialog(Frame parent, UserInfoLabel userInfoLabel) {
super(parent); super(parent);
JPanel panel = (JPanel) getContentPane(); JPanel panel = (JPanel) getContentPane();
initComponents(panel); initComponents(panel);
this.userInfoLabel = userInfoLabel; this.userInfoLabel = userInfoLabel;
setSize(new Dimension(DIALOG_WIDTH,DIALOG_HEIGHT)); setSize(new Dimension(DIALOG_WIDTH, DIALOG_HEIGHT));
} }
private void initComponents(JPanel contentPane) { private void initComponents(JPanel contentPane) {
this.setTitle(Inter.getLocText("FR-Designer-BBSLogin_Login-Title")); this.setTitle(Inter.getLocText("FR-Designer-BBSLogin_Login-Title"));
tipLabel = new UILabel(Inter.getLocText("FR-Designer-BBSLogin_Login-Failure-Tip")); tipLabel = new UILabel(Inter.getLocText("FR-Designer-BBSLogin_Login-Failure-Tip"));
userLabel = new UILabel(Inter.getLocText("FR-Designer-BBSLogin_Account")+":"); userLabel = new UILabel(Inter.getLocText("FR-Designer-BBSLogin_Account") + ":");
passLabel = new UILabel(Inter.getLocText("FR-Designer-BBSLogin_Password")+":"); passLabel = new UILabel(Inter.getLocText("FR-Designer-BBSLogin_Password") + ":");
nameField = new UITextField(); nameField = new UITextField();
passField = new UIPassWordField(); passField = new UIPassWordField();
loginButton = new UIButton(Inter.getLocText("FR-Designer-BBSLogin_Login")); loginButton = new UIButton(Inter.getLocText("FR-Designer-BBSLogin_Login"));
passwordReset = getURLActionLabel(PASSWORD_RESET_URL); passwordReset = getURLActionLabel(SiteCenter.getInstance().acquireUrlByKind("bbs.reset"));
registerLabel = getURLActionLabel(REGISTER_URL); registerLabel = getURLActionLabel(SiteCenter.getInstance().acquireUrlByKind("bbs.register"));
loginButton.addActionListener(new ActionListener() { loginButton.addActionListener(new ActionListener() {
@Override @Override
public void actionPerformed(ActionEvent arg0) { public void actionPerformed(ActionEvent arg0) {
@ -130,7 +127,7 @@ public class BBSLoginDialog extends UIDialog {
contentPane.setLayout(new BorderLayout()); contentPane.setLayout(new BorderLayout());
JPanel mainPane = new JPanel(); JPanel mainPane = new JPanel();
mainPane.setLayout(new BorderLayout(0,V_GAP)); mainPane.setLayout(new BorderLayout(0, V_GAP));
initNorthPane(mainPane); initNorthPane(mainPane);
@ -138,81 +135,81 @@ public class BBSLoginDialog extends UIDialog {
initSouthPane(mainPane); initSouthPane(mainPane);
contentPane.add(mainPane,BorderLayout.NORTH); contentPane.add(mainPane, BorderLayout.NORTH);
this.setResizable(false); this.setResizable(false);
} }
private void login(){ private void login() {
if(nameField.getText().isEmpty()){ if (nameField.getText().isEmpty()) {
tipForUsernameEmpty(); tipForUsernameEmpty();
nameField.requestFocus(); nameField.requestFocus();
return; return;
} }
if(String.valueOf(passField.getPassword()).isEmpty()){ if (String.valueOf(passField.getPassword()).isEmpty()) {
tipForPasswordEmpty(); tipForPasswordEmpty();
passField.requestFocus(); passField.requestFocus();
return; return;
} }
if(!testConnection()){ if (!testConnection()) {
connectionFailue(); connectionFailue();
return; return;
} }
if(login(nameField.getText(),String.valueOf(passField.getPassword()))){ if (login(nameField.getText(), String.valueOf(passField.getPassword()))) {
loginSuccess(); loginSuccess();
}else{ } else {
loginFailure(); loginFailure();
} }
} }
private boolean testConnection(){ private boolean testConnection() {
HttpClient client = new HttpClient(TEST_CONNECTION_URL); HttpClient client = new HttpClient(SiteCenter.getInstance().acquireUrlByKind("bbs.test"));
return client.isServerAlive(); return client.isServerAlive();
} }
private void initNorthPane(JPanel mainPane){ private void initNorthPane(JPanel mainPane) {
JPanel northPane = new JPanel(); JPanel northPane = new JPanel();
northPane.setPreferredSize(new Dimension(DIALOG_WIDTH,NORTH_PANE_HEIGHT)); northPane.setPreferredSize(new Dimension(DIALOG_WIDTH, NORTH_PANE_HEIGHT));
northPane.add(tipLabel); northPane.add(tipLabel);
mainPane.add(northPane,BorderLayout.NORTH); mainPane.add(northPane, BorderLayout.NORTH);
} }
private void initCenterPane(JPanel mainPane){ private void initCenterPane(JPanel mainPane) {
JPanel loginPane = new JPanel(); JPanel loginPane = new JPanel();
loginPane.setLayout(new GridLayout(2,1,0,V_GAP)); loginPane.setLayout(new GridLayout(2, 1, 0, V_GAP));
JPanel namePane = new JPanel(); JPanel namePane = new JPanel();
namePane.setLayout(new FlowLayout(FlowLayout.RIGHT,FLOWLAYOUT_H_GAP,0)); namePane.setLayout(new FlowLayout(FlowLayout.RIGHT, FLOWLAYOUT_H_GAP, 0));
namePane.add(userLabel); namePane.add(userLabel);
nameField.setPreferredSize(new Dimension(FIELD_WIDTH,FIELD_HEIGHT)); nameField.setPreferredSize(new Dimension(FIELD_WIDTH, FIELD_HEIGHT));
namePane.add(nameField); namePane.add(nameField);
namePane.add(passwordReset); namePane.add(passwordReset);
loginPane.add(namePane); loginPane.add(namePane);
JPanel passPane = new JPanel(); JPanel passPane = new JPanel();
passPane.setLayout(new FlowLayout(FlowLayout.RIGHT,FLOWLAYOUT_H_GAP,0)); passPane.setLayout(new FlowLayout(FlowLayout.RIGHT, FLOWLAYOUT_H_GAP, 0));
passPane.add(passLabel); passPane.add(passLabel);
passPane.add(passField); passPane.add(passField);
passField.setPreferredSize(new Dimension(FIELD_WIDTH,FIELD_HEIGHT)); passField.setPreferredSize(new Dimension(FIELD_WIDTH, FIELD_HEIGHT));
passPane.add(registerLabel); passPane.add(registerLabel);
loginPane.add(passPane); loginPane.add(passPane);
mainPane.add(loginPane,BorderLayout.CENTER); mainPane.add(loginPane, BorderLayout.CENTER);
} }
private void initSouthPane(JPanel mainPane){ private void initSouthPane(JPanel mainPane) {
JPanel southPane = new JPanel(); JPanel southPane = new JPanel();
southPane.setLayout(new FlowLayout(FlowLayout.RIGHT,BUTTON_H_GAP,0)); southPane.setLayout(new FlowLayout(FlowLayout.RIGHT, BUTTON_H_GAP, 0));
loginButton.setPreferredSize(new Dimension(BUTTON_WIDTH,FIELD_HEIGHT)); loginButton.setPreferredSize(new Dimension(BUTTON_WIDTH, FIELD_HEIGHT));
loginButton.setFont(DEFAULT_FONT); loginButton.setFont(DEFAULT_FONT);
southPane.add(loginButton); southPane.add(loginButton);
mainPane.add(southPane,BorderLayout.SOUTH); mainPane.add(southPane, BorderLayout.SOUTH);
} }
// 登录成功 // 登录成功
private void loginSuccess(){ private void loginSuccess() {
DesignerEnvManager.getEnvManager().setBBSPassword(String.valueOf(passField.getPassword())); DesignerEnvManager.getEnvManager().setBBSPassword(String.valueOf(passField.getPassword()));
userInfoLabel.setUserName(nameField.getText()); userInfoLabel.setUserName(nameField.getText());
userInfoLabel.getUserInfoPane().markSignIn(nameField.getText()); userInfoLabel.getUserInfoPane().markSignIn(nameField.getText());
@ -221,11 +218,11 @@ public class BBSLoginDialog extends UIDialog {
} }
// 登录失败 // 登录失败
private void loginFailure(){ private void loginFailure() {
setLoginFailureTxt(Inter.getLocText("FR-Designer-BBSLogin_Login-Failure-Tip")); setLoginFailureTxt(Inter.getLocText("FR-Designer-BBSLogin_Login-Failure-Tip"));
} }
private void tipForUsernameEmpty(){ private void tipForUsernameEmpty() {
setLoginFailureTxt(Inter.getLocText("FR-Designer-BBSLogin_Username-Empty-Tip")); setLoginFailureTxt(Inter.getLocText("FR-Designer-BBSLogin_Username-Empty-Tip"));
} }
@ -233,11 +230,11 @@ public class BBSLoginDialog extends UIDialog {
setLoginFailureTxt(Inter.getLocText("FR-Designer-BBSLogin_Download-Unlogin-Tip")); setLoginFailureTxt(Inter.getLocText("FR-Designer-BBSLogin_Download-Unlogin-Tip"));
} }
private void tipForPasswordEmpty(){ private void tipForPasswordEmpty() {
setLoginFailureTxt(Inter.getLocText("FR-Designer-BBSLogin_Password-Empty-Tip")); setLoginFailureTxt(Inter.getLocText("FR-Designer-BBSLogin_Password-Empty-Tip"));
} }
private void setLoginFailureTxt(String errorTxt){ private void setLoginFailureTxt(String errorTxt) {
tipLabel.setText(errorTxt); tipLabel.setText(errorTxt);
tipLabel.setForeground(Color.RED); tipLabel.setForeground(Color.RED);
tipLabel.repaint(); tipLabel.repaint();
@ -245,14 +242,14 @@ public class BBSLoginDialog extends UIDialog {
} }
// 连接失败 // 连接失败
private void connectionFailue(){ private void connectionFailue() {
setLoginFailureTxt(Inter.getLocText("FR-Designer-BBSLogin_Connection-Failure")); setLoginFailureTxt(Inter.getLocText("FR-Designer-BBSLogin_Connection-Failure"));
} }
/** /**
* 清楚登录信息 * 清楚登录信息
*/ */
public void clearLoginInformation(){ public void clearLoginInformation() {
tipLabel.setText(StringUtils.EMPTY); tipLabel.setText(StringUtils.EMPTY);
nameField.setText(StringUtils.EMPTY); nameField.setText(StringUtils.EMPTY);
passField.setText(StringUtils.EMPTY); passField.setText(StringUtils.EMPTY);
@ -261,7 +258,7 @@ public class BBSLoginDialog extends UIDialog {
/** /**
* 显示登录窗口 * 显示登录窗口
*/ */
public void showWindow(){ public void showWindow() {
GUICoreUtils.centerWindow(this); GUICoreUtils.centerWindow(this);
setVisible(true); setVisible(true);
} }
@ -276,18 +273,24 @@ public class BBSLoginDialog extends UIDialog {
/** /**
* 是否登陆成功 * 是否登陆成功
*
* @param username 用户名 * @param username 用户名
* @param password 密码 * @param password 密码
* @return 同上 * @return 同上
*/ */
public static boolean login(String username,String password){ public static boolean login(String username, String password) {
String url = URL + "&username=" + username + "&password=" + password; try {
username = URLEncoder.encode(username, EncodeConstants.ENCODING_GBK);
} catch (UnsupportedEncodingException e) {
FRLogger.getLogger().error(e.getMessage());
}
String url = SiteCenter.getInstance().acquireUrlByKind("bbs.login") + "&username=" + username + "&password=" + password;
HttpClient client = new HttpClient(url); HttpClient client = new HttpClient(url);
client.setTimeout(TIME_OUT); client.setTimeout(TIME_OUT);
if(client.getResponseCodeNoException() == HttpURLConnection.HTTP_OK){ if (client.getResponseCodeNoException() == HttpURLConnection.HTTP_OK) {
try { try {
String res = client.getResponseText("GBK"); String res = client.getResponseText(EncodeConstants.ENCODING_GBK);
if(res.contains(LOGIN_SUCCESS_FLAG)){ if (res.contains(LOGIN_SUCCESS_FLAG)) {
return true; return true;
} }
} catch (Exception e) { } catch (Exception e) {
@ -297,11 +300,11 @@ public class BBSLoginDialog extends UIDialog {
return false; return false;
} }
private BoxCenterAligmentPane getURLActionLabel(final String url){ private BoxCenterAligmentPane getURLActionLabel(final String url) {
ActionLabel actionLabel = new ActionLabel(url); ActionLabel actionLabel = new ActionLabel(url);
if(ComparatorUtils.equals(url, PASSWORD_RESET_URL)){ if (ComparatorUtils.equals(url, SiteCenter.getInstance().acquireUrlByKind("bbs.reset"))) {
actionLabel.setText(Inter.getLocText("FR-Designer-BBSLogin_Forgot-Password")); actionLabel.setText(Inter.getLocText("FR-Designer-BBSLogin_Forgot-Password"));
}else{ } else {
actionLabel.setText(Inter.getLocText("FR-Designer-BBSLogin_Register-Account")); actionLabel.setText(Inter.getLocText("FR-Designer-BBSLogin_Register-Account"));
} }

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 CellPresentPane());
paneList.add(new CellOtherSetPane()); paneList.add(new CellOtherSetPane());
cellAttributeProvider = ExtraDesignClassManager.getInstance().getCelllAttributeProvider(); cellAttributeProvider = ExtraDesignClassManager.getInstance().getSingle(CellAttributeProvider.MARK_STRING);
if (cellAttributeProvider != null){ if (cellAttributeProvider != null){
paneList.add((AbstractCellAttrPane) cellAttributeProvider.createCellAttributePane()); paneList.add((AbstractCellAttrPane) cellAttributeProvider.createCellAttributePane());
} }

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

@ -54,7 +54,9 @@ import com.fr.stable.ArrayUtils;
import com.fr.stable.ParameterProvider; import com.fr.stable.ParameterProvider;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import com.fr.stable.bridge.StableFactory; import com.fr.stable.bridge.StableFactory;
import com.fr.stable.fun.LogProvider;
import com.fr.stable.module.Module; import com.fr.stable.module.Module;
import com.fr.stable.plugin.PluginSimplify;
import com.fr.stable.script.CalculatorProviderContext; import com.fr.stable.script.CalculatorProviderContext;
import com.fr.stable.script.ValueConverter; import com.fr.stable.script.ValueConverter;
import com.fr.stable.xml.ObjectTokenizer; import com.fr.stable.xml.ObjectTokenizer;
@ -69,6 +71,7 @@ import java.awt.event.ActionListener;
import java.awt.image.BufferedImage; import java.awt.image.BufferedImage;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Iterator; import java.util.Iterator;
import java.util.Set;
public class DesignerModule extends DesignModule { public class DesignerModule extends DesignModule {
@ -94,7 +97,7 @@ public class DesignerModule extends DesignModule {
InformationCollector.getInstance().collectStartTime(); InformationCollector.getInstance().collectStartTime();
ExtraDesignClassManager.getInstance().getFeedback().didFeedback(); ExtraDesignClassManager.getInstance().getFeedback().didFeedback();
ExtraClassManager.getInstance().addLogProvider(DesignerLogImpl.getInstance()); ExtraClassManager.getInstance().addMutable(LogProvider.MARK_STRING, DesignerLogImpl.getInstance(), PluginSimplify.NULL);
} }
private void registerOtherPane() { private void registerOtherPane() {
@ -118,7 +121,7 @@ public class DesignerModule extends DesignModule {
ActionFactory.registerChartCellEditorInEditor(ChartQuickEditor.getInstance()); ActionFactory.registerChartCellEditorInEditor(ChartQuickEditor.getInstance());
ElementUIProvider[] providers = ExtraDesignClassManager.getInstance().getElementUIProviders(); Set<ElementUIProvider> providers = ExtraDesignClassManager.getInstance().getArray(ElementUIProvider.MARK_STRING);
for (ElementUIProvider provider : providers) { for (ElementUIProvider provider : providers) {
ActionFactory.registerCellEditor(provider.targetObjectClass(), provider.quickEditor()); ActionFactory.registerCellEditor(provider.targetObjectClass(), provider.quickEditor());
} }
@ -222,6 +225,16 @@ public class DesignerModule extends DesignModule {
public JTemplate<WorkBook, ?> openTemplate(FILE tplFile) { public JTemplate<WorkBook, ?> openTemplate(FILE tplFile) {
return new JWorkBook(asIOFile(tplFile), tplFile); return new JWorkBook(asIOFile(tplFile), tplFile);
} }
@Override
public String mark4Provider() {
return getClass().getName();
}
@Override
public void process() {
}
} }
@Override @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.awt.event.ItemListener;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Set;
/** /**
* @author zhou * @author zhou
@ -86,7 +87,7 @@ public class PresentPane extends UIComboBoxPane<Present> {
keys.add(CurrencyLinePresent.class.getName()); keys.add(CurrencyLinePresent.class.getName());
displays.add(currency.title4PopupWindow()); displays.add(currency.title4PopupWindow());
PresentKindProvider[] providers = ExtraDesignClassManager.getInstance().getPresentKindProviders(); Set<PresentKindProvider> providers = ExtraDesignClassManager.getInstance().getArray(PresentKindProvider.MARK_STRING);
for (PresentKindProvider provider : providers) { for (PresentKindProvider provider : providers) {
FurtherBasicBeanPane<? extends Present> extra = provider.appearanceForPresent(); FurtherBasicBeanPane<? extends Present> extra = provider.appearanceForPresent();
paneList.add(extra); 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.ArrayList;
import java.util.List; import java.util.List;
import java.util.Set;
public class ReportExportAttrPane extends BasicPane { public class ReportExportAttrPane extends BasicPane {
@ -29,8 +30,8 @@ public class ReportExportAttrPane extends BasicPane {
uiTabbedPane.addTab("PDF", pdfExportPane); uiTabbedPane.addTab("PDF", pdfExportPane);
wordExportPane = new WordExportPane(); wordExportPane = new WordExportPane();
uiTabbedPane.addTab("Word", wordExportPane); uiTabbedPane.addTab("Word", wordExportPane);
ExportAttrTabProvider[] providers = ExtraDesignClassManager.getInstance().getExportAttrTabProviders(); Set<ExportAttrTabProvider> providers = ExtraDesignClassManager.getInstance().getArray(ExportAttrTabProvider.XML_TAG);
paneList = new ArrayList<AbstractExportPane>(); paneList = new ArrayList<>();
for (ExportAttrTabProvider provider : providers) { for (ExportAttrTabProvider provider : providers) {
uiTabbedPane.addTab(provider.title(), provider.toSwingComponent()); uiTabbedPane.addTab(provider.title(), provider.toSwingComponent());
paneList.add(provider.toExportPane()); 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.awt.event.ActionListener;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Set;
public class EditToolBar extends BasicPane { public class EditToolBar extends BasicPane {
@ -354,7 +355,8 @@ public class EditToolBar extends BasicPane {
* 初始化元素 * 初始化元素
*/ */
public void initComponents() { 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()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
JPanel north = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel north = FRGUIPaneFactory.createBorderLayout_S_Pane();
icon = new UICheckBox(Inter.getLocText("FR-Designer_Show_Icon")); icon = new UICheckBox(Inter.getLocText("FR-Designer_Show_Icon"));

7
designer/src/com/fr/design/webattr/WebSettingPane.java

@ -4,6 +4,7 @@ import com.fr.base.ConfigManager;
import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.core.WidgetOption; import com.fr.design.gui.core.WidgetOption;
import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
@ -81,9 +82,9 @@ public abstract class WebSettingPane<T extends WebContent> extends BasicBeanPane
} }
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
JPanel allPanel = FRGUIPaneFactory.createBorderLayout_L_Pane();
allPanel.add(panel,BorderLayout.CENTER); UIScrollPane scrollPane = new UIScrollPane(panel);
this.add(allPanel,BorderLayout.CENTER); this.add(scrollPane, BorderLayout.CENTER);
} }
ItemListener itemListener = new ItemListener() { ItemListener itemListener = new ItemListener() {

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

@ -1,19 +1,20 @@
package com.fr.design.widget; package com.fr.design.widget;
import com.fr.design.ExtraDesignClassManager; import com.fr.design.ExtraDesignClassManager;
import com.fr.design.dialog.BasicPane;
import com.fr.design.fun.WidgetDesignHandler;
import com.fr.design.gui.core.WidgetOption; import com.fr.design.gui.core.WidgetOption;
import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.icombobox.UIComboBoxRenderer; import com.fr.design.gui.icombobox.UIComboBoxRenderer;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.ElementCasePane; import com.fr.design.mainframe.ElementCasePane;
import com.fr.design.dialog.BasicPane; import com.fr.design.widget.btn.ButtonConstants;
import com.fr.form.ui.Button; import com.fr.form.ui.Button;
import com.fr.form.ui.*; import com.fr.form.ui.*;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
import com.fr.design.widget.btn.ButtonConstants;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
@ -61,16 +62,22 @@ public class WidgetPane extends BasicPane implements ItemListener {
/** /**
* 状态改变 * 状态改变
*
* @param e 事件对象 * @param e 事件对象
*/ */
public void itemStateChanged(ItemEvent e) { public void itemStateChanged(ItemEvent e) {
if (e.getStateChange() == ItemEvent.SELECTED) { if (e.getStateChange() == ItemEvent.SELECTED) {
Widget oldWidget = update();
Widget selectedItem = editorTypeComboBox.getCellWidget();
WidgetDesignHandler handler = ExtraDesignClassManager.getInstance().getSingle(WidgetDesignHandler.XML_TAG);
if (handler != null) {
handler.transferWidgetProperties(oldWidget, selectedItem);
}
if (e.getItem() instanceof Item && ((Item) e.getItem()).getValue() instanceof WidgetConfig) { if (e.getItem() instanceof Item && ((Item) e.getItem()).getValue() instanceof WidgetConfig) {
populate(editorTypeComboBox.getCellWidget()); populate(selectedItem);
return; return;
} }
if (shouldFireSelectedEvent) { if (shouldFireSelectedEvent) {
Widget selectedItem = editorTypeComboBox.getCellWidget();
populateWidgetConfig(selectedItem); populateWidgetConfig(selectedItem);
} }
} }
@ -190,12 +197,13 @@ public class WidgetPane extends BasicPane implements ItemListener {
} }
private WidgetOption[] getWidgetOptions() { private WidgetOption[] getWidgetOptions() {
return (WidgetOption[])ArrayUtils.addAll(WidgetOption.getReportWidgetInstance(), ExtraDesignClassManager.getInstance().getCellWidgetOptions()); return (WidgetOption[]) ArrayUtils.addAll(WidgetOption.getReportWidgetInstance(), ExtraDesignClassManager.getInstance().getCellWidgetOptions());
} }
} }
/** /**
* 校验 * 校验
*
* @throws Exception 抛出异常 * @throws Exception 抛出异常
*/ */
public void checkValid() throws Exception { public void checkValid() throws Exception {
@ -222,6 +230,7 @@ public class WidgetPane extends BasicPane implements ItemListener {
/** /**
* 转化成字符串形式 * 转化成字符串形式
*
* @return 返回字符串 * @return 返回字符串
*/ */
public String toString() { public String toString() {

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

31
designer_base/.classpath

@ -1,33 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<classpath> <classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.6u35"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="src" path="src"/> <classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/lib"/> <classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/lib"/>
<classpathentry combineaccessrules="false" exported="true" kind="src" path="/base"/> <classpathentry kind="lib" path="D:/Program Files/Git/finereport/lib/report/fr-core-8.0.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/base-stable"/> <classpathentry kind="lib" path="D:/Program Files/Git/finereport/lib/report/fr-third-8.0.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/base-basic"/> <classpathentry kind="lib" path="D:/Program Files/Git/finereport/lib/jetty/org.mortbay.jetty.jar"/>
<classpathentry kind="lib" path="/lib/jetty/activation.jar"/>
<classpathentry kind="lib" path="/lib/jetty/commons-el.jar"/>
<classpathentry kind="lib" path="/lib/jetty/commons-logging.jar"/>
<classpathentry kind="lib" path="/lib/jetty/jasper-compiler.jar"/>
<classpathentry kind="lib" path="/lib/jetty/jasper-runtime.jar"/>
<classpathentry kind="lib" path="/lib/jetty/javax.servlet.jar"/>
<classpathentry kind="lib" path="/lib/jetty/jaxrpc.jar"/>
<classpathentry kind="lib" path="/lib/jetty/mail.jar"/>
<classpathentry kind="lib" path="/lib/jetty/mx4j-remote.jar"/>
<classpathentry kind="lib" path="/lib/jetty/mx4j-tools.jar"/>
<classpathentry kind="lib" path="/lib/jetty/mx4j.jar"/>
<classpathentry kind="lib" path="/lib/jetty/org.mortbay.jetty.jar"/>
<classpathentry kind="lib" path="/lib/jetty/org.mortbay.jmx.jar"/>
<classpathentry kind="lib" path="/lib/jetty/saaj.jar"/>
<classpathentry kind="lib" path="/lib/jetty/xercesImpl.jar"/>
<classpathentry kind="lib" path="/lib/jetty/xml-apis.jar"/>
<classpathentry kind="lib" path="/lib/jetty/xmlParserAPIs.jar"/>
<classpathentry kind="lib" path="/lib/3rd.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/base-calculate"/>
<classpathentry kind="lib" path="/lib/junit.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/base-data"/>
<classpathentry kind="lib" path="/lib/olap4j-1.1.0.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/base-file"/>
<classpathentry kind="output" path="bin"/> <classpathentry kind="output" path="bin"/>
</classpath> </classpath>

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

@ -5,54 +5,33 @@
package com.fr.design; package com.fr.design;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.FRContext;
import com.fr.design.data.datapane.TableDataNameObjectCreator; import com.fr.design.data.datapane.TableDataNameObjectCreator;
import com.fr.design.data.tabledata.wrapper.TableDataFactory;
import com.fr.design.fun.*; import com.fr.design.fun.*;
import com.fr.design.gui.controlpane.NameObjectCreator;
import com.fr.design.gui.core.WidgetOption; import com.fr.design.gui.core.WidgetOption;
import com.fr.design.gui.core.WidgetOptionFactory; import com.fr.design.gui.core.WidgetOptionFactory;
import com.fr.design.mainframe.App;
import com.fr.design.mainframe.DesignerFrame;
import com.fr.design.menu.ShortCut;
import com.fr.design.widget.Appearance; import com.fr.design.widget.Appearance;
import com.fr.file.XMLFileManager;
import com.fr.form.ui.Widget; import com.fr.form.ui.Widget;
import com.fr.general.ComparatorUtils;
import com.fr.general.FRLogger; import com.fr.general.FRLogger;
import com.fr.general.GeneralContext; import com.fr.general.GeneralContext;
import com.fr.general.GeneralUtils; import com.fr.general.GeneralUtils;
import com.fr.plugin.PluginCollector; import com.fr.general.IOUtils;
import com.fr.plugin.PluginInvalidLevelException; import com.fr.plugin.ExtraXMLFileManager;
import com.fr.plugin.PluginLicenseManager;
import com.fr.plugin.PluginMessage;
import com.fr.stable.EnvChangedListener; import com.fr.stable.EnvChangedListener;
import com.fr.stable.StringUtils;
import com.fr.stable.fun.Authorize;
import com.fr.stable.fun.Level;
import com.fr.stable.plugin.ExtraDesignClassManagerProvider; import com.fr.stable.plugin.ExtraDesignClassManagerProvider;
import com.fr.stable.plugin.PluginSimplify; import com.fr.stable.plugin.PluginSimplify;
import com.fr.stable.xml.XMLPrintWriter; import com.fr.stable.xml.XMLPrintWriter;
import com.fr.stable.xml.XMLableReader; import com.fr.stable.xml.XMLableReader;
import java.util.ArrayList; import java.util.*;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
/** /**
* @author : richie * @author : richie
* @since : 8.0 * @since : 8.0
* 用于设计器扩展的管理类 * 用于设计器扩展的管理类
*/ */
public class ExtraDesignClassManager extends XMLFileManager implements ExtraDesignClassManagerProvider { public class ExtraDesignClassManager extends ExtraXMLFileManager implements ExtraDesignClassManagerProvider {
private static final String XML_TAG = "ExtraDesignClassManager"; private static final String XML_TAG = "ExtraDesignClassManager";
private static final String TEMPLATE_TREE_TAG = "TemplateTreeShortCut";
private static ClassLoader loader = Thread.currentThread().getContextClassLoader();
private static ExtraDesignClassManager classManager; private static ExtraDesignClassManager classManager;
@ -78,222 +57,11 @@ public class ExtraDesignClassManager extends XMLFileManager implements ExtraDesi
classManager = null; classManager = null;
} }
private List<TableDataNameObjectCreator> reportTDCreators;
private List<TableDataNameObjectCreator> serverTDCreators;
private List<WidgetOption> parameterWidgetOptions;
private Map<Class<? extends Widget>, Class<?>> parameterWidgetOptionsMap;
private List<WidgetOption> webWidgetOptions;
private List<WidgetOption> formWidgetOptions;
private List<WidgetOption> formWidgetContainerOptions;
private Map<Class<? extends Widget>, Class<?>> formWidgetOptionsMap;
private List<WidgetOption> cellWidgetOptions;
private Map<Class<? extends Widget>, Appearance> cellWidgetOptionMap;
private List<NameObjectCreator> connectionCreators;
private Set<PreviewProvider> previewProviders;
private Set<HighlightProvider> highlightProviders;
private TableDataCreatorProvider tableDataCreatorProvider;
private List<MenuHandler> menuHandlers;
private UIFormulaProcessor uiFormulaProcessor;
private List<PresentKindProvider> presentKindProviders;
private List<ExportToolBarProvider> exportToolBarProviders;
private Set<ShortCut> templateTreeShortCutProviders;
private List<SubmitProvider> submitProviders;
private List<GlobalListenerProvider> globalListenerProviders;
private List<JavaScriptActionProvider> javaScriptActionProviders;
private TitlePlaceProcessor titlePlaceProcessor;
private FormElementCaseEditorProcessor formElementCaseEditorProcessor;
private IndentationUnitProcessor indentationUnitProcessor;
private CellAttributeProvider cellAttributeProvider;
private Set<HyperlinkProvider> hyperlinkGroupProviders;
private DesignerEnvProcessor envProcessor;
private TableDataPaneProcessor tableDataPaneProcessor;
private Set<ElementUIProvider> elementUIProviders;
private Set<WidgetPropertyUIProvider> widgetAttrProviders;
private Set<ExportAttrTabProvider> exportAttrTabProviders;
private Set<BackgroundQuickUIProvider> backgroundQuickUIProviders;
private Set<BackgroundUIProvider> backgroundUIProviders;
private Set<VerifyDefineProvider> verifyDefineProviders;
public TableDataPaneProcessor getTableDataPaneProcessor() {
return tableDataPaneProcessor;
}
public void setTableDataPaneProcessor(Level level, PluginSimplify simplify) {
validAPILevel(level, TableDataPaneProcessor.CURRENT_LEVEL, simplify.getPluginName());
tableDataPaneProcessor = (TableDataPaneProcessor) level;
}
public DesignerEnvProcessor getEnvProcessor() {
return envProcessor;
}
public void setEnvProcessor(Level level, PluginSimplify simplify) throws Exception {
validAPILevel(level, DesignerEnvProcessor.CURRENT_LEVEL, simplify.getPluginName());
envProcessor = (DesignerEnvProcessor) level;
}
public void addSupportDesignApps(Level level, PluginSimplify simplify) throws Exception {
validAPILevel(level, App.CURRENT_LEVEL, simplify.getPluginName());
App provider = (App) level;
DesignerFrame.registApp(provider);
}
private void validAPILevel(Level level, int targetLevel, String pluginName) {
if (PluginCollector.getCollector().isError(level, targetLevel, pluginName)) {
throw new PluginInvalidLevelException(pluginName, level.currentAPILevel());
}
}
public HyperlinkProvider[] getHyperlinkProvider() {
if (hyperlinkGroupProviders == null) {
return new HyperlinkProvider[0];
}
return hyperlinkGroupProviders.toArray(new HyperlinkProvider[hyperlinkGroupProviders.size()]);
}
public void addHyperlinkProvider(Level level, PluginSimplify simplify) throws Exception {
if (hyperlinkGroupProviders == null) {
hyperlinkGroupProviders = new HashSet<HyperlinkProvider>();
}
validAPILevel(level, HyperlinkProvider.CURRENT_LEVEL, simplify.getPluginName());
HyperlinkProvider provider = (HyperlinkProvider) level;
hyperlinkGroupProviders.add(provider);
}
public GlobalListenerProvider[] getGlobalListenerProvider() {
if (globalListenerProviders == null) {
return new GlobalListenerProvider[0];
}
return globalListenerProviders.toArray(new GlobalListenerProvider[globalListenerProviders.size()]);
}
/**
* 获取javaScriptPane
*
* @return javaScriptPane集合
*/
public List<JavaScriptActionProvider> getJavaScriptActionProvider() {
return javaScriptActionProviders;
}
/**
* 添加一个javaScriptPane
*/
public void addJavaScriptActionProvider(Level level, PluginSimplify simplify) throws Exception {
if (javaScriptActionProviders == null) {
javaScriptActionProviders = new ArrayList<JavaScriptActionProvider>();
}
validAPILevel(level, JavaScriptActionProvider.CURRENT_LEVEL, simplify.getPluginName());
JavaScriptActionProvider provider = (JavaScriptActionProvider) level;
if (!javaScriptActionProviders.contains(provider)) {
javaScriptActionProviders.add(provider);
}
}
/**
* 添加全局监听
*/
public void addGlobalListenerProvider(Level level, PluginSimplify simplify) throws Exception {
if (globalListenerProviders == null) {
globalListenerProviders = new ArrayList<GlobalListenerProvider>();
}
validAPILevel(level, GlobalListenerProvider.CURRENT_LEVEL, simplify.getPluginName());
GlobalListenerProvider provider = (GlobalListenerProvider) level;
if (!globalListenerProviders.contains(provider)) {
globalListenerProviders.add(provider);
}
}
public TableDataCreatorProvider getTableDataCreatorProvider() {
return tableDataCreatorProvider;
}
public void setTableDataCreatorProvider(String className) {
if (StringUtils.isNotBlank(className)) {
try {
Class clazz = Class.forName(className);
tableDataCreatorProvider = (TableDataCreatorProvider) clazz.newInstance();
} catch (Exception e) {
FRLogger.getLogger().error(e.getMessage(), e);
}
}
}
public SubmitProvider[] getSubmitProviders() {
if (submitProviders == null) {
return new SubmitProvider[0];
}
return submitProviders.toArray(new SubmitProvider[submitProviders.size()]);
}
/**
* 添加提交接口
*/
public void addSubmitProvider(Level level, PluginSimplify simplify) throws Exception {
if (submitProviders == null) {
submitProviders = new ArrayList<SubmitProvider>();
}
validAPILevel(level, SubmitProvider.CURRENT_LEVEL, simplify.getPluginName());
SubmitProvider provider = (SubmitProvider) level;
if (!submitProviders.contains(provider)) {
submitProviders.add(provider);
}
}
public TableDataNameObjectCreator[] getReportTableDataCreators() { public TableDataNameObjectCreator[] getReportTableDataCreators() {
if (reportTDCreators == null) { return getKindsOfTableDataCreators(TableDataDefineProvider.XML_TAG);
return new TableDataNameObjectCreator[0];
} else {
return reportTDCreators.toArray(new TableDataNameObjectCreator[reportTDCreators.size()]);
}
}
/**
* 添加reportTDCreators
*
* @param className 类名
*/
public void addTableDataNameObjectCreator(String className, PluginSimplify simplify) {
if (StringUtils.isNotBlank(className)) {
try {
if (reportTDCreators == null) {
reportTDCreators = new ArrayList<TableDataNameObjectCreator>();
}
TableDataNameObjectCreator creator = createTableDataNameObjectCreator(className, simplify);
if (!reportTDCreators.contains(creator)) {
reportTDCreators.add(creator);
}
} catch (Exception e) {
PluginMessage.remindUpdate(className + e.getMessage());
}
}
} }
@ -303,38 +71,16 @@ public class ExtraDesignClassManager extends XMLFileManager implements ExtraDesi
* @return 类名 * @return 类名
*/ */
public TableDataNameObjectCreator[] getServerTableDataCreators() { public TableDataNameObjectCreator[] getServerTableDataCreators() {
if (serverTDCreators == null) { return getKindsOfTableDataCreators(ServerTableDataDefineProvider.XML_TAG);
return new TableDataNameObjectCreator[0];
} else {
return serverTDCreators.toArray(new TableDataNameObjectCreator[serverTDCreators.size()]);
}
} }
/** private TableDataNameObjectCreator[] getKindsOfTableDataCreators(String tag) {
* 添加serverTDCreators Set<TableDataDefineProvider> set = getArray(tag);
* if (set.isEmpty()) {
* @param className 类名 return new TableDataNameObjectCreator[0];
*/
public void addServerTableDataNameObjectCreator(String className, PluginSimplify simplify) {
if (StringUtils.isNotBlank(className)) {
try {
if (serverTDCreators == null) {
serverTDCreators = new ArrayList<TableDataNameObjectCreator>();
}
TableDataNameObjectCreator creator = createTableDataNameObjectCreator(className, simplify);
if (!serverTDCreators.contains(creator)) {
serverTDCreators.add(creator);
}
} catch (Exception e) {
PluginMessage.remindUpdate(className + e.getMessage());
}
}
} }
List<TableDataNameObjectCreator> creators = new ArrayList<>();
private TableDataNameObjectCreator createTableDataNameObjectCreator(String className, PluginSimplify simplify) throws Exception { for (TableDataDefineProvider provider : set) {
Class clazz = loader.loadClass(className);
TableDataDefineProvider provider = (TableDataDefineProvider) clazz.newInstance();
validAPILevel(provider, TableDataDefineProvider.CURRENT_LEVEL, simplify.getPluginName());
TableDataNameObjectCreator creator = new TableDataNameObjectCreator( TableDataNameObjectCreator creator = new TableDataNameObjectCreator(
provider.nameForTableData(), provider.nameForTableData(),
provider.prefixForTableData(), provider.prefixForTableData(),
@ -343,269 +89,123 @@ public class ExtraDesignClassManager extends XMLFileManager implements ExtraDesi
provider.classForInitTableData(), provider.classForInitTableData(),
provider.appearanceForTableData() provider.appearanceForTableData()
); );
TableDataFactory.register(provider.classForTableData(), creator); creators.add(creator);
return creator; }
return creators.toArray(new TableDataNameObjectCreator[creators.size()]);
} }
public Map<Class<? extends Widget>, Class<?>> getParameterWidgetOptionsMap() { public Map<Class<? extends Widget>, Class<?>> getParameterWidgetOptionsMap() {
if (parameterWidgetOptionsMap == null) { Map<Class<? extends Widget>, Class<?>> map = new HashMap<>();
return new HashMap<Class<? extends Widget>, Class<?>>(); Set<ParameterWidgetOptionProvider> set = getArray(ParameterWidgetOptionProvider.XML_TAG);
} else { for (ParameterWidgetOptionProvider provider : set) {
return parameterWidgetOptionsMap; map.put(provider.classForWidget(), provider.appearanceForWidget());
} }
return map;
} }
public WidgetOption[] getParameterWidgetOptions() { public WidgetOption[] getParameterWidgetOptions() {
if (parameterWidgetOptions == null) { Set<ParameterWidgetOptionProvider> set = getArray(ParameterWidgetOptionProvider.XML_TAG);
if (set.isEmpty()) {
return new WidgetOption[0]; return new WidgetOption[0];
} else {
return parameterWidgetOptions.toArray(new WidgetOption[parameterWidgetOptions.size()]);
}
}
/**
* 添加parameterWidgetOptionsMap
*/
public void addParameterWidgetOption(Level level, PluginSimplify simplify) throws Exception {
if (parameterWidgetOptions == null) {
parameterWidgetOptions = new ArrayList<WidgetOption>();
}
if (parameterWidgetOptionsMap == null) {
parameterWidgetOptionsMap = new HashMap<Class<? extends Widget>, Class<?>>();
} }
validAPILevel(level, ParameterWidgetOptionProvider.CURRENT_LEVEL, simplify.getPluginName()); Set<WidgetOption> result = new HashSet<>();
for (ParameterWidgetOptionProvider provider : set) {
ParameterWidgetOptionProvider provider = (ParameterWidgetOptionProvider) level;
WidgetOption option = WidgetOptionFactory.createByWidgetClass( WidgetOption option = WidgetOptionFactory.createByWidgetClass(
provider.nameForWidget(), provider.nameForWidget(),
BaseUtils.readIcon(provider.iconPathForWidget()), IOUtils.readIcon(provider.iconPathForWidget()),
provider.classForWidget() provider.classForWidget()
); );
parameterWidgetOptionsMap.put(provider.classForWidget(), provider.appearanceForWidget()); result.add(option);
parameterWidgetOptions.add(option);
} }
return result.toArray(new WidgetOption[result.size()]);
/**
* 添加 webWidgetOptions
*
* @return 返回 webWidgetOptions
*/
public void addWebWidgetOption(Level level, PluginSimplify simplify) throws Exception {
if (webWidgetOptions == null) {
webWidgetOptions = new ArrayList<WidgetOption>();
} }
validAPILevel(level, ToolbarItemProvider.CURRENT_LEVEL, simplify.getPluginName());
ToolbarItemProvider provider = (ToolbarItemProvider) level;
public WidgetOption[] getWebWidgetOptions() {
Set<ToolbarItemProvider> set = getArray(ToolbarItemProvider.XML_TAG);
if (set.isEmpty()) {
return new WidgetOption[0];
}
List<WidgetOption> list = new ArrayList<>();
for (ToolbarItemProvider provider : set) {
WidgetOption option = WidgetOptionFactory.createByWidgetClass( WidgetOption option = WidgetOptionFactory.createByWidgetClass(
provider.nameForWidget(), provider.nameForWidget(),
BaseUtils.readIcon(provider.iconPathForWidget()), IOUtils.readIcon(provider.iconPathForWidget()),
provider.classForWidget() provider.classForWidget()
); );
if (!webWidgetOptions.contains(option)) { list.add(option);
webWidgetOptions.add(option);
} }
return list.toArray(new WidgetOption[list.size()]);
} }
public Map<Class<? extends Widget>, Class<?>> getFormWidgetOptionsMap() { public Map<Class<? extends Widget>, Class<?>> getFormWidgetOptionsMap() {
if (formWidgetOptionsMap == null) { Set<FormWidgetOptionProvider> set = getArray(FormWidgetOptionProvider.XML_TAG);
return new HashMap<Class<? extends Widget>, Class<?>>(); Map<Class<? extends Widget>, Class<?>> map = new HashMap<>();
} else { for (FormWidgetOptionProvider provider : set) {
return formWidgetOptionsMap; map.put(provider.classForWidget(), provider.appearanceForWidget());
} }
return map;
} }
public WidgetOption[] getFormWidgetOptions() { public WidgetOption[] getFormWidgetOptions() {
if (formWidgetOptions == null) { return getFormUnits(false);
return new WidgetOption[0];
} else {
return formWidgetOptions.toArray(new WidgetOption[formWidgetOptions.size()]);
}
}
public WidgetOption[] getWebWidgetOptions() {
if (webWidgetOptions == null) {
return new WidgetOption[0];
} else {
return webWidgetOptions.toArray(new WidgetOption[webWidgetOptions.size()]);
}
} }
public WidgetOption[] getFormWidgetContainerOptions() { public WidgetOption[] getFormWidgetContainerOptions() {
if (formWidgetContainerOptions == null) { return getFormUnits(true);
return new WidgetOption[0];
} else {
return formWidgetContainerOptions.toArray(new WidgetOption[formWidgetContainerOptions.size()]);
}
} }
/** private WidgetOption[] getFormUnits(boolean isContainer) {
* 添加 formWidgetContainerOptions Set<FormWidgetOptionProvider> set = getArray(FormWidgetOptionProvider.XML_TAG);
*/ if (set.isEmpty()) {
public void addFormWidgetOption(Level level, PluginSimplify simplify) throws Exception { return new WidgetOption[0];
if (formWidgetOptions == null) {
formWidgetOptions = new ArrayList<WidgetOption>();
}
if (formWidgetContainerOptions == null) {
formWidgetContainerOptions = new ArrayList<WidgetOption>();
}
if (formWidgetOptionsMap == null) {
formWidgetOptionsMap = new HashMap<Class<? extends Widget>, Class<?>>();
} }
validAPILevel(level, FormWidgetOptionProvider.CURRENT_LEVEL, simplify.getPluginName()); Set<WidgetOption> result = new HashSet<>();
for (FormWidgetOptionProvider provider : set) {
FormWidgetOptionProvider provider = (FormWidgetOptionProvider) level; if (provider.isContainer() == isContainer) {
WidgetOption option = WidgetOptionFactory.createByWidgetClass( WidgetOption option = WidgetOptionFactory.createByWidgetClass(
provider.nameForWidget(), provider.nameForWidget(),
BaseUtils.readIcon(provider.iconPathForWidget()), BaseUtils.readIcon(provider.iconPathForWidget()),
provider.classForWidget() provider.classForWidget()
); );
formWidgetOptionsMap.put(provider.classForWidget(), provider.appearanceForWidget()); result.add(option);
if (provider.isContainer()) {
formWidgetContainerOptions.add(option);
} else {
formWidgetOptions.add(option);
}
} }
public Map<Class<? extends Widget>, Appearance> getCellWidgetOptionsMap() {
if (cellWidgetOptionMap == null) {
return new HashMap<Class<? extends Widget>, Appearance>();
} else {
return cellWidgetOptionMap;
} }
return result.toArray(new WidgetOption[result.size()]);
} }
public WidgetOption[] getCellWidgetOptions() { public WidgetOption[] getCellWidgetOptions() {
if (cellWidgetOptions == null) { Set<CellWidgetOptionProvider> set = getArray(CellWidgetOptionProvider.XML_TAG);
if (set.isEmpty()) {
return new WidgetOption[0]; return new WidgetOption[0];
} else {
return cellWidgetOptions.toArray(new WidgetOption[cellWidgetOptions.size()]);
} }
} Set<WidgetOption> result = new HashSet<>();
for (CellWidgetOptionProvider provider : set) {
/**
* 添加cellWidgetOptionMap
*/
public void addCellWidgetOption(Level level, PluginSimplify simplify) throws Exception {
if (cellWidgetOptions == null) {
cellWidgetOptions = new ArrayList<WidgetOption>();
}
if (cellWidgetOptionMap == null) {
cellWidgetOptionMap = new HashMap<Class<? extends Widget>, Appearance>();
}
validAPILevel(level, CellWidgetOptionProvider.CURRENT_LEVEL, simplify.getPluginName());
CellWidgetOptionProvider provider = (CellWidgetOptionProvider) level;
WidgetOption option = WidgetOptionFactory.createByWidgetClass( WidgetOption option = WidgetOptionFactory.createByWidgetClass(
provider.nameForWidget(), provider.nameForWidget(),
BaseUtils.readIcon(provider.iconPathForWidget()), IOUtils.readIcon(provider.iconPathForWidget()),
provider.classForWidget() provider.classForWidget()
); );
if (cellWidgetOptions.contains(option)) { result.add(option);
return;
}
cellWidgetOptionMap.put(provider.classForWidget(), new Appearance(provider.appearanceForWidget(), Appearance.P_MARK + cellWidgetOptionMap.size()));
cellWidgetOptions.add(option);
}
/**
* 添加 connectionCreators
*
* @param className 类名
*/
public void addConnection(String className, PluginSimplify simplify) {
if (StringUtils.isNotBlank(className)) {
try {
Class clazz = Class.forName(className);
if (connectionCreators == null) {
connectionCreators = new ArrayList<NameObjectCreator>();
}
ConnectionProvider provider = (ConnectionProvider) clazz.newInstance();
validAPILevel(provider, ConnectionProvider.CURRENT_LEVEL, simplify.getPluginName());
NameObjectCreator creator = new NameObjectCreator(
provider.nameForConnection(),
provider.iconPathForConnection(),
provider.classForConnection(),
provider.appearanceForConnection()
);
if (!connectionCreators.contains(creator)) {
connectionCreators.add(creator);
}
} catch (Exception e) {
PluginMessage.remindUpdate(className + e.getMessage());
}
}
} }
return result.toArray(new WidgetOption[result.size()]);
public NameObjectCreator[] getConnections() {
if (connectionCreators == null) {
return new NameObjectCreator[0];
} else {
return connectionCreators.toArray(new NameObjectCreator[connectionCreators.size()]);
}
}
public PreviewProvider[] getPreviewProviders() {
if (previewProviders == null) {
return new PreviewProvider[0];
}
return previewProviders.toArray(new PreviewProvider[previewProviders.size()]);
}
/**
* 添加previewProviders
*/
public void addPreviewProvider(Level level, PluginSimplify simplify) throws Exception {
if (previewProviders == null) {
previewProviders = new HashSet<PreviewProvider>();
}
validAPILevel(level, PreviewProvider.CURRENT_LEVEL, simplify.getPluginName());
PreviewProvider provider = (PreviewProvider) level;
if (!previewProviders.contains(provider)) {
previewProviders.add(provider);
}
}
public HighlightProvider[] getHighlightProviders() {
if (highlightProviders == null) {
return new HighlightProvider[0];
}
return highlightProviders.toArray(new HighlightProvider[highlightProviders.size()]);
}
/**
* 添加 highlightProviders
*/
public void addTemplateTreeShortCutProvider(Level level, PluginSimplify simplify) throws Exception {
if (templateTreeShortCutProviders == null) {
templateTreeShortCutProviders = new HashSet<ShortCut>();
}
validAPILevel(level, ShortCut.CURRENT_LEVEL, simplify.getPluginName());
ShortCut provider = (ShortCut) level;
templateTreeShortCutProviders.add(provider);
} }
public ShortCut[] getTemplateTreeShortCutProviders() { public Map<Class<? extends Widget>, Appearance> getCellWidgetOptionsMap() {
if (templateTreeShortCutProviders == null) { Set<CellWidgetOptionProvider> set = getArray(CellWidgetOptionProvider.XML_TAG);
return new ShortCut[0]; Map<Class<? extends Widget>, Appearance> map = new HashMap<>();
for (CellWidgetOptionProvider provider : set) {
map.put(provider.classForWidget(), new Appearance(provider.appearanceForWidget(), Appearance.P_MARK + map.size()));
} }
return templateTreeShortCutProviders.toArray(new ShortCut[templateTreeShortCutProviders.size()]); return map;
} }
/**
* 添加 highlightProviders
*/
public void addConditionProvider(Level level, PluginSimplify simplify) throws Exception {
if (highlightProviders == null) {
highlightProviders = new HashSet<HighlightProvider>();
}
validAPILevel(level, HighlightProvider.CURRENT_LEVEL, simplify.getPluginName());
HighlightProvider provider = (HighlightProvider) level;
highlightProviders.add(provider);
}
public Feedback getFeedback() { public Feedback getFeedback() {
try { try {
@ -619,208 +219,6 @@ public class ExtraDesignClassManager extends XMLFileManager implements ExtraDesi
return Feedback.EMPTY; return Feedback.EMPTY;
} }
public MenuHandler[] getMenuHandlers(String category) {
if (menuHandlers == null) {
return new MenuHandler[0];
}
List<MenuHandler> handlers = new ArrayList<MenuHandler>();
for (MenuHandler handler : menuHandlers) {
if (ComparatorUtils.equals(category, handler.category())) {
handlers.add(handler);
}
}
return handlers.toArray(new MenuHandler[handlers.size()]);
}
/**
* 添加menuHandlers
*/
public void addMenuHandler(Level level, PluginSimplify simplify) throws Exception {
if (menuHandlers == null) {
menuHandlers = new ArrayList<MenuHandler>();
}
validAPILevel(level, MenuHandler.CURRENT_LEVEL, simplify.getPluginName());
MenuHandler handler = (MenuHandler) level;
if (!menuHandlers.contains(handler)) {
menuHandlers.add(handler);
}
}
public UIFormulaProcessor getUIFormulaProcessor() {
return uiFormulaProcessor;
}
public void setUIFormulaProcessor(Level level, PluginSimplify simplify) throws Exception {
validAPILevel(level, UIFormulaProcessor.CURRENT_LEVEL, simplify.getPluginName());
uiFormulaProcessor = (UIFormulaProcessor) level;
}
public PresentKindProvider[] getPresentKindProviders() {
if (presentKindProviders == null) {
return new PresentKindProvider[0];
}
return presentKindProviders.toArray(new PresentKindProvider[presentKindProviders.size()]);
}
/**
* 添加presentKindProviders
*/
public void addPresentKindProvider(Level level, PluginSimplify simplify) throws Exception {
if (presentKindProviders == null) {
presentKindProviders = new ArrayList<PresentKindProvider>();
}
validAPILevel(level, PresentKindProvider.CURRENT_LEVEL, simplify.getPluginName());
PresentKindProvider provider = (PresentKindProvider) level;
presentKindProviders.add(provider);
}
public ExportToolBarProvider[] getExportToolBarProviders() {
if (exportToolBarProviders == null) {
return new ExportToolBarProvider[0];
}
return exportToolBarProviders.toArray(new ExportToolBarProvider[exportToolBarProviders.size()]);
}
/**
* 添加exportToolBarProviders
*/
public void addExportToolBarProvider(Level level, PluginSimplify simplify) throws Exception {
if (exportToolBarProviders == null) {
exportToolBarProviders = new ArrayList<ExportToolBarProvider>();
}
validAPILevel(level, ExportToolBarProvider.CURRENT_LEVEL, simplify.getPluginName());
ExportToolBarProvider provider = (ExportToolBarProvider) level;
if (!exportToolBarProviders.contains(provider)) {
exportToolBarProviders.add(provider);
}
}
public TitlePlaceProcessor getTitlePlaceProcessor() {
return titlePlaceProcessor;
}
public void setTitlePlaceProcessor(Level level, PluginSimplify simplify) throws Exception {
validAPILevel(level, TitlePlaceProcessor.CURRENT_LEVEL, simplify.getPluginName());
titlePlaceProcessor = (TitlePlaceProcessor) level;
}
public FormElementCaseEditorProcessor getPropertyTableEditor() {
return formElementCaseEditorProcessor;
}
public void setPropertyTableEditor(Level level, PluginSimplify simplify) throws Exception {
validAPILevel(level, FormElementCaseEditorProcessor.CURRENT_LEVEL, simplify.getPluginName());
formElementCaseEditorProcessor = (FormElementCaseEditorProcessor) level;
}
public IndentationUnitProcessor getIndentationUnitEditor() {
return indentationUnitProcessor;
}
public void setIndentationUnitEditor(Level level, PluginSimplify simplify) throws Exception {
validAPILevel(level, IndentationUnitProcessor.CURRENT_LEVEL, simplify.getPluginName());
indentationUnitProcessor = (IndentationUnitProcessor) level;
}
public CellAttributeProvider getCelllAttributeProvider() {
return cellAttributeProvider;
}
public void setCellAttributeProvider(Level level, PluginSimplify simplify) throws Exception {
validAPILevel(level, CellAttributeProvider.CURRENT_LEVEL, simplify.getPluginName());
cellAttributeProvider = (CellAttributeProvider) level;
}
public ElementUIProvider[] getElementUIProviders() {
if (elementUIProviders == null) {
return new ElementUIProvider[0];
}
return elementUIProviders.toArray(new ElementUIProvider[elementUIProviders.size()]);
}
public void addElementUIProvider(Level level, PluginSimplify simplify) throws Exception {
if (elementUIProviders == null) {
elementUIProviders = new HashSet<ElementUIProvider>();
}
validAPILevel(level, ElementUIProvider.CURRENT_LEVEL, simplify.getPluginName());
elementUIProviders.add((ElementUIProvider) level);
}
public WidgetPropertyUIProvider[] getWidgetAttrProviders() {
if (widgetAttrProviders == null) {
return new WidgetPropertyUIProvider[0];
}
return widgetAttrProviders.toArray(new WidgetPropertyUIProvider[widgetAttrProviders.size()]);
}
public void addWidgetAttrProvider(Level level, PluginSimplify simplify) throws Exception {
if (widgetAttrProviders == null) {
widgetAttrProviders = new HashSet<WidgetPropertyUIProvider>();
}
validAPILevel(level, WidgetPropertyUIProvider.CURRENT_LEVEL, simplify.getPluginName());
widgetAttrProviders.add((WidgetPropertyUIProvider) level);
}
public ExportAttrTabProvider[] getExportAttrTabProviders() {
if (exportAttrTabProviders == null) {
return new ExportAttrTabProvider[0];
}
return exportAttrTabProviders.toArray(new ExportAttrTabProvider[exportAttrTabProviders.size()]);
}
public void addExportAttrTabProvider(Level level, PluginSimplify simplify) throws Exception {
if (exportAttrTabProviders == null) {
exportAttrTabProviders = new HashSet<ExportAttrTabProvider>();
}
validAPILevel(level, ExportAttrTabProvider.CURRENT_LEVEL, simplify.getPluginName());
exportAttrTabProviders.add((ExportAttrTabProvider) level);
}
public BackgroundQuickUIProvider[] getBackgroundQuickUIProviders() {
if (backgroundQuickUIProviders == null) {
return new BackgroundQuickUIProvider[0];
}
return backgroundQuickUIProviders.toArray(new BackgroundQuickUIProvider[backgroundQuickUIProviders.size()]);
}
public void addBackgroundQuickUIProvider(Level level, PluginSimplify simplify) throws Exception {
if (backgroundQuickUIProviders == null) {
backgroundQuickUIProviders = new HashSet<>();
}
validAPILevel(level, BackgroundQuickUIProvider.CURRENT_LEVEL, simplify.getPluginName());
backgroundQuickUIProviders.add((BackgroundQuickUIProvider) level);
}
public BackgroundUIProvider[] getBackgroundUIProviders() {
if (backgroundUIProviders == null) {
return new BackgroundUIProvider[0];
}
return backgroundUIProviders.toArray(new BackgroundUIProvider[backgroundUIProviders.size()]);
}
public void addBackgroundUIProvider(Level level, PluginSimplify simplify) throws Exception {
if (backgroundUIProviders == null) {
backgroundUIProviders = new HashSet<>();
}
validAPILevel(level, BackgroundUIProvider.CURRENT_LEVEL, simplify.getPluginName());
backgroundUIProviders.add((BackgroundUIProvider) level);
}
public VerifyDefineProvider[] getVerifyDefineProviders() {
if (verifyDefineProviders == null) {
return new VerifyDefineProvider[0];
}
return verifyDefineProviders.toArray(new VerifyDefineProvider[verifyDefineProviders.size()]);
}
private void addVerifyDefineProvider(Level level, PluginSimplify simplify) throws Exception {
if (verifyDefineProviders == null) {
verifyDefineProviders = new HashSet<>();
}
validAPILevel(level, VerifyDefineProvider.CURRENT_LEVEL, simplify.getPluginName());
verifyDefineProviders.add((VerifyDefineProvider) level);
}
/** /**
* 文件名 * 文件名
* *
@ -840,126 +238,6 @@ public class ExtraDesignClassManager extends XMLFileManager implements ExtraDesi
readXML(reader, null, PluginSimplify.NULL); readXML(reader, null, PluginSimplify.NULL);
} }
/**
* 读xml
*
* @param reader xml对象
* @param extraDesignInterfaceList 接口列表
*/
@Override
public void readXML(XMLableReader reader, List<String> extraDesignInterfaceList, PluginSimplify simplify) {
if (reader.isChildNode()) {
String tagName = reader.getTagName();
if (extraDesignInterfaceList != null) {
extraDesignInterfaceList.add(tagName);
}
String className = reader.getAttrAsString("class", "");
if (StringUtils.isEmpty(className)) {
return;
}
readLevelTag(tagName, className, simplify);
}
}
private void readLevelTag(String tagName, String className, PluginSimplify simplify) {
try {
//实现了Level接口的, 可以直接newInstance子类的
Class<?> clazz = loader.loadClass(className);
Authorize authorize = clazz.getAnnotation(Authorize.class);
if (authorize != null) {
PluginLicenseManager.getInstance().registerPaid(authorize, simplify);
}
Level impl = (Level) clazz.newInstance();
//控件
readWidgetRelated(tagName, impl, simplify);
//数据集, 数据连接
readTableDataRelated(tagName, className, simplify);
// 样式相关的
readStyleRelated(tagName, impl, simplify);
if (tagName.equals(ParameterWidgetOptionProvider.XML_TAG)) {
addParameterWidgetOption(impl, simplify);
} else if (tagName.equals(PreviewProvider.MARK_STRING)) {
addPreviewProvider(impl, simplify);
} else if (tagName.equals(HighlightProvider.MARK_STRING)) {
addConditionProvider(impl, simplify);
} else if (tagName.equals(MenuHandler.MARK_STRING)) {
addMenuHandler(impl, simplify);
} else if (tagName.equals(UIFormulaProcessor.MARK_STRING)) {
setUIFormulaProcessor(impl, simplify);
} else if (tagName.equals(PresentKindProvider.MARK_STRING)) {
addPresentKindProvider(impl, simplify);
} else if (tagName.equals(TEMPLATE_TREE_TAG)) {
addTemplateTreeShortCutProvider(impl, simplify);
} else if (tagName.equals(SubmitProvider.MARK_STRING)) {
addSubmitProvider(impl, simplify);
} else if (tagName.equals(GlobalListenerProvider.XML_TAG)) {
addGlobalListenerProvider(impl, simplify);
} else if (tagName.equals(JavaScriptActionProvider.XML_TAG)) {
addJavaScriptActionProvider(impl, simplify);
} else if (tagName.equals(TitlePlaceProcessor.MARK_STRING)) {
setTitlePlaceProcessor(impl, simplify);
} else if (tagName.equals(FormElementCaseEditorProcessor.MARK_STRING)) {
setPropertyTableEditor(impl, simplify);
} else if (tagName.equals(IndentationUnitProcessor.MARK_STRING)) {
setIndentationUnitEditor(impl, simplify);
} else if (tagName.equals(CellAttributeProvider.MARK_STRING)) {
setCellAttributeProvider(impl, simplify);
} else if (tagName.equals(HyperlinkProvider.XML_TAG)) {
addHyperlinkProvider(impl, simplify);
} else if (tagName.equals(App.MARK_STRING)) {
addSupportDesignApps(impl, simplify);
} else if (tagName.equals(DesignerEnvProcessor.XML_TAG)) {
setEnvProcessor(impl, simplify);
} else if (tagName.equals(TableDataPaneProcessor.XML_TAG)) {
setTableDataPaneProcessor(impl, simplify);
} else if (tagName.equals(ElementUIProvider.MARK_STRING)) {
addElementUIProvider(impl, simplify);
} else if (tagName.equals(WidgetPropertyUIProvider.XML_TAG)) {
addWidgetAttrProvider(impl, simplify);
} else if (tagName.equals(ExportAttrTabProvider.XML_TAG)) {
addExportAttrTabProvider(impl, simplify);
} else if (tagName.equals(VerifyDefineProvider.MARK_STRING)) {
addVerifyDefineProvider(impl, simplify);
}
} catch (PluginInvalidLevelException e) {
PluginMessage.remindUpdate(e.getMessage());
} catch (Exception e) {
FRContext.getLogger().error(e.getMessage());
}
}
private void readTableDataRelated(String tagName, String className, PluginSimplify simplify) {
if (tagName.equals(TableDataCreatorProvider.XML_TAG)) {
setTableDataCreatorProvider(className);
} else if (tagName.equals(TableDataDefineProvider.XML_TAG)) {
addTableDataNameObjectCreator(className, simplify);
} else if (tagName.equals(ServerTableDataDefineProvider.XML_TAG)) {
addServerTableDataNameObjectCreator(className, simplify);
} else if (tagName.equals(ConnectionProvider.XML_TAG)) {
addConnection(className, simplify);
}
}
private void readWidgetRelated(String tagName, Level impl, PluginSimplify simplify) throws Exception {
if (tagName.equals(FormWidgetOptionProvider.XML_TAG)) {
addFormWidgetOption(impl, simplify);
} else if (tagName.equals(ToolbarItemProvider.XML_TAG)) {
addWebWidgetOption(impl, simplify);
} else if (tagName.equals(ExportToolBarProvider.XML_TAG)) {
addExportToolBarProvider(impl, simplify);
} else if (tagName.equals(CellWidgetOptionProvider.XML_TAG)) {
addCellWidgetOption(impl, simplify);
}
}
private void readStyleRelated(String tagName, Level impl, PluginSimplify simplify) throws Exception {
if (tagName.equals(BackgroundQuickUIProvider.MARK_STRING)) {
addBackgroundQuickUIProvider(impl, simplify);
} else if (tagName.equals(BackgroundUIProvider.MARK_STRING)) {
addBackgroundUIProvider(impl, simplify);
}
}
/** /**
* 写xml * 写xml

74
designer_base/src/com/fr/design/actions/community/BBSAction.java

@ -0,0 +1,74 @@
package com.fr.design.actions.community;
import java.awt.Desktop;
import java.awt.event.ActionEvent;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import javax.swing.JOptionPane;
import javax.swing.KeyStroke;
import com.fr.base.BaseUtils;
import com.fr.base.FRContext;
import com.fr.design.actions.UpdateAction;
import com.fr.design.menu.MenuKeySet;
import com.fr.general.Inter;
import com.fr.general.SiteCenter;
import com.fr.stable.StringUtils;
public class BBSAction extends UpdateAction
{
public BBSAction()
{
this.setMenuKeySet(BBS);
this.setName(getMenuKeySet().getMenuName());
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/bbs.png"));
}
/**
* 动作
* @param e 事件
*/
@Override
public void actionPerformed(ActionEvent arg0)
{
String url = SiteCenter.getInstance().acquireUrlByKind("bbs");
if (StringUtils.isEmpty(url)) {
FRContext.getLogger().info("The URL is empty!");
return;
}
try {
Desktop.getDesktop().browse(new URI(url));
} catch (IOException exp) {
JOptionPane.showMessageDialog(null, Inter.getLocText("Set_default_browser"));
FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp);
} catch (URISyntaxException exp) {
FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp);
} catch (Exception exp) {
FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp);
FRContext.getLogger().error("Can not open the browser for URL: " + url);
}
}
public static final MenuKeySet BBS = new MenuKeySet() {
@Override
public char getMnemonic() {
return 'B';
}
@Override
public String getMenuName() {
return Inter.getLocText("FR-Designer_COMMUNITY_BBS");
}
@Override
public KeyStroke getKeyStroke() {
return null;
}
};
}

72
designer_base/src/com/fr/design/actions/community/BugAction.java

@ -0,0 +1,72 @@
package com.fr.design.actions.community;
import java.awt.Desktop;
import java.awt.event.ActionEvent;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import javax.swing.JOptionPane;
import javax.swing.KeyStroke;
import com.fr.base.BaseUtils;
import com.fr.base.FRContext;
import com.fr.design.actions.UpdateAction;
import com.fr.design.menu.MenuKeySet;
import com.fr.general.Inter;
import com.fr.general.SiteCenter;
import com.fr.stable.StringUtils;
public class BugAction extends UpdateAction
{
public BugAction()
{ this.setMenuKeySet(BUG);
this.setName(getMenuKeySet().getMenuName());
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/bug.png"));
}
@Override
public void actionPerformed(ActionEvent arg0)
{
String url = SiteCenter.getInstance().acquireUrlByKind("bbs.bugs");
if (StringUtils.isEmpty(url)) {
FRContext.getLogger().info("The URL is empty!");
return;
}
try {
Desktop.getDesktop().browse(new URI(url));
} catch (IOException exp) {
JOptionPane.showMessageDialog(null, Inter.getLocText("Set_default_browser"));
FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp);
} catch (URISyntaxException exp) {
FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp);
} catch (Exception exp) {
FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp);
FRContext.getLogger().error("Can not open the browser for URL: " + url);
}
}
public static final MenuKeySet BUG = new MenuKeySet() {
@Override
public String getMenuName() {
return Inter.getLocText("FR-Designer_COMMUNITY_BUG");
}
@Override
public KeyStroke getKeyStroke() {
return null;
}
@Override
public char getMnemonic()
{
return 'U';
}
};
}

70
designer_base/src/com/fr/design/actions/community/NeedAction.java

@ -0,0 +1,70 @@
package com.fr.design.actions.community;
import java.awt.Desktop;
import java.awt.event.ActionEvent;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import javax.swing.JOptionPane;
import javax.swing.KeyStroke;
import com.fr.base.BaseUtils;
import com.fr.base.FRContext;
import com.fr.design.actions.UpdateAction;
import com.fr.design.menu.MenuKeySet;
import com.fr.general.Inter;
import com.fr.general.SiteCenter;
import com.fr.stable.StringUtils;
public class NeedAction extends UpdateAction
{
public NeedAction()
{
this.setMenuKeySet(NEED);
this.setName(getMenuKeySet().getMenuName());
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/need.png"));
}
@Override
public void actionPerformed(ActionEvent arg0)
{
String url = SiteCenter.getInstance().acquireUrlByKind("bbs.needs");
if (StringUtils.isEmpty(url)) {
FRContext.getLogger().info("The URL is empty!");
return;
}
try {
Desktop.getDesktop().browse(new URI(url));
} catch (IOException exp) {
JOptionPane.showMessageDialog(null, Inter.getLocText("Set_default_browser"));
FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp);
} catch (URISyntaxException exp) {
FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp);
} catch (Exception exp) {
FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp);
FRContext.getLogger().error("Can not open the browser for URL: " + url);
}
}
public static final MenuKeySet NEED = new MenuKeySet() {
@Override
public char getMnemonic() {
return 'N';
}
@Override
public String getMenuName() {
return Inter.getLocText("FR-Designer_COMMUNITY_NEED");
}
@Override
public KeyStroke getKeyStroke() {
return null;
}
};
}

69
designer_base/src/com/fr/design/actions/community/QuestionAction.java

@ -0,0 +1,69 @@
package com.fr.design.actions.community;
import java.awt.Desktop;
import java.awt.event.ActionEvent;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import javax.swing.JOptionPane;
import javax.swing.KeyStroke;
import com.fr.base.BaseUtils;
import com.fr.base.FRContext;
import com.fr.design.actions.UpdateAction;
import com.fr.design.menu.MenuKeySet;
import com.fr.general.Inter;
import com.fr.general.SiteCenter;
import com.fr.stable.StringUtils;
public class QuestionAction extends UpdateAction
{
public QuestionAction()
{ this.setMenuKeySet(QUESTIONS);
this.setName(getMenuKeySet().getMenuName());
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/questions.png"));
}
@Override
public void actionPerformed(ActionEvent arg0)
{
String url = SiteCenter.getInstance().acquireUrlByKind("bbs.questions");
if (StringUtils.isEmpty(url)) {
FRContext.getLogger().info("The URL is empty!");
return;
}
try {
Desktop.getDesktop().browse(new URI(url));
} catch (IOException exp) {
JOptionPane.showMessageDialog(null, Inter.getLocText("Set_default_browser"));
FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp);
} catch (URISyntaxException exp) {
FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp);
} catch (Exception exp) {
FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp);
FRContext.getLogger().error("Can not open the browser for URL: " + url);
}
}
public static final MenuKeySet QUESTIONS = new MenuKeySet() {
@Override
public char getMnemonic() {
return 'Q';
}
@Override
public String getMenuName() {
return Inter.getLocText("FR-Designer_COMMUNITY_QUESTIONS");
}
@Override
public KeyStroke getKeyStroke() {
return null;
}
};
}

70
designer_base/src/com/fr/design/actions/community/SignAction.java

@ -0,0 +1,70 @@
package com.fr.design.actions.community;
import java.awt.Desktop;
import java.awt.event.ActionEvent;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import javax.swing.JOptionPane;
import javax.swing.KeyStroke;
import com.fr.base.BaseUtils;
import com.fr.base.FRContext;
import com.fr.design.actions.UpdateAction;
import com.fr.design.menu.MenuKeySet;
import com.fr.general.Inter;
import com.fr.general.SiteCenter;
import com.fr.stable.StringUtils;
public class SignAction extends UpdateAction
{
public SignAction()
{
this.setMenuKeySet(SIGN);
this.setName(getMenuKeySet().getMenuName());
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/signature.png"));
}
@Override
public void actionPerformed(ActionEvent arg0)
{
String url = SiteCenter.getInstance().acquireUrlByKind("bbs.aut");
if (StringUtils.isEmpty(url)) {
FRContext.getLogger().info("The URL is empty!");
return;
}
try {
Desktop.getDesktop().browse(new URI(url));
} catch (IOException exp) {
JOptionPane.showMessageDialog(null, Inter.getLocText("Set_default_browser"));
FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp);
} catch (URISyntaxException exp) {
FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp);
} catch (Exception exp) {
FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp);
FRContext.getLogger().error("Can not open the browser for URL: " + url);
}
}
public static final MenuKeySet SIGN = new MenuKeySet() {
@Override
public char getMnemonic() {
return 'S';
}
@Override
public String getMenuName() {
return Inter.getLocText("FR-Designer_COMMUNITY_SIGN");
}
@Override
public KeyStroke getKeyStroke() {
return null;
}
};
}

70
designer_base/src/com/fr/design/actions/community/UpAction.java

@ -0,0 +1,70 @@
package com.fr.design.actions.community;
import java.awt.Desktop;
import java.awt.event.ActionEvent;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import javax.swing.JOptionPane;
import javax.swing.KeyStroke;
import com.fr.base.BaseUtils;
import com.fr.base.FRContext;
import com.fr.design.actions.UpdateAction;
import com.fr.design.menu.MenuKeySet;
import com.fr.general.Inter;
import com.fr.general.SiteCenter;
import com.fr.stable.StringUtils;
public class UpAction extends UpdateAction
{
public UpAction()
{
this.setMenuKeySet(UPDATE);
this.setName(getMenuKeySet().getMenuName());
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/update.png"));
}
@Override
public void actionPerformed(ActionEvent arg0)
{
String url = SiteCenter.getInstance().acquireUrlByKind("bbs.update");
if (StringUtils.isEmpty(url)) {
FRContext.getLogger().info("The URL is empty!");
return;
}
try {
Desktop.getDesktop().browse(new URI(url));
} catch (IOException exp) {
JOptionPane.showMessageDialog(null, Inter.getLocText("Set_default_browser"));
FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp);
} catch (URISyntaxException exp) {
FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp);
} catch (Exception exp) {
FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp);
FRContext.getLogger().error("Can not open the browser for URL: " + url);
}
}
public static final MenuKeySet UPDATE = new MenuKeySet() {
@Override
public char getMnemonic() {
return 'U';
}
@Override
public String getMenuName() {
return Inter.getLocText("FR-Designer_COMMUNITY_UPDATE");
}
@Override
public KeyStroke getKeyStroke() {
return null;
}
};
}

70
designer_base/src/com/fr/design/actions/community/VideoAction.java

@ -0,0 +1,70 @@
package com.fr.design.actions.community;
import java.awt.Desktop;
import java.awt.event.ActionEvent;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import javax.swing.JOptionPane;
import javax.swing.KeyStroke;
import com.fr.base.BaseUtils;
import com.fr.base.FRContext;
import com.fr.design.actions.UpdateAction;
import com.fr.design.menu.MenuKeySet;
import com.fr.general.Inter;
import com.fr.general.SiteCenter;
import com.fr.stable.StringUtils;
public class VideoAction extends UpdateAction
{
public VideoAction()
{
this.setMenuKeySet(VIDEO);
this.setName(getMenuKeySet().getMenuName());
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/video.png"));
}
@Override
public void actionPerformed(ActionEvent arg0)
{
String url = SiteCenter.getInstance().acquireUrlByKind("bbs.video");
if (StringUtils.isEmpty(url)) {
FRContext.getLogger().info("The URL is empty!");
return;
}
try {
Desktop.getDesktop().browse(new URI(url));
} catch (IOException exp) {
JOptionPane.showMessageDialog(null, Inter.getLocText("Set_default_browser"));
FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp);
} catch (URISyntaxException exp) {
FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp);
} catch (Exception exp) {
FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp);
FRContext.getLogger().error("Can not open the browser for URL: " + url);
}
}
public static final MenuKeySet VIDEO = new MenuKeySet() {
@Override
public char getMnemonic() {
return 'V';
}
@Override
public String getMenuName() {
return Inter.getLocText("FR-Designer_COMMUNITY_VIDEO");
}
@Override
public KeyStroke getKeyStroke() {
return null;
}
};
}

9
designer_base/src/com/fr/design/actions/help/TutorialAction.java

@ -17,6 +17,7 @@ import com.fr.design.actions.UpdateAction;
import com.fr.design.menu.MenuKeySet; import com.fr.design.menu.MenuKeySet;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.general.SiteCenter;
import com.fr.general.http.HttpClient; import com.fr.general.http.HttpClient;
import com.fr.stable.OperatingSystem; import com.fr.stable.OperatingSystem;
import com.fr.stable.ProductConstants; import com.fr.stable.ProductConstants;
@ -28,7 +29,7 @@ public class TutorialAction extends UpdateAction {
this.setMenuKeySet(HELP_TUTORIAL); this.setMenuKeySet(HELP_TUTORIAL);
this.setName(getMenuKeySet().getMenuName()); this.setName(getMenuKeySet().getMenuName());
this.setMnemonic(getMenuKeySet().getMnemonic()); this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_help/help.png")); this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/help.png"));
this.setAccelerator(getMenuKeySet().getKeyStroke()); this.setAccelerator(getMenuKeySet().getKeyStroke());
} }
@ -60,10 +61,10 @@ public class TutorialAction extends UpdateAction {
public void actionPerformed(ActionEvent evt) { public void actionPerformed(ActionEvent evt) {
Locale locale = FRContext.getLocale(); Locale locale = FRContext.getLocale();
if (ComparatorUtils.equals(locale, Locale.CHINA) || ComparatorUtils.equals(locale, Locale.TAIWAN)){ if (ComparatorUtils.equals(locale, Locale.CHINA) || ComparatorUtils.equals(locale, Locale.TAIWAN)){
HttpClient client = new HttpClient(ProductConstants.HELP_URL); HttpClient client = new HttpClient(SiteCenter.getInstance().acquireUrlByKind("help"));
if(client.getResponseCode() != -1) { if(client.getResponseCode() != -1) {
try { try {
Desktop.getDesktop().browse(new URI(ProductConstants.HELP_URL)); Desktop.getDesktop().browse(new URI(SiteCenter.getInstance().acquireUrlByKind("help")));
return; return;
} catch (Exception e) { } catch (Exception e) {
//出了异常的话, 依然打开本地教程 //出了异常的话, 依然打开本地教程
@ -86,7 +87,7 @@ public class TutorialAction extends UpdateAction {
@Override @Override
public String getMenuName() { public String getMenuName() {
return Inter.getLocText("M_Help-Tutorial"); return Inter.getLocText("FR-Designer_COMMUNITY_HELP");
} }
@Override @Override

2
designer_base/src/com/fr/design/condition/LiteConditionPane.java

@ -517,6 +517,8 @@ public abstract class LiteConditionPane<T extends Condition> extends BasicBeanPa
// formulaPane // formulaPane
JPanel formulaPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel formulaPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
// 95106 公式区域限定宽高, 显示两行即可, 在新窗口编辑.
formulaPane.setPreferredSize(new Dimension(450, 40));
formulaConditionPane.add(formulaPane, BorderLayout.CENTER); formulaConditionPane.add(formulaPane, BorderLayout.CENTER);
formulaPane.setBorder(BorderFactory.createEmptyBorder(2, 0, 2, 2)); formulaPane.setBorder(BorderFactory.createEmptyBorder(2, 0, 2, 2));
formulaPane.add(GUICoreUtils.createBorderPane(new UILabel(Inter.getLocText("FR-Designer_LiteCondition_Formula") + "="), BorderLayout.NORTH), BorderLayout.WEST); formulaPane.add(GUICoreUtils.createBorderPane(new UILabel(Inter.getLocText("FR-Designer_LiteCondition_Formula") + "="), BorderLayout.NORTH), BorderLayout.WEST);

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}; 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()); 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) { public synchronized static BasicTableDataTreePane getInstance(DesignModelAdapter<?, ?> tc) {
TableDataPaneProcessor treePaneProcessor = ExtraDesignClassManager.getInstance().getTableDataPaneProcessor(); TableDataPaneProcessor treePaneProcessor = ExtraDesignClassManager.getInstance().getSingle(TableDataPaneProcessor.XML_TAG);
if (treePaneProcessor != null) { if (treePaneProcessor != null) {
return treePaneProcessor.createTableDataTreePane(tc); return treePaneProcessor.createTableDataTreePane(tc);
} }

16
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.JDBCDatabaseConnection;
import com.fr.data.impl.JNDIDatabaseConnection; import com.fr.data.impl.JNDIDatabaseConnection;
import com.fr.design.ExtraDesignClassManager; import com.fr.design.ExtraDesignClassManager;
import com.fr.design.fun.ConnectionProvider;
import com.fr.design.gui.controlpane.JListControlPane; import com.fr.design.gui.controlpane.JListControlPane;
import com.fr.design.gui.controlpane.NameObjectCreator; import com.fr.design.gui.controlpane.NameObjectCreator;
import com.fr.design.gui.controlpane.NameableCreator; import com.fr.design.gui.controlpane.NameableCreator;
@ -107,9 +108,18 @@ public class ConnectionListPane extends JListControlPane {
JNDIDatabaseConnection.class, JNDIDatabaseConnection.class,
DatabaseConnectionPane.JNDI.class DatabaseConnectionPane.JNDI.class
)}; )};
NameObjectCreator[] pluginCreators = ExtraDesignClassManager.getInstance().getConnections(); Set<ConnectionProvider> pluginCreators = ExtraDesignClassManager.getInstance().getArray(ConnectionProvider.XML_TAG);
for (ConnectionProvider provider : pluginCreators) {
return (NameableCreator[]) ArrayUtils.addAll(creators, pluginCreators); NameObjectCreator creator = new NameObjectCreator(
provider.nameForConnection(),
provider.iconPathForConnection(),
provider.classForConnection(),
provider.appearanceForConnection()
);
creators = ArrayUtils.add(creators, creator);
}
return creators;
} }
@Override @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(); this.tableDataTextField = new UITextField();
tableDataPathPane.add(tableDataTextField, BorderLayout.CENTER); tableDataPathPane.add(tableDataTextField, BorderLayout.CENTER);
this.tableDataTextField.setEditable(false); this.tableDataTextField.setEditable(false);
TableDataPaneProcessor paneProcessor = ExtraDesignClassManager.getInstance().getTableDataPaneProcessor(); TableDataPaneProcessor paneProcessor = ExtraDesignClassManager.getInstance().getSingle(TableDataPaneProcessor.XML_TAG);
TableDataPaneController pane = null; TableDataPaneController pane = null;
if (paneProcessor != null) { if (paneProcessor != null) {
pane = paneProcessor.createServerTableDataPane(DesignModelAdapter.getCurrentModelAdapter() 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) { 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()); TableDataNameObjectCreator tableDataNameObjectCreator = map.get(tabledata.getClass().getName());
if (tableDataNameObjectCreator == null) { if (tableDataNameObjectCreator == null) {
tableDataNameObjectCreator = map.get(tabledata.getClass().getSuperclass().getName()); tableDataNameObjectCreator = map.get(tabledata.getClass().getSuperclass().getName());

1
designer_base/src/com/fr/design/dialog/BasicScrollPane.java

@ -180,6 +180,7 @@ public abstract class BasicScrollPane<T> extends BasicBeanPane<T>{
} }
leftcontentPane.validate(); leftcontentPane.validate();
} }
} }
protected boolean isShowScrollBar() { protected boolean isShowScrollBar() {

1
designer_base/src/com/fr/design/editor/editor/ColumnSelectedEditor.java

@ -13,7 +13,6 @@ import com.fr.stable.StringUtils;
import java.awt.*; import java.awt.*;
import java.awt.event.ItemEvent; import java.awt.event.ItemEvent;
import java.awt.event.ItemListener; import java.awt.event.ItemListener;
import java.util.*;
import java.util.List; import java.util.List;
import java.util.regex.Pattern; import java.util.regex.Pattern;

2
designer_base/src/com/fr/design/extra/PluginWebBridge.java

@ -36,8 +36,6 @@ public class PluginWebBridge {
private UIDialog uiDialog; private UIDialog uiDialog;
public static final String PLUGIN_SHOP = SiteCenter.getInstance().acquireUrlByKind("plugin.plist");
public static PluginWebBridge getHelper() { public static PluginWebBridge getHelper() {
if (helper != null) { if (helper != null) {
return helper; return helper;

4
designer_base/src/com/fr/design/extra/exe/GetPluginFromStoreExecutor.java

@ -1,8 +1,8 @@
package com.fr.design.extra.exe; package com.fr.design.extra.exe;
import com.fr.design.extra.PluginWebBridge;
import com.fr.design.extra.Process; import com.fr.design.extra.Process;
import com.fr.general.FRLogger; import com.fr.general.FRLogger;
import com.fr.general.SiteCenter;
import com.fr.general.http.HttpClient; import com.fr.general.http.HttpClient;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
@ -38,7 +38,7 @@ public class GetPluginFromStoreExecutor implements Executor {
@Override @Override
public void run(Process<String> process) { public void run(Process<String> process) {
StringBuilder url = new StringBuilder(PluginWebBridge.PLUGIN_SHOP); StringBuilder url = new StringBuilder(SiteCenter.getInstance().acquireUrlByKind("plugin.plist"));
if (StringUtils.isNotBlank(category)) { if (StringUtils.isNotBlank(category)) {
url.append("&cid=").append(category.split("-")[1]); url.append("&cid=").append(category.split("-")[1]);
} }

15
designer_base/src/com/fr/design/extra/exe/ReadUpdateOnlineExecutor.java

@ -3,8 +3,11 @@ package com.fr.design.extra.exe;
import com.fr.design.extra.PluginsReaderFromStore; import com.fr.design.extra.PluginsReaderFromStore;
import com.fr.design.extra.Process; import com.fr.design.extra.Process;
import com.fr.general.FRLogger; import com.fr.general.FRLogger;
import com.fr.plugin.Plugin; import com.fr.plugin.Plugin;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import org.json.JSONArray;
import org.json.JSONObject;
/** /**
* Created by vito on 16/4/19. * Created by vito on 16/4/19.
@ -31,15 +34,13 @@ public class ReadUpdateOnlineExecutor implements Executor {
public void run(Process<String> process) { public void run(Process<String> process) {
try { try {
plugins = PluginsReaderFromStore.readPluginsForUpdate(); plugins = PluginsReaderFromStore.readPluginsForUpdate();
StringBuilder sb = new StringBuilder(); JSONArray jsonArray = new JSONArray();
if (plugins != null) {
sb.append("[");
for (Plugin plugin : plugins) { for (Plugin plugin : plugins) {
sb.append("{pluginid:'").append(plugin.getId()).append("'}"); JSONObject jsonObject = new JSONObject();
} jsonObject.put("pluginid", plugin.getId());
sb.append("]"); jsonArray.put(jsonObject);
} }
result = sb.toString(); result = jsonArray.toString();
} catch (Exception e) { } catch (Exception e) {
FRLogger.getLogger().error(e.getMessage()); FRLogger.getLogger().error(e.getMessage());
} }

4
designer_base/src/com/fr/design/extra/exe/SearchOnlineExecutor.java

@ -1,8 +1,8 @@
package com.fr.design.extra.exe; package com.fr.design.extra.exe;
import com.fr.design.extra.PluginWebBridge;
import com.fr.design.extra.Process; import com.fr.design.extra.Process;
import com.fr.general.FRLogger; import com.fr.general.FRLogger;
import com.fr.general.SiteCenter;
import com.fr.general.http.HttpClient; import com.fr.general.http.HttpClient;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
@ -34,7 +34,7 @@ public class SearchOnlineExecutor implements Executor {
@Override @Override
public void run(Process<String> process) { public void run(Process<String> process) {
try { try {
HttpClient httpClient = new HttpClient(PluginWebBridge.PLUGIN_SHOP + "&keyword=" + keyword); HttpClient httpClient = new HttpClient(SiteCenter.getInstance().acquireUrlByKind("plugin.plist") + "&keyword=" + keyword);
result = httpClient.getResponseText(); result = httpClient.getResponseText();
} catch (Exception e) { } catch (Exception e) {

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

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

1
designer_base/src/com/fr/design/formula/FormulaPane.java

@ -166,6 +166,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{
checkValidButton.addActionListener(checkValidActionListener); checkValidButton.addActionListener(checkValidActionListener);
JPanel checkBoxPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); JPanel checkBoxPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
checkBoxPane.setPreferredSize(new Dimension(450, 30));
checkBoxandbuttonPane.add(checkBoxPane, BorderLayout.WEST); checkBoxandbuttonPane.add(checkBoxPane, BorderLayout.WEST);
checkBoxandbuttonPane.add(checkValidButton, BorderLayout.EAST); checkBoxandbuttonPane.add(checkValidButton, BorderLayout.EAST);

4
designer_base/src/com/fr/design/formula/FormulaPaneWhenReserveFormula.java

@ -25,7 +25,7 @@ public class FormulaPaneWhenReserveFormula extends FormulaPane {
@Override @Override
protected void extendCheckBoxPane(JPanel checkBoxPane) { protected void extendCheckBoxPane(JPanel checkBoxPane) {
// peter:添加公式是否兼容Excel的属性 // peter:添加公式是否兼容Excel的属性
reserveCheckBox4Result = new UICheckBox(Inter.getLocText("FormulaD-Reserve_when_export-edit_result")); reserveCheckBox4Result = new UICheckBox(Inter.getLocText("FR-Designer_Export-Save-Formula"));
reserveCheckBox4Result.setSelected(false); reserveCheckBox4Result.setSelected(false);
reserveCheckBox4Result.addChangeListener(new ChangeListener() { reserveCheckBox4Result.addChangeListener(new ChangeListener() {
@ -38,7 +38,7 @@ public class FormulaPaneWhenReserveFormula extends FormulaPane {
} }
} }
}); });
reserveCheckBox4Write = new UICheckBox(Inter.getLocText("FormulaD-Reserve_when_bs-write_or_analy")); reserveCheckBox4Write = new UICheckBox(Inter.getLocText("FR-Designer_Write-Save-Formula"));
reserveCheckBox4Write.setSelected(false); reserveCheckBox4Write.setSelected(false);
checkBoxPane.add(reserveCheckBox4Result, BorderLayout.CENTER); checkBoxPane.add(reserveCheckBox4Result, BorderLayout.CENTER);

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.design.mainframe.backgroundpane.BackgroundQuickPane;
import com.fr.stable.fun.Level; import com.fr.stable.fun.Level;
import com.fr.stable.fun.Provider; import com.fr.stable.fun.Provider;
import com.fr.stable.fun.mark.Mutable;
/** /**
* Created by richie on 16/5/18. * Created by richie on 16/5/18.
* 背景设置界面接口,用于扩展设置更多类型的背景 * 背景设置界面接口,用于扩展设置更多类型的背景
*/ */
public interface BackgroundQuickUIProvider extends Level, Provider { public interface BackgroundQuickUIProvider extends Mutable {
String MARK_STRING = "BackgroundQuickUIProvider"; 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.design.style.background.BackgroundDetailPane;
import com.fr.general.Background; import com.fr.general.Background;
import com.fr.stable.fun.Level; import com.fr.stable.fun.mark.Mutable;
import com.fr.stable.fun.Provider;
/** /**
* Created by richie on 16/5/18. * Created by richie on 16/5/18.
*/ */
public interface BackgroundUIProvider extends Level, Provider { public interface BackgroundUIProvider extends Mutable {
String MARK_STRING = "BackgroundUIProvider"; String MARK_STRING = "BackgroundUIProvider";

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

@ -1,12 +1,12 @@
package com.fr.design.fun; package com.fr.design.fun;
import com.fr.design.gui.frpane.AbstractAttrNoScrollPane; 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. * Created by zhouping on 2015/11/11.
*/ */
public interface CellAttributeProvider extends Level{ public interface CellAttributeProvider extends Immutable{
String MARK_STRING = "CellAttributeProvider"; String MARK_STRING = "CellAttributeProvider";
int CURRENT_LEVEL = 1; 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 * @since 8.0
* 格子中的自定义控件接口 * 格子中的自定义控件接口
*/ */
public interface CellWidgetOptionProvider extends ParameterWidgetOptionProvider, Level { public interface CellWidgetOptionProvider extends ParameterWidgetOptionProvider {
String XML_TAG = "CellWidgetOptionProvider"; 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.data.impl.Connection;
import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.BasicBeanPane;
import com.fr.stable.fun.Level; import com.fr.stable.fun.mark.Mutable;
/** /**
* @author : richie * @author : richie
* @since : 8.0 * @since : 8.0
*/ */
public interface ConnectionProvider extends Level { public interface ConnectionProvider extends Mutable {
public static final String XML_TAG = "ConnectionProvider"; 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; package com.fr.design.fun;
import com.fr.stable.fun.Level; import com.fr.stable.fun.mark.Immutable;
/** /**
* 在env加载之前, 修改env参数的接口 * 在env加载之前, 修改env参数的接口
@ -9,7 +9,7 @@ import com.fr.stable.fun.Level;
* *
* Created by Administrator on 2016/3/31/0031. * Created by Administrator on 2016/3/31/0031.
*/ */
public interface DesignerEnvProcessor extends Level{ public interface DesignerEnvProcessor extends Immutable{
String XML_TAG = "DesignerEnvProcessor"; String XML_TAG = "DesignerEnvProcessor";
int CURRENT_LEVEL = 1; 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.actions.UpdateAction;
import com.fr.design.selection.QuickEditor; 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. * Created by richie on 16/4/25.
* 单元格元素和悬浮元素扩展,通过实现这个接口,可以在单元格中添加更多类型的元素. * 单元格元素和悬浮元素扩展,通过实现这个接口,可以在单元格中添加更多类型的元素.
*/ */
public interface ElementUIProvider extends Level { public interface ElementUIProvider extends Mutable {
String MARK_STRING = "ElementUIProvider"; String MARK_STRING = "ElementUIProvider";

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

@ -1,23 +1,48 @@
package com.fr.design.fun; package com.fr.design.fun;
import com.fr.design.report.AbstractExportPane; import com.fr.design.report.AbstractExportPane;
import com.fr.stable.fun.Level; import com.fr.stable.fun.mark.Mutable;
import javax.swing.*; import javax.swing.*;
/** /**
* Created by vito on 16/5/5. * Created by vito on 16/5/5.
*/ */
public interface ExportAttrTabProvider extends Level{
/**
* 导出属性Tab页的接口
*/
public interface ExportAttrTabProvider extends Mutable {
String XML_TAG = "ExportAttrTabProvider"; String XML_TAG = "ExportAttrTabProvider";
int CURRENT_LEVEL = 1; int CURRENT_LEVEL = 1;
/**
* 转换成SwingComponent
*
* @return JComponent
*/
JComponent toSwingComponent(); JComponent toSwingComponent();
/**
* 转换成AbstractExportPane
*
* @return AbstractExportPane
*/
AbstractExportPane toExportPane(); AbstractExportPane toExportPane();
/**
* tab的标题
*
* @return
*/
String title(); String title();
/**
* tag标签
*
* @return tag名称
* @deprecated 将来不使用tag作为区分
*/
String tag(); String tag();
} }

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

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

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

@ -1,13 +1,14 @@
package com.fr.design.fun; 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; import java.beans.PropertyDescriptor;
/** /**
* Created by zhouping on 2015/9/10. * Created by zhouping on 2015/9/10.
*/ */
public interface FormElementCaseEditorProcessor extends Level{ public interface FormElementCaseEditorProcessor extends Immutable {
String MARK_STRING = "PropertyEditor"; String MARK_STRING = "PropertyEditor";
@ -17,8 +18,17 @@ public interface FormElementCaseEditorProcessor extends Level{
/** /**
* 生成属性表 * 生成属性表
* @param temp 传入当前操作的class * @param temp 传入当前操作的class
* @param reportFitAttr 传入的自适应属性
* @return 返回属性表 * @return 返回属性表
*/ */
PropertyDescriptor[] createPropertyDescriptor(Class<?> temp); PropertyDescriptor[] createPropertyDescriptor(Class<?> temp, ReportFitAttrProvider reportFitAttr);
/**
* 返回pc自适应属性值
* @param fitAttrProvider 传入的自适应属性
* @return 返回pc自适应属性值
*/
int getFitStateInPC(ReportFitAttrProvider fitAttrProvider);
} }

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

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

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

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

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.ConditionAttrSingleConditionPane;
import com.fr.design.condition.ConditionAttributesPane; import com.fr.design.condition.ConditionAttributesPane;
import com.fr.stable.fun.Level; 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"; 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.design.gui.controlpane.NameableCreator;
import com.fr.stable.fun.Level; import com.fr.stable.fun.Level;
import com.fr.stable.fun.mark.Mutable;
/** /**
* Created by zack on 2016/1/20. * Created by zack on 2016/1/20.
*/ */
public interface HyperlinkProvider extends Level{ public interface HyperlinkProvider extends Mutable {
String XML_TAG = "HyperlinkProvider"; String XML_TAG = "HyperlinkProvider";
int CURRENT_LEVEL = 1; int CURRENT_LEVEL = 1;

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

@ -1,11 +1,11 @@
package com.fr.design.fun; 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. * Created by zhouping on 2015/9/20.
*/ */
public interface IndentationUnitProcessor extends Level{ public interface IndentationUnitProcessor extends Immutable {
String MARK_STRING = "IndentationProcessor"; String MARK_STRING = "IndentationProcessor";
int CURRENT_LEVEL = 1; 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.design.beans.FurtherBasicBeanPane;
import com.fr.js.JavaScript; 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. * Created by zack on 2015/8/14.
*/ */
public interface JavaScriptActionProvider extends Level{ public interface JavaScriptActionProvider extends Mutable{
String XML_TAG = "JavaScriptActionProvider"; 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.mainframe.toolbar.ToolBarMenuDockPlus;
import com.fr.design.menu.ShortCut; import com.fr.design.menu.ShortCut;
import com.fr.stable.fun.Level; import com.fr.stable.fun.mark.Mutable;
/** /**
* @author richie * @author richie
@ -10,7 +10,7 @@ import com.fr.stable.fun.Level;
* @since 8.0 * @since 8.0
* 设计器菜单栏插件接口 * 设计器菜单栏插件接口
*/ */
public interface MenuHandler extends Level { public interface MenuHandler extends Mutable {
String MARK_STRING = "MenuHandler"; String MARK_STRING = "MenuHandler";

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

@ -1,14 +1,14 @@
package com.fr.design.fun; package com.fr.design.fun;
import com.fr.form.ui.Widget; import com.fr.form.ui.Widget;
import com.fr.stable.fun.Level; import com.fr.stable.fun.mark.Mutable;
/** /**
* @author : richie * @author : richie
* @since : 8.0 * @since : 8.0
* 自定义参数界面控件 * 自定义参数界面控件
*/ */
public interface ParameterWidgetOptionProvider extends Level{ public interface ParameterWidgetOptionProvider extends Mutable {
String XML_TAG = "ParameterWidgetOptionProvider"; 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.base.present.Present;
import com.fr.design.beans.FurtherBasicBeanPane; import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.stable.fun.Level; import com.fr.stable.fun.mark.Mutable;
/** /**
* @author richie * @author richie
@ -10,7 +10,7 @@ import com.fr.stable.fun.Level;
* @since 8.0 * @since 8.0
* 形态类型接口 * 形态类型接口
*/ */
public interface PresentKindProvider extends Level{ public interface PresentKindProvider extends Mutable{
int CURRENT_LEVEL = 1; int CURRENT_LEVEL = 1;

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

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

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

@ -1,12 +1,12 @@
package com.fr.design.fun; package com.fr.design.fun;
import com.fr.design.beans.BasicBeanPane; 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"; 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.base.TableData;
import com.fr.design.data.tabledata.tabledatapane.AbstractTableDataPane; 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 * @author : richie
* @since : 7.1.1 * @since : 7.1.1
* 自定义报表数据集界面接口单独存在的一个个数据集 * 自定义报表数据集界面接口单独存在的一个个数据集
*/ */
public interface TableDataDefineProvider extends Level { public interface TableDataDefineProvider extends Mutable, Aftermath {
String XML_TAG = "TableDataDefineProvider"; 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.BasicTableDataTreePane;
import com.fr.design.data.datapane.TableDataPaneController; import com.fr.design.data.datapane.TableDataPaneController;
import com.fr.design.menu.ShortCut; import com.fr.design.menu.ShortCut;
import com.fr.stable.fun.Level; import com.fr.stable.fun.mark.Immutable;
/** /**
* 自定义的模板服务器数据集的树样式接口 el:分组样式 * 自定义的模板服务器数据集的树样式接口 el:分组样式
@ -12,7 +12,7 @@ import com.fr.stable.fun.Level;
* Date: 2016/4/18 * Date: 2016/4/18
* Time: 9:04 * Time: 9:04
*/ */
public interface TableDataPaneProcessor extends Level { public interface TableDataPaneProcessor extends Immutable {
String XML_TAG = "TableDataPaneProcessor"; String XML_TAG = "TableDataPaneProcessor";
int CURRENT_LEVEL = 1; int CURRENT_LEVEL = 1;

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

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

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

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

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

@ -1,7 +1,7 @@
package com.fr.design.fun; package com.fr.design.fun;
import com.fr.design.formula.UIFormula; import com.fr.design.formula.UIFormula;
import com.fr.stable.fun.Level; import com.fr.stable.fun.mark.Immutable;
/** /**
* @author richie * @author richie
@ -9,7 +9,7 @@ import com.fr.stable.fun.Level;
* @since 8.0 * @since 8.0
* 公式编辑器界面处理接口 * 公式编辑器界面处理接口
*/ */
public interface UIFormulaProcessor extends Level{ public interface UIFormulaProcessor extends Immutable{
String MARK_STRING = "UIFormulaProcessor"; String MARK_STRING = "UIFormulaProcessor";
int CURRENT_LEVEL = 1; 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.data.Verifier;
import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.BasicBeanPane;
import com.fr.stable.fun.Level; import com.fr.stable.fun.mark.Mutable;
import com.fr.stable.fun.Provider;
/** /**
* Created by richie on 16/6/8. * Created by richie on 16/6/8.
*/ */
public interface VerifyDefineProvider extends Level, Provider { public interface VerifyDefineProvider extends Mutable {
String MARK_STRING = "VerifyDefineProvider"; String MARK_STRING = "VerifyDefineProvider";

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

@ -0,0 +1,22 @@
package com.fr.design.fun;
import com.fr.form.ui.Widget;
import com.fr.stable.fun.mark.Immutable;
/**
* Coder: zack
* Date: 2016/5/12
* Time: 10:37
*/
public interface WidgetDesignHandler extends Immutable {
String XML_TAG = "WidgetDesignHandler";
int CURRENT_LEVEL = 1;
/**
* 传递控件共有属性
*
* @param oldWidget 老控件
* @param newWidget 新控件
*/
void transferWidgetProperties(Widget oldWidget, Widget newWidget);
}

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

@ -1,13 +1,13 @@
package com.fr.design.fun; package com.fr.design.fun;
import com.fr.design.gui.itable.AbstractPropertyTable; 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. * Created by vito on 16/4/27.
*/ */
public interface WidgetPropertyUIProvider extends Level { public interface WidgetPropertyUIProvider extends Mutable {
String XML_TAG = "WidgetPropertyUIProvider"; String XML_TAG = "WidgetPropertyUIProvider";
int CURRENT_LEVEL = 1; 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.design.fun.BackgroundQuickUIProvider;
import com.fr.stable.fun.impl.AbstractProvider; import com.fr.stable.fun.impl.AbstractProvider;
import com.fr.stable.fun.mark.API;
/** /**
* Created by richie on 16/5/18. * Created by richie on 16/5/18.
*/ */
@API(level = BackgroundQuickUIProvider.CURRENT_LEVEL)
public abstract class AbstractBackgroundQuickUIProvider extends AbstractProvider implements BackgroundQuickUIProvider { public abstract class AbstractBackgroundQuickUIProvider extends AbstractProvider implements BackgroundQuickUIProvider {
@Override @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.design.fun.BackgroundUIProvider;
import com.fr.stable.fun.impl.AbstractProvider; import com.fr.stable.fun.impl.AbstractProvider;
import com.fr.stable.fun.mark.API;
/** /**
* Created by richie on 16/5/18. * Created by richie on 16/5/18.
*/ */
@API(level = BackgroundUIProvider.CURRENT_LEVEL)
public abstract class AbstractBackgroundUIProvider extends AbstractProvider implements BackgroundUIProvider { public abstract class AbstractBackgroundUIProvider extends AbstractProvider implements BackgroundUIProvider {
@Override @Override

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

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

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

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

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

@ -1,10 +1,12 @@
package com.fr.design.fun.impl; package com.fr.design.fun.impl;
import com.fr.design.fun.DesignerEnvProcessor; import com.fr.design.fun.DesignerEnvProcessor;
import com.fr.stable.fun.mark.API;
/** /**
* Created by Administrator on 2016/3/31/0031. * Created by Administrator on 2016/3/31/0031.
*/ */
@API(level = DesignerEnvProcessor.CURRENT_LEVEL)
public abstract class AbstractDesignerEnvProcessor implements DesignerEnvProcessor { public abstract class AbstractDesignerEnvProcessor implements DesignerEnvProcessor {
public int currentAPILevel() { public int currentAPILevel() {

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.design.fun.ElementUIProvider;
import com.fr.stable.fun.impl.AbstractProvider; import com.fr.stable.fun.impl.AbstractProvider;
import com.fr.stable.fun.mark.API;
/** /**
* Created by richie on 16/4/25. * Created by richie on 16/4/25.
*/ */
@API(level = ElementUIProvider.CURRENT_LEVEL)
public abstract class AbstractElementUIProvider extends AbstractProvider implements ElementUIProvider { public abstract class AbstractElementUIProvider extends AbstractProvider implements ElementUIProvider {
@Override @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.design.fun.ExportAttrTabProvider;
import com.fr.stable.fun.impl.AbstractProvider; import com.fr.stable.fun.impl.AbstractProvider;
import com.fr.stable.fun.mark.API;
/** /**
* Created by vito on 16/5/5. * Created by vito on 16/5/5.
*/ */
@API(level = ExportAttrTabProvider.CURRENT_LEVEL)
public abstract class AbstractExportAttrTabProvider extends AbstractProvider implements ExportAttrTabProvider { public abstract class AbstractExportAttrTabProvider extends AbstractProvider implements ExportAttrTabProvider {
@Override @Override
public int currentAPILevel() { public int currentAPILevel() {

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

@ -1,12 +1,15 @@
package com.fr.design.fun.impl; package com.fr.design.fun.impl;
import com.fr.design.fun.FormElementCaseEditorProcessor; import com.fr.design.fun.FormElementCaseEditorProcessor;
import com.fr.stable.fun.ReportFitAttrProvider;
import com.fr.stable.fun.mark.API;
import java.beans.PropertyDescriptor; import java.beans.PropertyDescriptor;
/** /**
* Created by zhouping on 2015/9/10. * Created by zhouping on 2015/9/10.
*/ */
@API(level = FormElementCaseEditorProcessor.CURRENT_LEVEL)
public abstract class AbstractFormElementCaseEditorProcessor implements FormElementCaseEditorProcessor { public abstract class AbstractFormElementCaseEditorProcessor implements FormElementCaseEditorProcessor {
public int currentAPILevel() { public int currentAPILevel() {
@ -17,9 +20,21 @@ public abstract class AbstractFormElementCaseEditorProcessor implements FormElem
/** /**
* 生成属性表 * 生成属性表
* @param temp 传入当前操作的class * @param temp 传入当前操作的class
* @param reportFitAttr 传入的自适应属性
* @return 返回属性表 * @return 返回属性表
*/ */
public PropertyDescriptor[] createPropertyDescriptor(Class<?> temp){ @Override
public PropertyDescriptor[] createPropertyDescriptor(Class<?> temp, ReportFitAttrProvider reportFitAttr) {
return new PropertyDescriptor[0]; return new PropertyDescriptor[0];
} }
/**
* 返回pc自适应属性值
* @param fitAttrProvider 传入的自适应属性
* @return 返回pc自适应属性值
*/
@Override
public int getFitStateInPC(ReportFitAttrProvider fitAttrProvider) {
return 0;
}
} }

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

@ -1,18 +1,25 @@
package com.fr.design.fun.impl; package com.fr.design.fun.impl;
import com.fr.design.fun.FormWidgetOptionProvider; import com.fr.design.fun.FormWidgetOptionProvider;
import com.fr.stable.fun.impl.AbstractProvider;
import com.fr.stable.fun.mark.API;
/** /**
* @author richie * @author richie
* @date 2015-05-13 * @date 2015-05-13
* @since 8.0 * @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() { public int currentAPILevel() {
return CURRENT_LEVEL; return CURRENT_LEVEL;
} }
@Override
public String mark4Provider() {
return getClass().getName();
}
@Override @Override
public boolean isContainer() { public boolean isContainer() {

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

@ -1,15 +1,21 @@
package com.fr.design.fun.impl; package com.fr.design.fun.impl;
import com.fr.design.fun.GlobalListenerProvider; 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. * 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() { public int currentAPILevel() {
return CURRENT_LEVEL; return CURRENT_LEVEL;
} }
@Override
public String mark4Provider() {
return getClass().getName();
}
} }

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

@ -1,16 +1,23 @@
package com.fr.design.fun.impl; package com.fr.design.fun.impl;
import com.fr.design.fun.HighlightProvider; import com.fr.design.fun.HighlightProvider;
import com.fr.stable.fun.impl.AbstractProvider;
import com.fr.stable.fun.mark.API;
/** /**
* @author richie * @author richie
* @date 2015-05-13 * @date 2015-05-13
* @since 8.0 * @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() { public int currentAPILevel() {
return CURRENT_LEVEL; 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; package com.fr.design.fun.impl;
import com.fr.design.fun.HyperlinkProvider; 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. * 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() { public int currentAPILevel() {
return CURRENT_LEVEL; return CURRENT_LEVEL;
} }
@Override
public String mark4Provider() {
return getClass().getName();
}
} }

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

@ -1,10 +1,12 @@
package com.fr.design.fun.impl; package com.fr.design.fun.impl;
import com.fr.design.fun.IndentationUnitProcessor; import com.fr.design.fun.IndentationUnitProcessor;
import com.fr.stable.fun.mark.API;
/** /**
* Created by zhouping on 2015/9/20. * Created by zhouping on 2015/9/20.
*/ */
@API(level = IndentationUnitProcessor.CURRENT_LEVEL)
public class AbstractIndentationUnitProcessor implements IndentationUnitProcessor { public class AbstractIndentationUnitProcessor implements IndentationUnitProcessor {
private int indentationUnit = 1; private int indentationUnit = 1;

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

@ -1,14 +1,21 @@
package com.fr.design.fun.impl; package com.fr.design.fun.impl;
import com.fr.design.fun.JavaScriptActionProvider; 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. * 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() { public int currentAPILevel() {
return CURRENT_LEVEL; 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.mainframe.toolbar.ToolBarMenuDockPlus;
import com.fr.design.menu.ShortCut; import com.fr.design.menu.ShortCut;
import com.fr.stable.fun.impl.AbstractProvider; import com.fr.stable.fun.impl.AbstractProvider;
import com.fr.stable.fun.mark.API;
/** /**
* @author richie * @author richie
* @date 2015-05-13 * @date 2015-05-13
* @since 8.0 * @since 8.0
*/ */
@API(level = MenuHandler.CURRENT_LEVEL)
public abstract class AbstractMenuHandler extends AbstractProvider implements MenuHandler { public abstract class AbstractMenuHandler extends AbstractProvider implements MenuHandler {
public int currentAPILevel() { public int currentAPILevel() {

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

@ -1,16 +1,23 @@
package com.fr.design.fun.impl; package com.fr.design.fun.impl;
import com.fr.design.fun.ParameterWidgetOptionProvider; import com.fr.design.fun.ParameterWidgetOptionProvider;
import com.fr.stable.fun.impl.AbstractProvider;
import com.fr.stable.fun.mark.API;
/** /**
* @author richie * @author richie
* @date 2015-05-13 * @date 2015-05-13
* @since 8.0 * @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() { public int currentAPILevel() {
return CURRENT_LEVEL; 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; package com.fr.design.fun.impl;
import com.fr.design.fun.PresentKindProvider; import com.fr.design.fun.PresentKindProvider;
import com.fr.stable.fun.impl.AbstractProvider;
import com.fr.stable.fun.mark.API;
/** /**
* @author richie * @author richie
* @date 2015-05-22 * @date 2015-05-22
* @since 8.0 * @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() { public int currentAPILevel() {
return CURRENT_LEVEL; 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.fun.PreviewProvider;
import com.fr.design.mainframe.JTemplate; import com.fr.design.mainframe.JTemplate;
import com.fr.general.ComparatorUtils; 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.Collections;
import java.util.Map; import java.util.Map;
@ -12,12 +14,17 @@ import java.util.Map;
* @date 2015-05-13 * @date 2015-05-13
* @since 8.0 * @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() { public int currentAPILevel() {
return CURRENT_LEVEL; return CURRENT_LEVEL;
} }
@Override
public String mark4Provider() {
return getClass().getName();
}
@Override @Override
public void onClick(JTemplate<?, ?> jt) { 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; 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.design.fun.ServerTableDataDefineProvider;
import com.fr.stable.fun.impl.AbstractProvider;
import com.fr.stable.fun.mark.API;
/** /**
* @author richie * @author richie
* @date 2015-05-13 * @date 2015-05-13
* @since 8.0 * @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; package com.fr.design.fun.impl;
import com.fr.design.fun.SubmitProvider; 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() { public int currentAPILevel() {
return CURRENT_LEVEL; return CURRENT_LEVEL;
} }
@Override
public String mark4Provider() {
return getClass().getName();
}
} }

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

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

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

@ -1,16 +1,39 @@
package com.fr.design.fun.impl; 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.design.fun.TableDataDefineProvider;
import com.fr.stable.fun.impl.AbstractProvider;
import com.fr.stable.fun.mark.API;
/** /**
* @author richie * @author richie
* @date 2015-05-13 * @date 2015-05-13
* @since 8.0 * @since 8.0
*/ */
public abstract class AbstractTableDataDefineProvider implements TableDataDefineProvider { @API(level = TableDataDefineProvider.CURRENT_LEVEL)
public abstract class AbstractTableDataDefineProvider extends AbstractProvider implements TableDataDefineProvider {
@Override @Override
public int currentAPILevel() { public int currentAPILevel() {
return CURRENT_LEVEL; 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);
}
} }

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

@ -1,7 +1,9 @@
package com.fr.design.fun.impl; package com.fr.design.fun.impl;
import com.fr.design.fun.TitlePlaceProcessor; 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 abstract class AbstractTitleProcessor implements TitlePlaceProcessor {
public int currentAPILevel() { public int currentAPILevel() {

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

@ -1,14 +1,21 @@
package com.fr.design.fun.impl; package com.fr.design.fun.impl;
import com.fr.design.fun.ToolbarItemProvider; 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. * 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() { public int currentAPILevel() {
return CURRENT_LEVEL; return CURRENT_LEVEL;
} }
@Override
public String mark4Provider() {
return getClass().getName();
}
} }

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

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

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.design.fun.VerifyDefineProvider;
import com.fr.stable.fun.impl.AbstractProvider; import com.fr.stable.fun.impl.AbstractProvider;
import com.fr.stable.fun.mark.API;
/** /**
* Created by richie on 16/6/8. * Created by richie on 16/6/8.
*/ */
@API(level = VerifyDefineProvider.CURRENT_LEVEL)
public abstract class AbstractVerifyDefineProvider extends AbstractProvider implements VerifyDefineProvider { public abstract class AbstractVerifyDefineProvider extends AbstractProvider implements VerifyDefineProvider {
@Override @Override

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

@ -0,0 +1,18 @@
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;
}
}

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.design.fun.WidgetPropertyUIProvider;
import com.fr.stable.fun.impl.AbstractProvider; import com.fr.stable.fun.impl.AbstractProvider;
import com.fr.stable.fun.mark.API;
/** /**
* Created by vito on 16/4/27. * Created by vito on 16/4/27.
*/ */
@API(level = WidgetPropertyUIProvider.CURRENT_LEVEL)
public abstract class AbstractWidgetPropertyUIProvider extends AbstractProvider implements WidgetPropertyUIProvider { public abstract class AbstractWidgetPropertyUIProvider extends AbstractProvider implements WidgetPropertyUIProvider {
@Override @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.ArrayList;
import java.util.List; 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++) { for (int i = 0; i < templateArrayLisy.size(); i++) {
pluginCreators[i] = ((HyperlinkPluginAction) templateArrayLisy.get(i)).getHyperlinkCreator(); 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>(); List<NameableCreator> creatorList = new ArrayList<NameableCreator>();
for (HyperlinkProvider provider : providers) { for (HyperlinkProvider provider : providers) {
NameableCreator nc = provider.createHyperlinkCreator(); NameableCreator nc = provider.createHyperlinkCreator();
creatorList.add(nc); 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));
} }
/** /**

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

Loading…
Cancel
Save