Fangjie Hu 8 years ago
parent
commit
812c15435c
  1. 96
      designer/.classpath
  2. 1
      designer/src/com/fr/design/parameter/ParameterDefinitePane.java
  3. 55
      designer_base/.classpath
  4. 62
      designer_base/src/com/fr/design/actions/file/LocalePane.java
  5. 34
      designer_base/src/com/fr/design/data/datapane/connect/ConnectionTableProcedurePane.java
  6. 2
      designer_base/src/com/fr/design/formula/FunctionManagerPane.java
  7. 4
      designer_base/src/com/fr/design/hyperlink/WebHyperNorthPane.java
  8. 11
      designer_base/src/com/fr/design/mainframe/DesignerFrameFileDealerPane.java
  9. 4
      designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java
  10. 50
      designer_base/src/com/fr/design/menu/KeySetUtils.java
  11. 50
      designer_base/src/com/fr/design/style/AbstractPopBox.java
  12. 5
      designer_base/src/com/fr/design/style/color/NewColorSelectPane.java
  13. 67
      designer_base/src/com/fr/env/RemoteEnv.java
  14. 49
      designer_chart/.classpath
  15. 1
      designer_chart/src/com/fr/design/mainframe/chart/gui/ChartDataPane.java
  16. 44
      designer_form/.classpath
  17. 2
      designer_form/src/com/fr/design/mainframe/CoverReportPane.java
  18. 9
      designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java
  19. 4
      designer_form/src/com/fr/design/mainframe/ShareWidgetButton.java

96
designer/.classpath

@ -1,52 +1,62 @@
<?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="src" path="src"/> <classpathentry kind="src" path="src"/>
<classpathentry exported="true" kind="con" path="org.eclipse.jdt.USER_LIBRARY/lib"/> <classpathentry exported="true" kind="con" path="org.eclipse.jdt.USER_LIBRARY/lib"/>
<classpathentry combineaccessrules="false" exported="true" kind="src" path="/base"/>
<classpathentry combineaccessrules="false" exported="true" kind="src" path="/designer_base"/> <classpathentry combineaccessrules="false" exported="true" kind="src" path="/designer_base"/>
<classpathentry combineaccessrules="false" exported="true" kind="src" path="/form"/>
<classpathentry combineaccessrules="false" exported="true" kind="src" path="/engine"/>
<classpathentry combineaccessrules="false" kind="src" path="/base-stable"/>
<classpathentry combineaccessrules="false" kind="src" path="/base-basic"/>
<classpathentry kind="lib" path="/lib/3rd.jar"/>
<classpathentry kind="lib" path="/lib/junit.jar"/>
<classpathentry kind="lib" path="/lib/ojdbc14.jar"/>
<classpathentry kind="lib" path="/lib/poi2007_fat.jar"/>
<classpathentry kind="lib" path="/lib/postgresql-8.0-311.jdbc3.jar"/>
<classpathentry kind="lib" path="/lib/servlet-api.jar"/>
<classpathentry kind="lib" path="/lib/sqljdbc.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 combineaccessrules="false" kind="src" path="/base-calculate"/>
<classpathentry combineaccessrules="false" kind="src" path="/chart-base"/>
<classpathentry combineaccessrules="false" kind="src" path="/chart-chartattr"/>
<classpathentry combineaccessrules="false" kind="src" path="/chart-chartdata"/>
<classpathentry combineaccessrules="false" kind="src" path="/chart-chartglyph"/>
<classpathentry combineaccessrules="false" kind="src" path="/chart-web"/>
<classpathentry combineaccessrules="false" kind="src" path="/engine-page"/>
<classpathentry combineaccessrules="false" kind="src" path="/base-data"/>
<classpathentry combineaccessrules="false" kind="src" path="/engine-view"/>
<classpathentry combineaccessrules="false" kind="src" path="/engine-write"/>
<classpathentry combineaccessrules="false" kind="src" path="/engine-remote"/>
<classpathentry combineaccessrules="false" kind="src" path="/designer_chart"/> <classpathentry combineaccessrules="false" kind="src" path="/designer_chart"/>
<classpathentry combineaccessrules="false" kind="src" path="/designer_form"/> <classpathentry combineaccessrules="false" kind="src" path="/designer_form"/>
<classpathentry kind="lib" path="/lib/swt.jar"/> <classpathentry kind="lib" path="D:/code/finedesignlib/jetty/activation.jar"/>
<classpathentry kind="lib" path="/lib/sqlite-jdbc.jar"/> <classpathentry kind="lib" path="D:/code/finedesignlib/jetty/commons-el.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jetty/commons-logging.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jetty/jasper-compiler.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jetty/jasper-runtime.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jetty/javax.servlet.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jetty/jaxrpc.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jetty/mail.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jetty/mx4j.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jetty/mx4j-remote.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jetty/mx4j-tools.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jetty/org.mortbay.jetty.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jetty/org.mortbay.jmx.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jetty/saaj.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jetty/xercesImpl.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jetty/xml-apis.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jetty/xmlParserAPIs.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/3rd.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/ant-junit.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/cglib-nodep-2.2.2.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/commons-codec-1.6.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/commons-logging-1.2.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/easymock-3.2.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/hamcrest-core-1.3.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jamm.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jna.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jts-1.13.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/junit.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/junit-4.12.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/mysql-connector-java-5.1.6-bin.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/objenesis-2.1.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/ojdbc14.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/olap4j-1.1.0.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/olap4j-xmla-1.1.0.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/postgresql-8.0-311.jdbc3.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/quartz.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/sapjco.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/sapjco3.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/servlet-api.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/sqlite-jdbc.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/sqljdbc.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/swag.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/swexpl.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/swt.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/Sybelux.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/xercesImpl.jar"/>
<classpathentry kind="lib" path="D:/code/fr-chart-8.0.jar"/>
<classpathentry kind="lib" path="D:/code/fr-core-8.0.jar"/>
<classpathentry kind="lib" path="D:/code/fr-performance-8.0.jar"/>
<classpathentry kind="lib" path="D:/code/fr-platform-8.0.jar"/>
<classpathentry kind="lib" path="D:/code/fr-report-8.0.jar"/>
<classpathentry kind="lib" path="D:/code/fr-third-8.0.jar"/>
<classpathentry kind="output" path="bin"/> <classpathentry kind="output" path="bin"/>
</classpath> </classpath>

1
designer/src/com/fr/design/parameter/ParameterDefinitePane.java

@ -22,7 +22,6 @@ import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.AuthorityToolBarPane; import com.fr.design.mainframe.AuthorityToolBarPane;
import com.fr.design.mainframe.EastRegionContainerPane; import com.fr.design.mainframe.EastRegionContainerPane;
import com.fr.design.mainframe.JWorkBook; import com.fr.design.mainframe.JWorkBook;
import com.fr.design.mainframe.WidgetPropertyPane;
import com.fr.design.mainframe.toolbar.ToolBarMenuDockPlus; import com.fr.design.mainframe.toolbar.ToolBarMenuDockPlus;
import com.fr.design.menu.*; import com.fr.design.menu.*;
import com.fr.design.module.DesignModuleFactory; import com.fr.design.module.DesignModuleFactory;

55
designer_base/.classpath

@ -3,8 +3,57 @@
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <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 kind="lib" path="D:/Program Files/Git/finereport/lib/report/fr-core-8.0.jar"/> <classpathentry kind="lib" path="D:/code/finedesignlib/jetty/activation.jar"/>
<classpathentry kind="lib" path="D:/Program Files/Git/finereport/lib/report/fr-third-8.0.jar"/> <classpathentry kind="lib" path="D:/code/finedesignlib/jetty/commons-el.jar"/>
<classpathentry kind="lib" path="D:/Program Files/Git/finereport/lib/jetty/org.mortbay.jetty.jar"/> <classpathentry kind="lib" path="D:/code/finedesignlib/jetty/commons-logging.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jetty/jasper-compiler.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jetty/jasper-runtime.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jetty/javax.servlet.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jetty/jaxrpc.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jetty/mail.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jetty/mx4j.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jetty/mx4j-remote.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jetty/mx4j-tools.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jetty/org.mortbay.jetty.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jetty/org.mortbay.jmx.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jetty/saaj.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jetty/xercesImpl.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jetty/xml-apis.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jetty/xmlParserAPIs.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/3rd.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/ant-junit.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/cglib-nodep-2.2.2.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/commons-codec-1.6.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/commons-logging-1.2.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/easymock-3.2.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/hamcrest-core-1.3.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jamm.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jna.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jts-1.13.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/junit.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/junit-4.12.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/mysql-connector-java-5.1.6-bin.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/objenesis-2.1.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/ojdbc14.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/olap4j-1.1.0.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/olap4j-xmla-1.1.0.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/postgresql-8.0-311.jdbc3.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/quartz.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/sapjco.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/sapjco3.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/servlet-api.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/sqlite-jdbc.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/sqljdbc.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/swag.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/swexpl.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/swt.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/Sybelux.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/xercesImpl.jar"/>
<classpathentry kind="lib" path="D:/code/fr-chart-8.0.jar"/>
<classpathentry kind="lib" path="D:/code/fr-core-8.0.jar"/>
<classpathentry kind="lib" path="D:/code/fr-performance-8.0.jar"/>
<classpathentry kind="lib" path="D:/code/fr-platform-8.0.jar"/>
<classpathentry kind="lib" path="D:/code/fr-report-8.0.jar"/>
<classpathentry kind="lib" path="D:/code/fr-third-8.0.jar"/>
<classpathentry kind="output" path="bin"/> <classpathentry kind="output" path="bin"/>
</classpath> </classpath>

62
designer_base/src/com/fr/design/actions/file/LocalePane.java

@ -27,6 +27,8 @@ import com.fr.design.dialog.BasicPane;
import com.fr.file.filetree.FileNode; import com.fr.file.filetree.FileNode;
import com.fr.general.*; import com.fr.general.*;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
import com.fr.stable.StringUtils;
import com.fr.stable.bridge.StableFactory;
import com.fr.stable.project.ProjectConstants; import com.fr.stable.project.ProjectConstants;
/** /**
@ -51,8 +53,8 @@ public class LocalePane extends BasicPane {
add(tabbedPane, BorderLayout.CENTER); add(tabbedPane, BorderLayout.CENTER);
predefineTableModel = new DefaultTableModel() { predefineTableModel = new DefaultTableModel() {
public boolean isCellEditable(int col, int row) { public boolean isCellEditable(int row, int column) {
return false; return column == 0;
} }
}; };
@ -109,23 +111,39 @@ public class LocalePane extends BasicPane {
} }
private void initPredefinedProperties() { private void initPredefinedProperties() {
Map<Locale, LocalePackage> map = Inter.getPredefinedPackageMap();
LocalePackage chinese = map.get(Locale.SIMPLIFIED_CHINESE); Map<Locale, String> supportLocaleMap = Inter.getSupportLocaleMap();
String[] localeFiles = StableFactory.getLocaleFiles();
List<String> sortKeys = new ArrayList<String>(); List<String> sortKeys = new ArrayList<String>();
Set<ResourceBundle> bundles = chinese.getKindsOfResourceBundle(); for (String path : localeFiles) {
for (ResourceBundle bundle : bundles) { ResourceBundle chineseBundle = loadResourceBundle(path, Locale.SIMPLIFIED_CHINESE);
sortKeys.addAll(bundle.keySet()); sortKeys.addAll(chineseBundle.keySet());
} }
Collections.sort(sortKeys); Collections.sort(sortKeys);
Map<Locale, List<ResourceBundle>> localeResourceBundleMap = new HashMap<Locale, List<ResourceBundle>>();
for (Map.Entry<Locale, String> entry : supportLocaleMap.entrySet()) {
Locale locale = entry.getKey();
List<ResourceBundle> list = new ArrayList<>();
for (String path : localeFiles) {
ResourceBundle chineseBundle = loadResourceBundle(path, locale);
list.add(chineseBundle);
}
localeResourceBundleMap.put(locale, list);
}
Map<Locale, Vector<String>> data = new HashMap<Locale, Vector<String>>(); Map<Locale, Vector<String>> data = new HashMap<Locale, Vector<String>>();
for (Map.Entry<Locale, LocalePackage> entry : map.entrySet()) { for (Map.Entry<Locale, List<ResourceBundle>> entry : localeResourceBundleMap.entrySet()) {
Vector<String> column = new Vector<String>(); Vector<String> column = new Vector<String>();
List<ResourceBundle> rbs = entry.getValue();
for (String key : sortKeys) { for (String key : sortKeys) {
column.add(entry.getValue().getLocText(key)); column.add(readText(rbs, key));
} }
data.put(entry.getKey(), column); data.put(entry.getKey(), column);
} }
@ -140,6 +158,19 @@ public class LocalePane extends BasicPane {
} }
} }
private String readText(List<ResourceBundle> rbs, String key) {
for (ResourceBundle rb : rbs) {
if (rb.containsKey(key)) {
return rb.getString(key);
}
}
return null;
}
private ResourceBundle loadResourceBundle(String dir, Locale locale) {
return ResourceBundle.getBundle(dir, locale, Inter.class.getClassLoader());
}
private void initCustomProperties() throws Exception { private void initCustomProperties() throws Exception {
Env env = FRContext.getCurrentEnv(); Env env = FRContext.getCurrentEnv();
if (env == null) { if (env == null) {
@ -176,22 +207,9 @@ public class LocalePane extends BasicPane {
} }
} }
private Properties loadLocaleProperties(String name) {
Properties properties = new Properties();
InputStream inputStream = IOUtils.readResource("/com/fr/general/locale/" + name);
try {
properties.load(inputStream);
} catch (IOException e) {
FRLogger.getLogger().error(e.getMessage());
}
return properties;
}
/** /**
* 保存当前编辑的国际化 * 保存当前编辑的国际化
* *
*
* @date 2014-9-30-下午3:10:30
*/ */
public void save() { public void save() {
Env env = FRContext.getCurrentEnv(); Env env = FRContext.getCurrentEnv();

34
designer_base/src/com/fr/design/data/datapane/connect/ConnectionTableProcedurePane.java

@ -11,6 +11,7 @@ import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.gui.ilist.TableViewList; import com.fr.design.gui.ilist.TableViewList;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
import com.fr.general.GeneralContext;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
@ -37,8 +38,8 @@ public class ConnectionTableProcedurePane extends BasicPane {
public ConnectionTableProcedurePane() { public ConnectionTableProcedurePane() {
this.setLayout(new BorderLayout(4, 4)); this.setLayout(new BorderLayout(4, 4));
connectionComboBox = new ConnectionComboBoxPanel(com.fr.data.impl.Connection.class){ connectionComboBox = new ConnectionComboBoxPanel(com.fr.data.impl.Connection.class) {
protected void refreshItems(){ protected void refreshItems() {
super.refreshItems(); super.refreshItems();
if (tableViewList != null) { if (tableViewList != null) {
search(); search();
@ -54,8 +55,8 @@ public class ConnectionTableProcedurePane extends BasicPane {
Object obj = tableViewList.getSelectedValue(); Object obj = tableViewList.getSelectedValue();
TableProcedure tableProcedure = null; TableProcedure tableProcedure = null;
if (obj instanceof TableProcedure) { if (obj instanceof TableProcedure) {
tableProcedure = (TableProcedure)obj; tableProcedure = (TableProcedure) obj;
}else { } else {
return; return;
} }
for (int i = 0; i < ConnectionTableProcedurePane.this.listeners.size(); i++) { for (int i = 0; i < ConnectionTableProcedurePane.this.listeners.size(); i++) {
@ -89,15 +90,27 @@ public class ConnectionTableProcedurePane extends BasicPane {
tableCheckBox.setSelected(true); tableCheckBox.setSelected(true);
tableCheckBox.addActionListener(filter); tableCheckBox.addActionListener(filter);
first.add(tableCheckBox); first.add(tableCheckBox);
first.add(new UILabel(Inter.getLocText("Table"), BaseUtils.readIcon("/com/fr/design/images/data/tables.png"), UILabel.LEADING));
JPanel second = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); JPanel second = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
viewCheckBox = new UICheckBox(); viewCheckBox = new UICheckBox();
viewCheckBox.setSelected(true); viewCheckBox.setSelected(true);
viewCheckBox.addActionListener(filter); viewCheckBox.addActionListener(filter);
second.add(viewCheckBox); second.add(viewCheckBox);
second.add(new UILabel(Inter.getLocText("SQL-View"), BaseUtils.readIcon("/com/fr/design/images/data/views.png"), UILabel.LEADING));
// 根据环境是否为中文设置不同的显示
if (GeneralContext.isChineseEnv()) {
first.add(new UILabel(Inter.getLocText("FR-Designer_SQL-Table"),
BaseUtils.readIcon("/com/fr/design/images/data/tables.png"), UILabel.LEADING));
second.add(new UILabel(Inter.getLocText("FR-Designer_SQL-View"),
BaseUtils.readIcon("/com/fr/design/images/data/views.png"), UILabel.LEADING));
} else {
UILabel ui1 = new UILabel(BaseUtils.readIcon("/com/fr/design/images/data/tables.png"), UILabel.LEADING);
UILabel ui2 = new UILabel(BaseUtils.readIcon("/com/fr/design/images/data/views.png"), UILabel.LEADING);
ui1.setToolTipText(Inter.getLocText("FR-Designer_SQL-Table"));
ui2.setToolTipText(Inter.getLocText("FR-Designer_SQL-View"));
first.add(ui1);
second.add(ui2);
}
checkBoxgroupPane.add(first); checkBoxgroupPane.add(first);
checkBoxgroupPane.add(second); checkBoxgroupPane.add(second);
@ -106,11 +119,13 @@ public class ConnectionTableProcedurePane extends BasicPane {
/** /**
* itemComboBox 加上 itemListener * itemComboBox 加上 itemListener
*
* @param itemListener * @param itemListener
*/ */
public void addItemListener(ItemListener itemListener) { public void addItemListener(ItemListener itemListener) {
connectionComboBox.itemComboBox.addItemListener(itemListener); connectionComboBox.itemComboBox.addItemListener(itemListener);
} }
private DocumentListener searchListener = new DocumentListener() { private DocumentListener searchListener = new DocumentListener() {
@Override @Override
@ -146,13 +161,13 @@ public class ConnectionTableProcedurePane extends BasicPane {
String[] types = ArrayUtils.EMPTY_STRING_ARRAY; String[] types = ArrayUtils.EMPTY_STRING_ARRAY;
if (tableCheckBox != null) { if (tableCheckBox != null) {
if (tableCheckBox.isSelected()) { if (tableCheckBox.isSelected()) {
types = (String[])ArrayUtils.add(types, TableProcedure.TABLE); types = (String[]) ArrayUtils.add(types, TableProcedure.TABLE);
} }
if (viewCheckBox.isSelected()) { if (viewCheckBox.isSelected()) {
types = (String[])ArrayUtils.add(types, TableProcedure.VIEW); types = (String[]) ArrayUtils.add(types, TableProcedure.VIEW);
} }
} else { } else {
types = (String[])ArrayUtils.add(types, TableProcedure.PROCEDURE); types = (String[]) ArrayUtils.add(types, TableProcedure.PROCEDURE);
} }
tableViewList.populate(selectedObj, searchField.getText().trim(), types); tableViewList.populate(selectedObj, searchField.getText().trim(), types);
} }
@ -181,6 +196,7 @@ public class ConnectionTableProcedurePane extends BasicPane {
public static interface DoubleClickSelectedNodeOnTreeListener { public static interface DoubleClickSelectedNodeOnTreeListener {
/** /**
* 处理双击事件 * 处理双击事件
*
* @param target * @param target
*/ */
public void actionPerformed(TableProcedure target); public void actionPerformed(TableProcedure target);

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

@ -132,7 +132,7 @@ public class FunctionManagerPane extends BasicPane {
JPanel northPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane(); JPanel northPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane();
this.add(northPane, BorderLayout.NORTH); this.add(northPane, BorderLayout.NORTH);
JPanel reportletNamePane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); JPanel reportletNamePane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
classNameTextField = new UITextField(28); classNameTextField = new UITextField(25);
reportletNamePane.add(classNameTextField); reportletNamePane.add(classNameTextField);
UIButton browserButton = new UIButton(Inter.getLocText("FR-Designer_Select")); UIButton browserButton = new UIButton(Inter.getLocText("FR-Designer_Select"));
browserButton.setPreferredSize(new Dimension(browserButton.getPreferredSize().width, classNameTextField.getPreferredSize().height)); browserButton.setPreferredSize(new Dimension(browserButton.getPreferredSize().width, classNameTextField.getPreferredSize().height));

4
designer_base/src/com/fr/design/hyperlink/WebHyperNorthPane.java

@ -51,10 +51,10 @@ public class WebHyperNorthPane extends AbstractHyperlinkPane<WebHyperlink> {
urlPane.add(urlTextField); urlPane.add(urlTextField);
urlTextField.setText(ProductConstants.WEBSITE_URL); urlTextField.setText(ProductConstants.WEBSITE_URL);
UILabel label = new UILabel(Inter.getLocText(new String[]{"Example","Or"}, new String[]{":http://www.baidu.com","/main.jsp"})); //UILabel label = new UILabel(Inter.getLocText(new String[]{"Example","Or"}, new String[]{":http://www.baidu.com","/main.jsp"}));
JPanel urlWithHelp = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(2); JPanel urlWithHelp = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(2);
urlWithHelp.add(GUICoreUtils.createNamedPane(urlPane, "URL:")); urlWithHelp.add(GUICoreUtils.createNamedPane(urlPane, "URL:"));
urlWithHelp.add(label); //urlWithHelp.add(label);
if(this.needRenamePane){ if(this.needRenamePane){
headerPane.setLayout(new BorderLayout(LayoutConstants.VGAP_LARGE,LayoutConstants.VGAP_SMALL)); headerPane.setLayout(new BorderLayout(LayoutConstants.VGAP_LARGE,LayoutConstants.VGAP_SMALL));

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

@ -27,6 +27,7 @@ import com.fr.file.FILE;
import com.fr.file.FileNodeFILE; import com.fr.file.FileNodeFILE;
import com.fr.file.filetree.FileNode; import com.fr.file.filetree.FileNode;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.GeneralContext;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.stable.CoreConstants; import com.fr.stable.CoreConstants;
import com.fr.stable.StableUtils; import com.fr.stable.StableUtils;
@ -42,6 +43,7 @@ import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent; import java.awt.event.KeyEvent;
import java.io.File; import java.io.File;
import java.util.HashMap; import java.util.HashMap;
import java.util.Locale;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
@ -411,7 +413,14 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt
}); });
UIButton cancelButton = new UIButton(Inter.getLocText("FR-Designer_Cancel")); UIButton cancelButton = new UIButton(Inter.getLocText("FR-Designer_Cancel"));
cancelButton.setBounds(250, 90, 60, 25);
// mod by anchore 16/11/16
if (ComparatorUtils.equals(Locale.JAPAN, GeneralContext.getLocale())) {
cancelButton.setBounds(250, 90, 80, 25);
} else {
cancelButton.setBounds(180, 90, 80, 25);
}
//cancelButton.setBounds(250, 90, 60, 25);
cancelButton.addActionListener(new ActionListener() { cancelButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
jd.dispose(); jd.dispose();

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

@ -321,7 +321,9 @@ public abstract class ToolBarMenuDock {
//shortCuts.add(new TutorialAction()); //shortCuts.add(new TutorialAction());
shortCuts.add(SeparatorDef.DEFAULT); shortCuts.add(SeparatorDef.DEFAULT);
if (ComparatorUtils.equals(ProductConstants.APP_NAME,FINEREPORT)) { if (ComparatorUtils.equals(ProductConstants.APP_NAME,FINEREPORT)) {
shortCuts.add(new FeedBackAction());
// mod by anchore 16/11/17 去掉反馈
//shortCuts.add(new FeedBackAction());
shortCuts.add(SeparatorDef.DEFAULT); shortCuts.add(SeparatorDef.DEFAULT);
shortCuts.add(SeparatorDef.DEFAULT); shortCuts.add(SeparatorDef.DEFAULT);
// shortCuts.add(new ForumAction()); // shortCuts.add(new ForumAction());

50
designer_base/src/com/fr/design/menu/KeySetUtils.java

@ -4,10 +4,13 @@
package com.fr.design.menu; package com.fr.design.menu;
import com.fr.general.ComparatorUtils;
import com.fr.general.GeneralContext;
import com.fr.general.Inter; import com.fr.general.Inter;
import javax.swing.*; import javax.swing.*;
import java.awt.event.KeyEvent; import java.awt.event.KeyEvent;
import java.util.Locale;
/** /**
* Created by IntelliJ IDEA. * Created by IntelliJ IDEA.
@ -63,7 +66,7 @@ public class KeySetUtils {
@Override @Override
public String getMenuName() { public String getMenuName() {
return Inter.getLocText("M_Close_Current"); return Inter.getLocText("FR-Designer_Close");
} }
@Override @Override
@ -80,7 +83,7 @@ public class KeySetUtils {
@Override @Override
public String getMenuName() { public String getMenuName() {
return Inter.getLocText("M-Save"); return Inter.getLocText("FR-Designer_Save");
} }
@Override @Override
@ -148,7 +151,7 @@ public class KeySetUtils {
@Override @Override
public String getMenuName() { public String getMenuName() {
return Inter.getLocText("Export"); return Inter.getLocText("FR-Designer_Export");
} }
@Override @Override
@ -183,7 +186,7 @@ public class KeySetUtils {
@Override @Override
public String getMenuName() { public String getMenuName() {
return Inter.getLocText("Export-Excel-Page"); return Inter.getLocText("FR-Engine_Export-Excel-Page");
} }
@Override @Override
@ -201,7 +204,7 @@ public class KeySetUtils {
@Override @Override
public String getMenuName() { public String getMenuName() {
return Inter.getLocText("Export-Excel-Simple"); return Inter.getLocText("FR-Engine_Export-Excel-Simple");
} }
@Override @Override
@ -219,7 +222,7 @@ public class KeySetUtils {
@Override @Override
public String getMenuName() { public String getMenuName() {
return Inter.getLocText("Export-Excel-PageToSheet"); return Inter.getLocText("FR-Engine_Export-Excel-PageToSheet");
} }
@Override @Override
@ -362,7 +365,7 @@ public class KeySetUtils {
@Override @Override
public String getMenuName() { public String getMenuName() {
return Inter.getLocText("ExportAndOutput"); return Inter.getLocText("FR-Designer_ExportAndOutput");
} }
@Override @Override
@ -379,7 +382,7 @@ public class KeySetUtils {
@Override @Override
public String getMenuName() { public String getMenuName() {
return "EXCEL"+Inter.getLocText("ExportAndOutput"); return "EXCEL"+Inter.getLocText("FR-Designer_ExportAndOutput");
} }
@Override @Override
@ -413,7 +416,7 @@ public class KeySetUtils {
@Override @Override
public String getMenuName() { public String getMenuName() {
return Inter.getLocText("M-SwitchWorkspace"); return Inter.getLocText("FR-Designer_M-SwitchWorkspace");
} }
@Override @Override
@ -430,7 +433,7 @@ public class KeySetUtils {
@Override @Override
public String getMenuName() { public String getMenuName() {
return Inter.getLocText("M-Exit"); return Inter.getLocText("FR-Designer_M-Exit");
} }
@Override @Override
@ -448,7 +451,7 @@ public class KeySetUtils {
@Override @Override
public String getMenuName() { public String getMenuName() {
return Inter.getLocText("M-Template"); return Inter.getLocText("FR-Designer_M-Template");
} }
@Override @Override
@ -639,7 +642,7 @@ public class KeySetUtils {
@Override @Override
public String getMenuName() { public String getMenuName() {
return Inter.getLocText("ReportColumns-Columns"); return Inter.getLocText("FR-Designer_ReportColumns-Columns");
} }
@Override @Override
@ -657,7 +660,7 @@ public class KeySetUtils {
@Override @Override
public String getMenuName() { public String getMenuName() {
return Inter.getLocText("M-Repeat-Freeze"); return Inter.getLocText("FR-Designer_M-Repeat-Freeze");
} }
@Override @Override
@ -675,7 +678,7 @@ public class KeySetUtils {
@Override @Override
public String getMenuName() { public String getMenuName() {
return Inter.getLocText("Frozen"); return Inter.getLocText("FR-Engine_Frozen");
} }
@Override @Override
@ -710,7 +713,14 @@ public class KeySetUtils {
@Override @Override
public String getMenuName() { public String getMenuName() {
return Inter.getLocText(new String[]{"Allow", "DashBoard-Potence", "Edit"});
// mod by anchore 16/11/16
if (ComparatorUtils.equals(Locale.JAPAN, GeneralContext.getLocale())) {
return Inter.getLocText(new String[]{"FR-Engine_RP_Authority_Edit", "Allow"});
} else {
return Inter.getLocText(new String[]{"Allow", "FR-Engine_RP_Authority_Edit"});
}
//return Inter.getLocText(new String[]{"Allow", "DashBoard-Potence", "Edit"});
} }
@Override @Override
@ -727,7 +737,7 @@ public class KeySetUtils {
@Override @Override
public String getMenuName() { public String getMenuName() {
return Inter.getLocText("M-Cell"); return Inter.getLocText("FR-Designer_Cell");
} }
@Override @Override
@ -761,7 +771,7 @@ public class KeySetUtils {
@Override @Override
public String getMenuName() { public String getMenuName() {
return Inter.getLocText("Widget-Settings"); return Inter.getLocText("FR-Designer_Widget-Settings");
} }
@Override @Override
@ -795,7 +805,7 @@ public class KeySetUtils {
@Override @Override
public String getMenuName() { public String getMenuName() {
return Inter.getLocText("Condition_Attributes"); return Inter.getLocText("FR-Designer_Condition_Attributes");
} }
@Override @Override
@ -812,7 +822,7 @@ public class KeySetUtils {
@Override @Override
public String getMenuName() { public String getMenuName() {
return Inter.getLocText("Present"); return Inter.getLocText("FR-Chart-Style_Present");
} }
@Override @Override
@ -880,7 +890,7 @@ public class KeySetUtils {
@Override @Override
public String getMenuName() { public String getMenuName() {
return Inter.getLocText("Currency_Line"); return Inter.getLocText("FR-Designer_Currency_Line");
} }
@Override @Override

50
designer_base/src/com/fr/design/style/AbstractPopBox.java

@ -9,6 +9,7 @@ import javax.swing.*;
import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener; import javax.swing.event.ChangeListener;
import java.awt.*; import java.awt.*;
import java.awt.event.AWTEventListener;
import java.awt.event.MouseAdapter; import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
import java.util.ArrayList; import java.util.ArrayList;
@ -35,25 +36,16 @@ public abstract class AbstractPopBox extends JPanel {
showPopupMenu(); showPopupMenu();
} }
public void mouseExited(MouseEvent evt) {
int x= evt.getXOnScreen();//mac和widows的计算结果还不一样 };
int y = evt.getYOnScreen();
if (selectPopupWindow != null) { AWTEventListener awt = new AWTEventListener() {
Rectangle rectangle = selectPopupWindow.getBounds(); public void eventDispatched(AWTEvent event) {
boolean b1 = x < rectangle.x - GAP || x > rectangle.x + rectangle.width + GAP; if (event instanceof MouseEvent) {
boolean b2 = y < rectangle.y - GAP || y >rectangle.y + rectangle.height + GAP; MouseEvent evt = (MouseEvent) event;
if(b1 || b2) { if (evt.getClickCount() > 0) {
hidePopupMenu(); mouseClick(evt);
} }
// if (OperatingSystem.isWindows()) {
//
// }else{
// Point pp = SwingUtilities.convertPoint(evt.getComponent(), evt.getPoint(), selectPopupWindow.getParent());
// Rectangle rectangle = selectPopupWindow.getBounds();
// if (pp.getY() < rectangle.getY() || pp.getY() > rectangle.getY() + rectangle.getHeight()) {
// //hidePopupMenu();
// }
// }
} }
} }
}; };
@ -67,6 +59,7 @@ public abstract class AbstractPopBox extends JPanel {
if (!this.isEnabled()) { if (!this.isEnabled()) {
return; return;
} }
Toolkit.getDefaultToolkit().addAWTEventListener(awt, AWTEvent.MOUSE_EVENT_MASK);
selectPopupWindow = this.getControlWindow(); selectPopupWindow = this.getControlWindow();
@ -83,7 +76,7 @@ public abstract class AbstractPopBox extends JPanel {
y = y - selectPopupWindow.getHeight() - GAP2;// 超过屏幕高度了 y = y - selectPopupWindow.getHeight() - GAP2;// 超过屏幕高度了
} }
if(width > screenSize.width) { if (width > screenSize.width) {
x = screenSize.width - selectPopupWindow.getWidth(); x = screenSize.width - selectPopupWindow.getWidth();
} }
selectPopupWindow.setLocation(x, y); selectPopupWindow.setLocation(x, y);
@ -103,12 +96,14 @@ public abstract class AbstractPopBox extends JPanel {
} }
private void mouseClick(MouseEvent evt) { private void mouseClick(MouseEvent evt) {
int x = evt.getLocationOnScreen().x; Point point = new Point((int) (evt.getLocationOnScreen().getX()), (int) evt.getLocationOnScreen().getY());
int y = evt.getLocationOnScreen().y; Dimension popBoxD = AbstractPopBox.this.getSize();
Rectangle rectangle = this.getControlWindow().getBounds(); Point popBoxP = AbstractPopBox.this.getLocationOnScreen();
boolean b1 = x < rectangle.x || x > rectangle.x + rectangle.width; Dimension popMenuD = this.getControlWindow().getSize();
boolean b2 = y < rectangle.y || y > rectangle.y + rectangle.height; Point popMenuP = this.getControlWindow().getLocation();
if (b1 || b2) { Rectangle popBoxRect = new Rectangle(popBoxP, popBoxD);
Rectangle popMenuRect = new Rectangle(popMenuP, popMenuD);
if (!popBoxRect.contains(point) && !popMenuRect.contains(point)) {
this.hidePopupMenu(); this.hidePopupMenu();
} }
} }
@ -119,6 +114,7 @@ public abstract class AbstractPopBox extends JPanel {
} }
selectPopupWindow = null; selectPopupWindow = null;
Toolkit.getDefaultToolkit().removeAWTEventListener(awt);
} }
protected JWindow getControlWindow() { protected JWindow getControlWindow() {
@ -152,6 +148,7 @@ public abstract class AbstractPopBox extends JPanel {
/** /**
* 添加事件 * 添加事件
*
* @param changeListener 事件 * @param changeListener 事件
*/ */
public void addSelectChangeListener(ChangeListener changeListener) { public void addSelectChangeListener(ChangeListener changeListener) {
@ -160,6 +157,7 @@ public abstract class AbstractPopBox extends JPanel {
/** /**
* 删除事件 * 删除事件
*
* @param changeListener 事件 * @param changeListener 事件
*/ */
public void removeSelectChangeListener(ChangeListener changeListener) { public void removeSelectChangeListener(ChangeListener changeListener) {
@ -180,6 +178,7 @@ public abstract class AbstractPopBox extends JPanel {
/** /**
* 待说明 * 待说明
*
* @param background 背景 * @param background 背景
*/ */
public void fireDisplayComponent(Background background) { public void fireDisplayComponent(Background background) {
@ -192,6 +191,7 @@ public abstract class AbstractPopBox extends JPanel {
/** /**
* 初始化弹出框的面板 * 初始化弹出框的面板
*
* @param preWidth 宽度 * @param preWidth 宽度
* @return 弹出面板 * @return 弹出面板
*/ */

5
designer_base/src/com/fr/design/style/color/NewColorSelectPane.java

@ -93,7 +93,10 @@ public class NewColorSelectPane extends BasicPane implements ColorSelectable {
} }
centerPane.add(Box.createVerticalStrut(1)); centerPane.add(Box.createVerticalStrut(1));
UIButton customButton = new UIButton(Inter.getLocText(new String[]{"More", "Color"}) + "...");
// mod by anchore 16/11/16
UIButton customButton = new UIButton(Inter.getLocText("FR-Designer-Basic_More_Color"));
//UIButton customButton = new UIButton(Inter.getLocText(new String[]{"More", "Color"}) + "...");
customButton.addMouseListener(new MouseAdapter() { customButton.addMouseListener(new MouseAdapter() {
@Override @Override

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

@ -31,6 +31,7 @@ import com.fr.plugin.Plugin;
import com.fr.plugin.PluginLicense; import com.fr.plugin.PluginLicense;
import com.fr.plugin.PluginLicenseManager; import com.fr.plugin.PluginLicenseManager;
import com.fr.plugin.PluginLoader; import com.fr.plugin.PluginLoader;
import com.fr.share.ShareConstants;
import com.fr.stable.*; import com.fr.stable.*;
import com.fr.stable.file.XMLFileManagerProvider; import com.fr.stable.file.XMLFileManagerProvider;
import com.fr.stable.project.ProjectConstants; import com.fr.stable.project.ProjectConstants;
@ -1535,6 +1536,7 @@ public class RemoteEnv implements Env {
para.put("op", "fr_remote_design"); para.put("op", "fr_remote_design");
para.put("cmd", "design_save_resource"); para.put("cmd", "design_save_resource");
para.put("resource", mgr.fileName()); para.put("resource", mgr.fileName());
para.put("class_name", mgr.getClass().getName());
para.put("current_uid", this.createUserID()); para.put("current_uid", this.createUserID());
para.put("currentUsername", this.getUser()); para.put("currentUsername", this.getUser());
@ -2107,7 +2109,7 @@ public class RemoteEnv implements Env {
@Override @Override
public File[] loadREUFile() throws Exception { public File[] loadREUFile() throws Exception {
File target = new File(CacheManager.getProviderInstance().getCacheDirectory(), File target = new File(CacheManager.getProviderInstance().getCacheDirectory(),
"fr_share"); ShareConstants.DIR_SHARE_CACHE);
StableUtils.deleteFile(target); StableUtils.deleteFile(target);
StableUtils.mkdirs(target); StableUtils.mkdirs(target);
File cacheDir = null; File cacheDir = null;
@ -2122,7 +2124,7 @@ public class RemoteEnv implements Env {
HttpClient client = createHttpMethod(para); HttpClient client = createHttpMethod(para);
InputStream input = client.getResponseStream(); InputStream input = client.getResponseStream();
zip = new File(StableUtils.pathJoin(CacheManager.getProviderInstance().getCacheDirectory().getAbsolutePath()), "share.zip"); zip = new File(StableUtils.pathJoin(CacheManager.getProviderInstance().getCacheDirectory().getAbsolutePath()), "share.zip");
cacheDir = new File(StableUtils.pathJoin(CacheManager.getProviderInstance().getCacheDirectory().getAbsolutePath()), "fr_share"); cacheDir = new File(StableUtils.pathJoin(CacheManager.getProviderInstance().getCacheDirectory().getAbsolutePath()), ShareConstants.DIR_SHARE_CACHE);
StableUtils.deleteFile(cacheDir); StableUtils.deleteFile(cacheDir);
StableUtils.mkdirs(cacheDir); StableUtils.mkdirs(cacheDir);
StableUtils.makesureFileExist(zip); StableUtils.makesureFileExist(zip);
@ -2146,4 +2148,65 @@ public class RemoteEnv implements Env {
} }
return new File[0]; return new File[0];
} }
@Override
public boolean installREUFile(File reuFile) {
// if (reuFile == null) {
// return false;
// }
// try {
// HashMap<String, String> para = new HashMap<String, String>();
// para.put("op", "fr_remote_design");
// para.put("cmd", "design_install_reufile");
// para.put("current_uid", this.createUserID());
// para.put("currentUsername", this.getUser());
// para.put("reuFileName", reuFile.getName());
//
// HttpClient client = createHttpMethod(para);
// client.setContent(IOUtils.inputStream2Bytes(new FileInputStream(reuFile)));
// InputStream input = execute4InputStream(client);
// return ComparatorUtils.equals(stream2String(input), "true");
// } catch (Exception e) {
// return false;
// }
return false;
}
@Override
public boolean removeREUFilesByName(String fileName) {
if (StringUtils.isEmpty(fileName)) {
return true;
}
try {
HashMap<String, String> para = new HashMap<String, String>();
para.put("op", "fr_remote_design");
para.put("cmd", "design_remove_reufile");
para.put("current_uid", this.createUserID());
para.put("currentUsername", this.getUser());
para.put("reuFileName", fileName);
HttpClient client = createHttpMethod(para);
InputStream input = execute4InputStream(client);
return ComparatorUtils.equals(stream2String(input), "true");
} catch (Exception e) {
return false;
}
}
@Override
public String getSharePath() {
try {
HashMap<String, String> para = new HashMap<String, String>();
para.put("op", "fr_remote_design");
para.put("cmd", "design_get_share_path");
para.put("current_uid", this.createUserID());
para.put("currentUsername", this.getUser());
HttpClient client = createHttpMethod(para);
InputStream input = execute4InputStream(client);
return stream2String(input);
} catch (Exception e) {
return StringUtils.EMPTY;
}
}
} }

49
designer_chart/.classpath

@ -1,20 +1,43 @@
<?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="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 combineaccessrules="false" exported="true" kind="src" path="/designer_base"/> <classpathentry combineaccessrules="false" exported="true" kind="src" path="/designer_base"/>
<classpathentry combineaccessrules="false" kind="src" path="/base-stable"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry combineaccessrules="false" kind="src" path="/base-basic"/> <classpathentry kind="lib" path="D:/code/finedesignlib/3rd.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/base-calculate"/> <classpathentry kind="lib" path="D:/code/finedesignlib/ant-junit.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/chart-base"/> <classpathentry kind="lib" path="D:/code/finedesignlib/cglib-nodep-2.2.2.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/chart-chartattr"/> <classpathentry kind="lib" path="D:/code/finedesignlib/commons-codec-1.6.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/chart-chartglyph"/> <classpathentry kind="lib" path="D:/code/finedesignlib/commons-logging-1.2.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/chart-web"/> <classpathentry kind="lib" path="D:/code/finedesignlib/easymock-3.2.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/chart-chartdata"/> <classpathentry kind="lib" path="D:/code/finedesignlib/hamcrest-core-1.3.jar"/>
<classpathentry kind="lib" path="/lib/3rd.jar" sourcepath="/lookandfeel"/> <classpathentry kind="lib" path="D:/code/finedesignlib/jamm.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/base-data"/> <classpathentry kind="lib" path="D:/code/finedesignlib/jna.jar"/>
<classpathentry kind="lib" path="/lib/poi2007_fat.jar"/> <classpathentry kind="lib" path="D:/code/finedesignlib/jts-1.13.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/junit.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/junit-4.12.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/mysql-connector-java-5.1.6-bin.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/objenesis-2.1.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/ojdbc14.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/olap4j-1.1.0.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/olap4j-xmla-1.1.0.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/postgresql-8.0-311.jdbc3.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/quartz.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/sapjco.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/sapjco3.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/servlet-api.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/sqlite-jdbc.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/sqljdbc.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/swag.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/swexpl.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/swt.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/Sybelux.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/xercesImpl.jar"/>
<classpathentry kind="lib" path="D:/code/fr-chart-8.0.jar"/>
<classpathentry kind="lib" path="D:/code/fr-core-8.0.jar"/>
<classpathentry kind="lib" path="D:/code/fr-performance-8.0.jar"/>
<classpathentry kind="lib" path="D:/code/fr-platform-8.0.jar"/>
<classpathentry kind="lib" path="D:/code/fr-report-8.0.jar"/>
<classpathentry kind="lib" path="D:/code/fr-third-8.0.jar"/>
<classpathentry kind="output" path="bin"/> <classpathentry kind="output" path="bin"/>
</classpath> </classpath>

1
designer_chart/src/com/fr/design/mainframe/chart/gui/ChartDataPane.java

@ -109,5 +109,4 @@ public class ChartDataPane extends AbstractChartAttrPane {
public void refreshChartDataPane(ChartCollection collection){ public void refreshChartDataPane(ChartCollection collection){
this.populate(collection); this.populate(collection);
} }
} }

44
designer_form/.classpath

@ -1,15 +1,43 @@
<?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="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" kind="src" path="/base"/>
<classpathentry combineaccessrules="false" kind="src" path="/form"/>
<classpathentry combineaccessrules="false" kind="src" path="/designer_base"/> <classpathentry combineaccessrules="false" kind="src" path="/designer_base"/>
<classpathentry combineaccessrules="false" kind="src" path="/base-stable"/> <classpathentry kind="lib" path="D:/code/fr-chart-8.0.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/base-basic"/> <classpathentry kind="lib" path="D:/code/fr-core-8.0.jar"/>
<classpathentry kind="lib" path="/lib/3rd.jar"/> <classpathentry kind="lib" path="D:/code/fr-performance-8.0.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/base-calculate"/> <classpathentry kind="lib" path="D:/code/fr-platform-8.0.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/base-data"/> <classpathentry kind="lib" path="D:/code/fr-report-8.0.jar"/>
<classpathentry kind="lib" path="D:/code/fr-third-8.0.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/3rd.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/ant-junit.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/cglib-nodep-2.2.2.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/commons-codec-1.6.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/commons-logging-1.2.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/easymock-3.2.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/hamcrest-core-1.3.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jamm.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jna.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jts-1.13.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/junit.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/junit-4.12.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/mysql-connector-java-5.1.6-bin.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/objenesis-2.1.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/ojdbc14.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/olap4j-1.1.0.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/olap4j-xmla-1.1.0.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/postgresql-8.0-311.jdbc3.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/quartz.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/sapjco.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/sapjco3.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/servlet-api.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/sqlite-jdbc.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/sqljdbc.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/swag.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/swexpl.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/swt.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/Sybelux.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/xercesImpl.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="bin"/> <classpathentry kind="output" path="bin"/>
</classpath> </classpath>

2
designer_form/src/com/fr/design/mainframe/CoverReportPane.java

@ -3,7 +3,7 @@ package com.fr.design.mainframe;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.icon.IconPathConstants; import com.fr.design.icon.IconPathConstants;
import com.fr.form.share.ShareConstants; import com.fr.share.ShareConstants;
import com.fr.general.FRScreen; import com.fr.general.FRScreen;
import com.fr.general.IOUtils; import com.fr.general.IOUtils;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;

9
designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java

@ -16,6 +16,7 @@ import com.fr.form.ui.ElCaseBindInfo;
import com.fr.general.FRLogger; import com.fr.general.FRLogger;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.general.SiteCenter; import com.fr.general.SiteCenter;
import com.fr.share.ShareConstants;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
@ -359,18 +360,22 @@ public class FormWidgetDetailPane extends FormDockView{
} }
private void installFromDiskZipFile(File chosenFile) { private void installFromDiskZipFile(File chosenFile) {
if (chosenFile != null && chosenFile.getName().endsWith(ShareConstants.SUFFIX_MODULE)) {
try { try {
ShareLoader.getLoader().installModuleFromDiskZipFile(chosenFile); if (ShareLoader.getLoader().installModuleFromDiskZipFile(chosenFile)) {
refreshShareMoudule(); refreshShareMoudule();
elCaseBindInfoList = ShareLoader.getLoader().getAllBindInfoList(); elCaseBindInfoList = ShareLoader.getLoader().getAllBindInfoList();
refreshDownPanel(false); refreshDownPanel(false);
refreshComboxData(); refreshComboxData();
JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Share_Module_OK")); JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Share_Module_OK"));
} else {
JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Share_Module_Error"));
}
} catch (IOException e) { } catch (IOException e) {
JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Share_Module_Error")); JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Share_Module_Error"));
FRLogger.getLogger().error(e.getMessage(), e); FRLogger.getLogger().error(e.getMessage(), e);
} }
}
} }
private void refreshShareMoudule() { private void refreshShareMoudule() {

4
designer_form/src/com/fr/design/mainframe/ShareWidgetButton.java

@ -1,12 +1,10 @@
package com.fr.design.mainframe; package com.fr.design.mainframe;
import com.fr.base.*; import com.fr.base.*;
import com.fr.design.constants.UIConstants;
import com.fr.design.designer.creator.XCreator; import com.fr.design.designer.creator.XCreator;
import com.fr.design.designer.creator.XCreatorUtils; import com.fr.design.designer.creator.XCreatorUtils;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.icon.IconPathConstants; import com.fr.share.ShareConstants;
import com.fr.form.share.ShareConstants;
import com.fr.form.share.ShareLoader; import com.fr.form.share.ShareLoader;
import com.fr.form.ui.ElCaseBindInfo; import com.fr.form.ui.ElCaseBindInfo;
import com.fr.form.ui.Widget; import com.fr.form.ui.Widget;

Loading…
Cancel
Save