hzzz 7 years ago
parent
commit
9c02dfbacd
  1. 26
      designer-base/src/com/fr/design/actions/file/LocalePane.java
  2. 4
      designer-base/src/com/fr/design/actions/help/AboutPane.java
  3. 2
      designer-base/src/com/fr/design/actions/help/alphafine/AlphaFineConfigManager.java
  4. 16
      designer-base/src/com/fr/design/data/DesignTableDataManager.java
  5. 7
      designer-base/src/com/fr/design/data/datapane/ChoosePane.java
  6. 4
      designer-base/src/com/fr/design/data/datapane/connect/DatabaseConnectionPane.java
  7. 3
      designer-base/src/com/fr/design/data/datapane/preview/PreviewTablePane.java
  8. 38
      designer-base/src/com/fr/design/data/tabledata/tabledatapane/ProcedureDataPane.java
  9. 18
      designer-base/src/com/fr/design/data/tabledata/wrapper/StoreProcedureDataWrapper.java
  10. 5
      designer-base/src/com/fr/design/extra/PluginWebBridge.java
  11. 37
      designer-base/src/com/fr/design/extra/WebViewDlgHelper.java
  12. 9
      designer-base/src/com/fr/design/file/HistoryTemplateListPane.java
  13. 37
      designer-base/src/com/fr/design/file/TemplateTreePane.java
  14. 16
      designer-base/src/com/fr/design/formula/JavaEditorPane.java
  15. 11
      designer-base/src/com/fr/design/gui/ilist/TableViewList.java
  16. 56
      designer-base/src/com/fr/design/gui/imenu/UIBasicMenuItemUI.java
  17. 25
      designer-base/src/com/fr/design/gui/itree/filetree/EnvFileTree.java
  18. 5
      designer-base/src/com/fr/design/gui/itree/filetree/TemplateFileTree.java
  19. 62
      designer-base/src/com/fr/design/mainframe/DesignerFrameFileDealerPane.java
  20. 21
      designer-base/src/com/fr/design/mainframe/JTemplate.java
  21. 2
      designer-base/src/com/fr/design/roleAuthority/RoleDataWrapper.java
  22. 12
      designer-base/src/com/fr/design/style/color/ColorSelectConfigManager.java
  23. 364
      designer-base/src/com/fr/env/RemoteEnv.java
  24. 50
      designer-base/src/com/fr/file/FILEChooserPane.java
  25. 37
      designer-base/src/com/fr/file/FileNodeFILE.java
  26. 22
      designer-base/src/com/fr/start/BaseDesigner.java
  27. 2
      designer-chart/src/com/fr/design/chart/ChartTypePane.java
  28. 16
      designer-chart/src/com/fr/design/chart/series/PlotSeries/MapGroupExtensionPane.java
  29. 10
      designer-realize/src/com/fr/design/mainframe/alphafine/component/AlphaFinePane.java
  30. 8
      designer-realize/src/com/fr/design/mainframe/alphafine/search/manager/impl/FileSearchManager.java
  31. 4
      designer-realize/src/com/fr/design/mainframe/errorinfo/ErrorInfoLogAppender.java
  32. 2
      designer-realize/src/com/fr/design/mainframe/errorinfo/ErrorInfoUploader.java
  33. 47
      designer-realize/src/com/fr/start/Designer.java
  34. 406
      designer-realize/src/com/fr/start/preload/ImagePreLoader.java

26
designer-base/src/com/fr/design/actions/file/LocalePane.java

@ -15,6 +15,7 @@ import com.fr.general.GeneralUtils;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
import com.fr.stable.StableUtils;
import com.fr.stable.bridge.StableFactory; import com.fr.stable.bridge.StableFactory;
import com.fr.stable.project.ProjectConstants; import com.fr.stable.project.ProjectConstants;
@ -24,6 +25,7 @@ import javax.swing.event.DocumentListener;
import javax.swing.table.DefaultTableModel; import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableRowSorter; import javax.swing.table.TableRowSorter;
import java.awt.*; import java.awt.*;
import java.io.ByteArrayInputStream;
import java.io.InputStream; import java.io.InputStream;
import java.io.OutputStream; import java.io.OutputStream;
import java.util.ArrayList; import java.util.ArrayList;
@ -183,7 +185,7 @@ public class LocalePane extends BasicPane {
if (env == null) { if (env == null) {
return; return;
} }
FileNode[] fileNodes = env.listFile(ProjectConstants.LOCALE_NAME); FileNode[] fileNodes = env.getFileOperator().list(ProjectConstants.LOCALE_NAME);
if (ArrayUtils.getLength(fileNodes) == 0) { if (ArrayUtils.getLength(fileNodes) == 0) {
return; return;
} }
@ -194,7 +196,7 @@ public class LocalePane extends BasicPane {
for (FileNode fileNode : fileNodes) { for (FileNode fileNode : fileNodes) {
String fileName = fileNode.getName(); String fileName = fileNode.getName();
if (fileName.endsWith(".properties")) { if (fileName.endsWith(".properties")) {
InputStream in = env.readBean(fileName, ProjectConstants.LOCALE_NAME); InputStream in = new ByteArrayInputStream(env.getFileOperator().read(StableUtils.pathJoin(ProjectConstants.LOCALE_NAME, fileName)));
Properties properties = new Properties(); Properties properties = new Properties();
properties.load(in); properties.load(in);
keys.addAll(properties.stringPropertyNames()); keys.addAll(properties.stringPropertyNames());
@ -234,16 +236,16 @@ public class LocalePane extends BasicPane {
properties.setProperty(GeneralUtils.objectToString(customTableModel.getValueAt(j, 0)), GeneralUtils.objectToString(customTableModel.getValueAt(j, i))); properties.setProperty(GeneralUtils.objectToString(customTableModel.getValueAt(j, 0)), GeneralUtils.objectToString(customTableModel.getValueAt(j, i)));
} }
OutputStream out = null; // OutputStream out = null;
try { // try {
out = env.writeBean(PREFIX + fileName + ".properties", ProjectConstants.LOCALE_NAME); // out = env.writeBean(PREFIX + fileName + ".properties", ProjectConstants.LOCALE_NAME);
properties.store(out, null); // properties.store(out, null);
//
out.flush(); // out.flush();
out.close(); // out.close();
} catch (Exception e) { // } catch (Exception e) {
FineLoggerFactory.getLogger().info(e.getMessage()); // FineLoggerFactory.getLogger().info(e.getMessage());
} // }
} }
} }

4
designer-base/src/com/fr/design/actions/help/AboutPane.java

@ -9,7 +9,6 @@ import com.fr.design.gui.ilable.ActionLabel;
import com.fr.design.gui.ilable.BoldFontTextLabel; import com.fr.design.gui.ilable.BoldFontTextLabel;
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.general.ComparatorUtils;
import com.fr.general.GeneralUtils; import com.fr.general.GeneralUtils;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.general.SiteCenter; import com.fr.general.SiteCenter;
@ -34,6 +33,7 @@ public class AboutPane extends JPanel {
private static final int DEFAULT_GAP = 12; private static final int DEFAULT_GAP = 12;
private static final String COPYRIGHT_LABEL = "\u00A9 "; private static final String COPYRIGHT_LABEL = "\u00A9 ";
private static final String BUILD_PREFIX = " "; private static final String BUILD_PREFIX = " ";
private static final String COMPANY_TELEPHONE = SiteCenter.getInstance().acquireUrlByKind("company_telephone");
public AboutPane() { public AboutPane() {
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
@ -90,7 +90,7 @@ public class AboutPane extends JPanel {
if (FRContext.getLocale().equals(Locale.US)) { if (FRContext.getLocale().equals(Locale.US)) {
return; return;
} }
boxCenterAlignmentPane = new BoxCenterAligmentPane(Inter.getLocText("FR-Designer_Service_Phone") + SiteCenter.getInstance().acquireUrlByKind("service.phone." + FRContext.getLocale(), ProductConstants.COMPARE_TELEPHONE)); boxCenterAlignmentPane = new BoxCenterAligmentPane(Inter.getLocText("FR-Designer_Service_Phone") + SiteCenter.getInstance().acquireUrlByKind("service.phone." + FRContext.getLocale(), COMPANY_TELEPHONE));
contentPane.add(boxCenterAlignmentPane); contentPane.add(boxCenterAlignmentPane);
// 繁体版不显示QQ // 繁体版不显示QQ
if (FRContext.getLocale().equals(Locale.TAIWAN)) { if (FRContext.getLocale().equals(Locale.TAIWAN)) {

2
designer-base/src/com/fr/design/actions/help/alphafine/AlphaFineConfigManager.java

@ -75,7 +75,7 @@ public class AlphaFineConfigManager implements XMLable {
public static boolean isALPHALicAvailable() { public static boolean isALPHALicAvailable() {
return FRContext.getCurrentEnv() != null && VT4FR.AlphaFine.support(); return FRContext.getCurrentEnv() != null && VT4FR.AlphaFine.isSupport();
} }
@Override @Override

16
designer-base/src/com/fr/design/data/DesignTableDataManager.java

@ -1,6 +1,5 @@
package com.fr.design.data; package com.fr.design.data;
import com.fr.base.Env;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.base.StoreProcedureParameter; import com.fr.base.StoreProcedureParameter;
import com.fr.base.TableData; import com.fr.base.TableData;
@ -10,6 +9,7 @@ import com.fr.data.impl.EmbeddedTableData;
import com.fr.data.impl.storeproc.ProcedureDataModel; import com.fr.data.impl.storeproc.ProcedureDataModel;
import com.fr.data.impl.storeproc.StoreProcedure; import com.fr.data.impl.storeproc.StoreProcedure;
import com.fr.data.impl.storeproc.StoreProcedureConstants; import com.fr.data.impl.storeproc.StoreProcedureConstants;
import com.fr.data.operator.DataOperator;
import com.fr.design.DesignModelAdapter; import com.fr.design.DesignModelAdapter;
import com.fr.design.data.datapane.preview.PreviewTablePane; import com.fr.design.data.datapane.preview.PreviewTablePane;
import com.fr.design.data.tabledata.wrapper.ServerTableDataWrapper; import com.fr.design.data.tabledata.wrapper.ServerTableDataWrapper;
@ -417,8 +417,7 @@ public abstract class DesignTableDataManager {
*/ */
private static EmbeddedTableData previewTableData(TableDataSource tableDataSource, TableData tabledata, int rowCount, boolean isMustInputParameters, boolean needLoadingBar) throws Exception { private static EmbeddedTableData previewTableData(TableDataSource tableDataSource, TableData tabledata, int rowCount, boolean isMustInputParameters, boolean needLoadingBar) throws Exception {
final AutoProgressBar loadingBar = PreviewTablePane.getInstance().getProgressBar(); final AutoProgressBar loadingBar = PreviewTablePane.getInstance().getProgressBar();
Env currentEnv = FRContext.getCurrentEnv(); ParameterProvider[] parameters = DataOperator.getInstance().getTableDataParameters(tabledata);
ParameterProvider[] parameters = currentEnv.getTableDataParameters(tabledata);
if (ArrayUtils.isEmpty(parameters)) { if (ArrayUtils.isEmpty(parameters)) {
parameters = tabledata.getParameters(Calculator.createCalculator()); parameters = tabledata.getParameters(Calculator.createCalculator());
} }
@ -440,13 +439,13 @@ public abstract class DesignTableDataManager {
loadingBar.start(); loadingBar.start();
} }
try { try {
for (ParameterProvider parameter : currentEnv.getTableDataParameters(tabledata)) { for (ParameterProvider parameter : DataOperator.getInstance().getTableDataParameters(tabledata)) {
if (parameterMap.containsKey(parameter.getName())) { if (parameterMap.containsKey(parameter.getName())) {
parameter.setValue(parameterMap.get(parameter.getName())); parameter.setValue(parameterMap.get(parameter.getName()));
} }
} }
return currentEnv.previewTableData(tableDataSource, tabledata, parameterMap, rowCount); return DataOperator.getInstance().previewTableData(tableDataSource, tabledata, parameterMap, rowCount);
} catch (TableDataException e) { } catch (Exception e) {
throw new TableDataException(e.getMessage(), e); throw new TableDataException(e.getMessage(), e);
} finally { } finally {
new Timer().schedule(new TimerTask() { new Timer().schedule(new TimerTask() {
@ -510,11 +509,10 @@ public abstract class DesignTableDataManager {
XMLPrintWriter writer = XMLPrintWriter.create(out); XMLPrintWriter writer = XMLPrintWriter.create(out);
// 把storeProcedure写成xml文件到out // 把storeProcedure写成xml文件到out
DataCoreXmlUtils.writeXMLStoreProcedure(writer, storeProcedure, null); DataCoreXmlUtils.writeXMLStoreProcedure(writer, storeProcedure, null);
Env currentEnv = FRContext.getCurrentEnv();
if (storeProcedure.getDataModelSize() > 0 && !storeProcedure.isFirstExpand()) { if (storeProcedure.getDataModelSize() > 0 && !storeProcedure.isFirstExpand()) {
return storeProcedure.creatLazyDataModel(); return storeProcedure.creatLazyDataModel();
} }
ParameterProvider[] inParameters = currentEnv.getStoreProcedureParameters(storeProcedure); ParameterProvider[] inParameters = DataOperator.getInstance().getStoreProcedureParameters(storeProcedure);
final Map<String, Object> parameterMap = new HashMap<String, Object>(); final Map<String, Object> parameterMap = new HashMap<String, Object>();
if (inParameters.length > 0 && !ComparatorUtils.equals(threadLocal.get(), NO_PARAMETER)) {// 检查Parameter. if (inParameters.length > 0 && !ComparatorUtils.equals(threadLocal.get(), NO_PARAMETER)) {// 检查Parameter.
final ParameterInputPane pPane = new ParameterInputPane(inParameters); final ParameterInputPane pPane = new ParameterInputPane(inParameters);
@ -529,7 +527,7 @@ public abstract class DesignTableDataManager {
if (needLoadingBar) { if (needLoadingBar) {
StoreProcedureDataWrapper.loadingBar.start(); StoreProcedureDataWrapper.loadingBar.start();
} }
return FRContext.getCurrentEnv().previewProcedureDataModel(storeProcedure, parameterMap, 0); return DataOperator.getInstance().previewProcedureDataModel(storeProcedure, parameterMap, 0);
} }
public static void setThreadLocal(String value) { public static void setThreadLocal(String value) {

7
designer-base/src/com/fr/design/data/datapane/ChoosePane.java

@ -9,6 +9,7 @@ import com.fr.data.core.db.TableProcedure;
import com.fr.data.core.db.dialect.DialectFactory; import com.fr.data.core.db.dialect.DialectFactory;
import com.fr.data.impl.Connection; import com.fr.data.impl.Connection;
import com.fr.data.impl.DBTableData; import com.fr.data.impl.DBTableData;
import com.fr.data.operator.DataOperator;
import com.fr.dav.LocalEnv; import com.fr.dav.LocalEnv;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.BasicBeanPane;
@ -449,7 +450,7 @@ public class ChoosePane extends BasicBeanPane<DataBaseItems> implements Refresha
return TableData.EMPTY_TABLEDATA; return TableData.EMPTY_TABLEDATA;
} }
try { try {
connect = FRContext.getCurrentEnv().testConnection(database); connect = DataOperator.getInstance().testConnection(database);
} catch (Exception ignored) { } catch (Exception ignored) {
} }
if (!connect) { if (!connect) {
@ -468,7 +469,7 @@ public class ChoosePane extends BasicBeanPane<DataBaseItems> implements Refresha
} else { } else {
try { try {
TableData tableDataLocal = new DBTableData(database, DataCoreUtils.createSelectSQL(paras.getSchemaName(), paras.getTableName(), DialectFactory.getDialectByName(paras.getDatabaseName()))); TableData tableDataLocal = new DBTableData(database, DataCoreUtils.createSelectSQL(paras.getSchemaName(), paras.getTableName(), DialectFactory.getDialectByName(paras.getDatabaseName())));
tableData = FRContext.getCurrentEnv().previewTableData(tableDataLocal, java.util.Collections.EMPTY_MAP, tableData = DataOperator.getInstance().previewTableData(tableDataLocal, java.util.Collections.EMPTY_MAP,
DesignerEnvManager.getEnvManager().getMaxNumberOrPreviewRow()); DesignerEnvManager.getEnvManager().getMaxNumberOrPreviewRow());
} catch (Exception e) { } catch (Exception e) {
failedToFindTable(); failedToFindTable();
@ -524,7 +525,7 @@ public class ChoosePane extends BasicBeanPane<DataBaseItems> implements Refresha
} }
try { try {
// daniel:增加参数 // daniel:增加参数
colNames = FRContext.getCurrentEnv().getColumns(selectedDSName, paras.getSchemaName(), selectedTableObject); colNames = DataOperator.getInstance().getColumns(selectedDSName, paras.getSchemaName(), selectedTableObject);
} catch (Exception e2) { } catch (Exception e2) {
FRContext.getLogger().error(e2.getMessage(), e2); FRContext.getLogger().error(e2.getMessage(), e2);
} }

4
designer-base/src/com/fr/design/data/datapane/connect/DatabaseConnectionPane.java

@ -3,9 +3,9 @@
*/ */
package com.fr.design.data.datapane.connect; package com.fr.design.data.datapane.connect;
import com.fr.base.FRContext;
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.data.operator.DataOperator;
import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icombobox.UIComboBox;
@ -118,7 +118,7 @@ public abstract class DatabaseConnectionPane<E extends com.fr.data.impl.Connecti
protected Object doInBackground() throws Exception { protected Object doInBackground() throws Exception {
try { try {
com.fr.data.impl.Connection database = DatabaseConnectionPane.this.updateBean(); com.fr.data.impl.Connection database = DatabaseConnectionPane.this.updateBean();
boolean connect = FRContext.getCurrentEnv().testConnection(database); boolean connect = DataOperator.getInstance().testConnection(database);
okButton.setEnabled(true); okButton.setEnabled(true);
message.setText(database.connectMessage(connect)); message.setText(database.connectMessage(connect));
} catch (Exception exp) { } catch (Exception exp) {

3
designer-base/src/com/fr/design/data/datapane/preview/PreviewTablePane.java

@ -10,6 +10,7 @@ import com.fr.data.TableDataSource;
import com.fr.data.impl.DBTableData; import com.fr.data.impl.DBTableData;
import com.fr.data.impl.EmbeddedTableData; import com.fr.data.impl.EmbeddedTableData;
import com.fr.data.impl.storeproc.ProcedureDataModel; import com.fr.data.impl.storeproc.ProcedureDataModel;
import com.fr.data.operator.DataOperator;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.design.data.DesignTableDataManager; import com.fr.design.data.DesignTableDataManager;
import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.BasicDialog;
@ -358,7 +359,7 @@ public class PreviewTablePane extends BasicPane {
protected PreviewTableModel doInBackground() throws Exception { protected PreviewTableModel doInBackground() throws Exception {
connectionBar.start(); connectionBar.start();
if (tableData instanceof DBTableData) { if (tableData instanceof DBTableData) {
boolean status = FRContext.getCurrentEnv().testConnection(((DBTableData) tableData).getDatabase()); boolean status = DataOperator.getInstance().testConnection(((DBTableData) tableData).getDatabase());
if (!status) { if (!status) {
connectionBar.close(); connectionBar.close();
throw new Exception(Inter.getLocText("Datasource-Connection_failed")); throw new Exception(Inter.getLocText("Datasource-Connection_failed"));

38
designer-base/src/com/fr/design/data/tabledata/tabledatapane/ProcedureDataPane.java

@ -1,25 +1,12 @@
package com.fr.design.data.tabledata.tabledatapane; package com.fr.design.data.tabledata.tabledatapane;
import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.swing.*;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.FRContext;
import com.fr.base.StoreProcedureParameter; import com.fr.base.StoreProcedureParameter;
import com.fr.data.core.db.TableProcedure; import com.fr.data.core.db.TableProcedure;
import com.fr.data.impl.Connection; import com.fr.data.impl.Connection;
import com.fr.data.impl.NameDatabaseConnection; import com.fr.data.impl.NameDatabaseConnection;
import com.fr.data.impl.storeproc.StoreProcedure; import com.fr.data.impl.storeproc.StoreProcedure;
import com.fr.data.operator.DataOperator;
import com.fr.design.actions.UpdateAction; import com.fr.design.actions.UpdateAction;
import com.fr.design.border.UIRoundedBorder; import com.fr.design.border.UIRoundedBorder;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
@ -46,6 +33,16 @@ import com.fr.script.Calculator;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class ProcedureDataPane extends AbstractTableDataPane<StoreProcedure> implements ResponseDataSourceChange { public class ProcedureDataPane extends AbstractTableDataPane<StoreProcedure> implements ResponseDataSourceChange {
private static final String[] DRIVERS = { private static final String[] DRIVERS = {
"oracle.jdbc.driver.OracleDriver", "oracle.jdbc.driver.OracleDriver",
@ -194,7 +191,7 @@ public class ProcedureDataPane extends AbstractTableDataPane<StoreProcedure> imp
try { try {
storeProcedureContext.setText(StringUtils.EMPTY); storeProcedureContext.setText(StringUtils.EMPTY);
String connectionname = connectionTableProcedurePane.getSelectedDatabaseConnnectonName(); String connectionname = connectionTableProcedurePane.getSelectedDatabaseConnnectonName();
String procedureText = FRContext.getCurrentEnv().getProcedureText(connectionname, storeprocedure.getQuery()); String procedureText = DataOperator.getInstance().getProcedureText(connectionname, storeprocedure.getQuery());
storeProcedureContext.setText(procedureText); storeProcedureContext.setText(procedureText);
warningLabel.setText(StringUtils.EMPTY); warningLabel.setText(StringUtils.EMPTY);
} catch (Exception ex) { } catch (Exception ex) {
@ -301,7 +298,7 @@ public class ProcedureDataPane extends AbstractTableDataPane<StoreProcedure> imp
text = text.trim(); text = text.trim();
String connectionname = this.connectionTableProcedurePane.getSelectedDatabaseConnnectonName(); String connectionname = this.connectionTableProcedurePane.getSelectedDatabaseConnnectonName();
try { try {
String procedureText = FRContext.getCurrentEnv().getProcedureText(this.connectionTableProcedurePane.getSelectedDatabaseConnnectonName(), text); String procedureText = DataOperator.getInstance().getProcedureText(this.connectionTableProcedurePane.getSelectedDatabaseConnnectonName(), text);
// 获取参数默认值,例如:NAME in varchar2 default 'SCOTT',默认值为SCOTT // 获取参数默认值,例如:NAME in varchar2 default 'SCOTT',默认值为SCOTT
String parameterDefaultValue = ""; String parameterDefaultValue = "";
@ -315,22 +312,17 @@ public class ProcedureDataPane extends AbstractTableDataPane<StoreProcedure> imp
} }
StoreProcedureParameter[] newparameters; StoreProcedureParameter[] newparameters;
newparameters = FRContext.getCurrentEnv().getStoreProcedureDeclarationParameters(connectionname, text, parameterDefaultValue); newparameters = DataOperator.getInstance().getStoreProcedureDeclarationParameters(connectionname, text, parameterDefaultValue);
editorPane.populate(newparameters); editorPane.populate(newparameters);
storeProcedureContext.setText(procedureText); storeProcedureContext.setText(procedureText);
warningLabel.setText(""); warningLabel.setText("");
} catch (SQLException sql) {
warningLabel.setText(Inter.getLocText(new String[]{"Database", "Datasource-Connection_failed"}));
storeProcedureContext.setText("");
editorPane.populate(new StoreProcedureParameter[0]);
} catch (Exception e) { } catch (Exception e) {
warningLabel.setText(e.getMessage()); warningLabel.setText(Inter.getLocText(new String[]{"Database", "Datasource-Connection_failed"}));
storeProcedureContext.setText(""); storeProcedureContext.setText("");
editorPane.populate(new StoreProcedureParameter[0]); editorPane.populate(new StoreProcedureParameter[0]);
} }
return;
} }
/** /**

18
designer-base/src/com/fr/design/data/tabledata/wrapper/StoreProcedureDataWrapper.java

@ -1,19 +1,11 @@
package com.fr.design.data.tabledata.wrapper; package com.fr.design.data.tabledata.wrapper;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.concurrent.CancellationException;
import javax.swing.Icon;
import javax.swing.JOptionPane;
import javax.swing.SwingWorker;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.base.TableData; import com.fr.base.TableData;
import com.fr.data.impl.storeproc.ProcedureDataModel; import com.fr.data.impl.storeproc.ProcedureDataModel;
import com.fr.data.impl.storeproc.StoreProcedure; import com.fr.data.impl.storeproc.StoreProcedure;
import com.fr.data.operator.DataOperator;
import com.fr.design.data.DesignTableDataManager; import com.fr.design.data.DesignTableDataManager;
import com.fr.design.data.datapane.preview.PreviewTablePane; import com.fr.design.data.datapane.preview.PreviewTablePane;
import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.BasicDialog;
@ -24,6 +16,12 @@ import com.fr.design.mainframe.DesignerContext;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.Inter; import com.fr.general.Inter;
import javax.swing.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.concurrent.CancellationException;
/** /**
* <code>StoreProcedureDataWrappe</code> 存储过程的一个返回数据集,不是它本身<br> * <code>StoreProcedureDataWrappe</code> 存储过程的一个返回数据集,不是它本身<br>
* Oracle数据库肯定有它SQL SERVER就不一定有了,大部分情况下都没有. * Oracle数据库肯定有它SQL SERVER就不一定有了,大部分情况下都没有.
@ -191,7 +189,7 @@ public final class StoreProcedureDataWrapper implements TableDataWrapper {
worker = new SwingWorker<Void, Void>() { worker = new SwingWorker<Void, Void>() {
protected Void doInBackground() throws Exception { protected Void doInBackground() throws Exception {
connectionBar.start(); connectionBar.start();
boolean status = FRContext.getCurrentEnv().testConnection(((StoreProcedure) getTableData()).getDatabaseConnection()); boolean status = DataOperator.getInstance().testConnection(((StoreProcedure) getTableData()).getDatabaseConnection());
if (!status) { if (!status) {
connectionBar.close(); connectionBar.close();
// bug 61345 预览失败时,关闭窗口 // bug 61345 预览失败时,关闭窗口

5
designer-base/src/com/fr/design/extra/PluginWebBridge.java

@ -559,6 +559,11 @@ public class PluginWebBridge {
uiLabel.setText(Inter.getLocText("FR-Base_UnSignIn")); uiLabel.setText(Inter.getLocText("FR-Base_UnSignIn"));
} }
public void updatePluginStore(final JSObject callback){
JSCallback jsCallback = new JSCallback(webEngine, callback);
jsCallback.execute(StringUtils.EMPTY);
}
/** /**
* 初始化设计器部分 * 初始化设计器部分
*/ */

37
designer-base/src/com/fr/design/extra/WebViewDlgHelper.java

@ -17,7 +17,9 @@ import com.fr.log.FineLoggerFactory;
import com.fr.plugin.PluginStoreConstants; import com.fr.plugin.PluginStoreConstants;
import com.fr.plugin.PluginVerifyException; import com.fr.plugin.PluginVerifyException;
import com.fr.stable.EnvChangedListener; import com.fr.stable.EnvChangedListener;
import com.fr.stable.ProductConstants;
import com.fr.stable.StableUtils; import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils;
import javax.swing.JOptionPane; import javax.swing.JOptionPane;
import javax.swing.SwingWorker; import javax.swing.SwingWorker;
@ -44,7 +46,7 @@ public class WebViewDlgHelper {
private static final int VERSION_8 = 8; private static final int VERSION_8 = 8;
private static String installHome = FRContext.getCurrentEnv().getWebReportPath(); private static String installHome = FRContext.getCurrentEnv().getWebReportPath();
private static final String MAIN_JS_PATH = "/scripts/plugin.html"; private static final String MAIN_JS_PATH = "/scripts/plugin.html";
private static final int BYTES_NUM = 1024; private static final String ENV_VERSION = "ENV_VERSION";
static { static {
GeneralContext.addEnvChangedListener(new EnvChangedListener() { GeneralContext.addEnvChangedListener(new EnvChangedListener() {
@ -70,10 +72,24 @@ public class WebViewDlgHelper {
if (rv == JOptionPane.OK_OPTION) { if (rv == JOptionPane.OK_OPTION) {
downloadShopScripts(SHOP_SCRIPTS); downloadShopScripts(SHOP_SCRIPTS);
} }
} else { }
showPluginDlg(); String jar_version = PluginStoreConstants.getInstance().getProps(ENV_VERSION, StringUtils.EMPTY);
if (ComparatorUtils.equals(jar_version, ProductConstants.VERSION)) {
updateShopScripts(SHOP_SCRIPTS); updateShopScripts(SHOP_SCRIPTS);
} else {
int rv = JOptionPane.showConfirmDialog(
null,
Inter.getLocText("Fine-Plugin_Shop_Need_Install_Version"),
Inter.getLocText("FR-Designer-Plugin_Warning"),
JOptionPane.OK_CANCEL_OPTION,
JOptionPane.INFORMATION_MESSAGE
);
if (rv == JOptionPane.OK_OPTION) {
downloadShopScripts(SHOP_SCRIPTS);
deleteExtraFile(StableUtils.pathJoin(installHome, "plugin.html"));
}
} }
} else { } else {
BasicPane traditionalStorePane = new BasicPane() { BasicPane traditionalStorePane = new BasicPane() {
@Override @Override
@ -109,6 +125,16 @@ public class WebViewDlgHelper {
} }
} }
/**
* 删除9.0工程下无用的plugin.html文件
*
* @param filePath 待删除文件路径
*/
private static void deleteExtraFile(String filePath){
CommonIOUtils.deleteFile(new File(filePath));
}
/** /**
* 以关键词打开设计器商店 * 以关键词打开设计器商店
* *
@ -252,12 +278,10 @@ public class WebViewDlgHelper {
try { try {
if (get()) { if (get()) {
String relativePath = "/scripts/plugin.html";
IOUtils.unzip(new File(StableUtils.pathJoin(PluginConstants.DOWNLOAD_PATH, PluginConstants.TEMP_FILE)), installHome); IOUtils.unzip(new File(StableUtils.pathJoin(PluginConstants.DOWNLOAD_PATH, PluginConstants.TEMP_FILE)), installHome);
copyMainFile(StableUtils.pathJoin(installHome, relativePath));
// TODO: 2017/4/17 删除之前存放在安装目录下的script
PluginStoreConstants.refreshProps(); // 下载完刷新一下版本号等 PluginStoreConstants.refreshProps(); // 下载完刷新一下版本号等
JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Designer-Plugin_Shop_Installed"), Inter.getLocText("FR-Designer_Tooltips"), JOptionPane.INFORMATION_MESSAGE); JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Designer-Plugin_Shop_Installed"), Inter.getLocText("FR-Designer_Tooltips"), JOptionPane.INFORMATION_MESSAGE);
showPluginDlg();
} }
} catch (InterruptedException | ExecutionException e) { } catch (InterruptedException | ExecutionException e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e); FineLoggerFactory.getLogger().error(e.getMessage(), e);
@ -290,6 +314,7 @@ public class WebViewDlgHelper {
} }
} }
} }
showPluginDlg();
return null; return null;
} }
}.execute(); }.execute();

9
designer-base/src/com/fr/design/file/HistoryTemplateListPane.java

@ -1,5 +1,6 @@
package com.fr.design.file; package com.fr.design.file;
import com.fr.base.Env;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.base.chart.chartdata.CallbackEvent; import com.fr.base.chart.chartdata.CallbackEvent;
import com.fr.dav.LocalEnv; import com.fr.dav.LocalEnv;
@ -18,9 +19,11 @@ import com.fr.design.utils.gui.GUIPaintUtils;
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.GeneralContext;
import com.fr.general.IOUtils;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.stable.Constants; import com.fr.stable.Constants;
import com.fr.stable.StableUtils;
import com.fr.stable.project.ProjectConstants; import com.fr.stable.project.ProjectConstants;
import javax.swing.*; import javax.swing.*;
@ -363,8 +366,10 @@ public class HistoryTemplateListPane extends JPanel implements FileOperations, C
*/ */
public void openContainerFolder() { public void openContainerFolder() {
FileNode fileNode = new FileNode(((JTemplate<?, ?>) list.getSelectedValue()).getEditingFILE().getPath(), false); FileNode fileNode = new FileNode(((JTemplate<?, ?>) list.getSelectedValue()).getEditingFILE().getPath(), false);
LocalEnv localEnv = (LocalEnv) FRContext.getCurrentEnv(); Env env = FRContext.getCurrentEnv();
localEnv.openContainerFolder(fileNode); if (env.isLocalEnv()) {
IOUtils.openWindowsFolder(StableUtils.pathJoin(env.getEnvConfig().getPath(), fileNode.getEnvPath()));
}
} }
/** /**

37
designer-base/src/com/fr/design/file/TemplateTreePane.java

@ -3,25 +3,26 @@
*/ */
package com.fr.design.file; package com.fr.design.file;
import com.fr.base.Env;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.base.io.FileAssistUtils;
import com.fr.dav.LocalEnv; import com.fr.dav.LocalEnv;
import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.itree.filetree.TemplateFileTree; import com.fr.design.gui.itree.filetree.TemplateFileTree;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.JTemplate; import com.fr.design.mainframe.JTemplate;
import com.fr.env.RemoteEnv;
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.file.filetree.IOFileNodeFilter; import com.fr.file.filetree.IOFileNodeFilter;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.IOUtils;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.stable.CoreConstants; import com.fr.stable.CoreConstants;
import com.fr.stable.ProductConstants; import com.fr.stable.ProductConstants;
import com.fr.stable.StableUtils; import com.fr.stable.StableUtils;
import com.fr.stable.project.ProjectConstants; import com.fr.stable.project.ProjectConstants;
import com.sun.jna.platform.FileUtils;
import javax.swing.*; import javax.swing.*;
import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.DefaultMutableTreeNode;
@ -32,7 +33,6 @@ import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
import java.awt.event.MouseListener; import java.awt.event.MouseListener;
import java.io.File; import java.io.File;
import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
public class TemplateTreePane extends JPanel implements FileOperations { public class TemplateTreePane extends JPanel implements FileOperations {
@ -141,13 +141,13 @@ public class TemplateTreePane extends JPanel implements FileOperations {
*/ */
public void openContainerFolder() { public void openContainerFolder() {
FileNode fn = TemplateTreePane.this.reportletsTree.getSelectedFileNode(); FileNode fn = TemplateTreePane.this.reportletsTree.getSelectedFileNode();
LocalEnv localEnv = (LocalEnv) FRContext.getCurrentEnv(); Env localEnv = FRContext.getCurrentEnv();
String filePath = StableUtils.pathJoin(localEnv.getPath(), fn.getEnvPath()); String filePath = StableUtils.pathJoin(localEnv.getPath(), fn.getEnvPath());
filePath = filePath.substring(0, filePath.lastIndexOf(CoreConstants.SEPARATOR)); filePath = filePath.substring(0, filePath.lastIndexOf(CoreConstants.SEPARATOR));
try { try {
Desktop.getDesktop().open(new File(filePath)); Desktop.getDesktop().open(new File(filePath));
} catch (Exception e) { } catch (Exception e) {
localEnv.openContainerFolder(fn); IOUtils.openWindowsFolder(StableUtils.pathJoin(localEnv.getEnvConfig().getPath(), fn.getEnvPath()));
} }
} }
@ -181,8 +181,8 @@ public class TemplateTreePane extends JPanel implements FileOperations {
break; break;
} }
if (nodeFile.exists()) { if (nodeFile.exists()) {
String path = StableUtils.pathJoin(new String[]{nodeFile.getEnvPath(), nodeFile.getPath()}); String path = StableUtils.pathJoin(nodeFile.getEnvPath(), nodeFile.getPath());
moveToTrash(nodeFile); FileAssistUtils.moveToTrash(nodeFile.getPath());
deleteHistory(path.replaceAll("/", "\\\\")); deleteHistory(path.replaceAll("/", "\\\\"));
} else { } else {
JOptionPane.showMessageDialog(this, Inter.getLocText("Warning-Template_Do_Not_Exsit"), ProductConstants.PRODUCT_NAME, JOptionPane.showMessageDialog(this, Inter.getLocText("Warning-Template_Do_Not_Exsit"), ProductConstants.PRODUCT_NAME,
@ -282,27 +282,4 @@ public class TemplateTreePane extends JPanel implements FileOperations {
} }
} }
} }
/**
* 文件回收
*
* @param nodeFile 节点文件
*/
private void moveToTrash(FileNodeFILE nodeFile) {
FileUtils fileUtils = FileUtils.getInstance();
if (fileUtils.hasTrash()) {
try {
fileUtils.moveToTrash(new File[]{new File(StableUtils.pathJoin(nodeFile.getEnvPath(), nodeFile.getPath()))});
//todo 走下这个流程,否则集群下其它节点无法同步删除
FRContext.getCurrentEnv().deleteFile(nodeFile.getPath());
} catch (IOException e) {
FineLoggerFactory.getLogger().info(e.getMessage());
FRContext.getCurrentEnv().deleteFile(nodeFile.getPath());
}
} else {
FineLoggerFactory.getLogger().info("No Trash Available");
FRContext.getCurrentEnv().deleteFile(nodeFile.getPath());
}
}
} }

16
designer-base/src/com/fr/design/formula/JavaEditorPane.java

@ -9,8 +9,8 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.syntax.ui.rsyntaxtextarea.RSyntaxTextArea; import com.fr.design.gui.syntax.ui.rsyntaxtextarea.RSyntaxTextArea;
import com.fr.design.gui.syntax.ui.rsyntaxtextarea.SyntaxConstants; import com.fr.design.gui.syntax.ui.rsyntaxtextarea.SyntaxConstants;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.log.FineLoggerFactory;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.EncodeConstants; import com.fr.stable.EncodeConstants;
import com.fr.stable.JavaCompileInfo; import com.fr.stable.JavaCompileInfo;
import com.fr.stable.StableUtils; import com.fr.stable.StableUtils;
@ -21,7 +21,9 @@ import javax.swing.*;
import java.awt.*; import java.awt.*;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
import java.io.*; import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutionException;
@ -111,7 +113,7 @@ public class JavaEditorPane extends BasicPane {
private InputStream getJavaSourceInputStream() { private InputStream getJavaSourceInputStream() {
String javaPath = getJavaPath(); String javaPath = getJavaPath();
try { try {
return FRContext.getCurrentEnv().readBean(javaPath, ProjectConstants.CLASSES_NAME); return new ByteArrayInputStream(FRContext.getCurrentEnv().getFileOperator().read(StableUtils.pathJoin(ProjectConstants.CLASSES_NAME, javaPath)));
} catch (Exception e) { } catch (Exception e) {
FRContext.getLogger().error(e.getMessage(), e); FRContext.getLogger().error(e.getMessage(), e);
} }
@ -154,11 +156,7 @@ public class JavaEditorPane extends BasicPane {
return; return;
} }
try { try {
OutputStream out = FRContext.getCurrentEnv().writeBean(getJavaPath(), ProjectConstants.CLASSES_NAME); FRContext.getCurrentEnv().getFileOperator().write(text.getBytes(EncodeConstants.ENCODING_UTF_8), StableUtils.pathJoin(ProjectConstants.CLASSES_NAME, getJavaPath()));
Writer writer = new BufferedWriter(new OutputStreamWriter(out, EncodeConstants.ENCODING_UTF_8));
writer.write(text);
writer.flush();
writer.close();
JOptionPane.showMessageDialog(null, Inter.getLocText(new String[]{"Save", "Successfully"}) + "!"); JOptionPane.showMessageDialog(null, Inter.getLocText(new String[]{"Save", "Successfully"}) + "!");
fireSaveActionListener(); fireSaveActionListener();
} catch (Exception e) { } catch (Exception e) {
@ -178,7 +176,7 @@ public class JavaEditorPane extends BasicPane {
@Override @Override
protected JavaCompileInfo doInBackground() throws Exception { protected JavaCompileInfo doInBackground() throws Exception {
Env env = FRContext.getCurrentEnv(); Env env = FRContext.getCurrentEnv();
return env.compilerSourceCode(javaText.getText()); return env.getCommonOperator().compile(javaText.getText());
} }
public void done() { public void done() {

11
designer-base/src/com/fr/design/gui/ilist/TableViewList.java

@ -7,6 +7,7 @@ import com.fr.data.core.db.TableProcedure;
import com.fr.data.core.db.dialect.DialectFactory; import com.fr.data.core.db.dialect.DialectFactory;
import com.fr.data.core.db.dialect.OracleDialect; import com.fr.data.core.db.dialect.OracleDialect;
import com.fr.data.impl.Connection; import com.fr.data.impl.Connection;
import com.fr.data.operator.DataOperator;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.mainframe.dnd.SerializableTransferable; import com.fr.design.mainframe.dnd.SerializableTransferable;
@ -17,7 +18,11 @@ import com.fr.stable.StringUtils;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
import java.awt.dnd.*; import java.awt.dnd.DnDConstants;
import java.awt.dnd.DragGestureEvent;
import java.awt.dnd.DragGestureListener;
import java.awt.dnd.DragSource;
import java.awt.dnd.DragSourceAdapter;
import java.awt.event.FocusAdapter; import java.awt.event.FocusAdapter;
import java.awt.event.FocusEvent; import java.awt.event.FocusEvent;
import java.awt.event.MouseAdapter; import java.awt.event.MouseAdapter;
@ -90,7 +95,7 @@ public class TableViewList extends UIList {
int count = 3; int count = 3;
//总共给3次连接的机会 //总共给3次连接的机会
while (!status && count > 0) { while (!status && count > 0) {
status = FRContext.getCurrentEnv().testConnection(datasource); status = DataOperator.getInstance().testConnection(datasource);
count--; count--;
} }
if (!status) { if (!status) {
@ -135,7 +140,7 @@ public class TableViewList extends UIList {
searchFilter = searchFilter.toLowerCase(); searchFilter = searchFilter.toLowerCase();
boolean isOracle = FRContext.getCurrentEnv().isOracle(datasource); boolean isOracle = DataOperator.getInstance().isOracle(datasource);
boolean isOracleSystemSpace = DesignerEnvManager.getEnvManager().isOracleSystemSpace(); boolean isOracleSystemSpace = DesignerEnvManager.getEnvManager().isOracleSystemSpace();
// oracleb不勾选显示所有表,则只显示用户下的(包括存储过程和table表) // oracleb不勾选显示所有表,则只显示用户下的(包括存储过程和table表)
if (isOracle && !isOracleSystemSpace) { if (isOracle && !isOracleSystemSpace) {

56
designer-base/src/com/fr/design/gui/imenu/UIBasicMenuItemUI.java

@ -4,20 +4,49 @@
package com.fr.design.gui.imenu; package com.fr.design.gui.imenu;
import com.fr.general.ComparatorUtils;
import com.fr.design.utils.ColorRoutines; import com.fr.design.utils.ColorRoutines;
import com.fr.design.utils.ThemeUtils; import com.fr.design.utils.ThemeUtils;
import com.fr.general.ComparatorUtils;
import javax.swing.*; import javax.swing.AbstractAction;
import javax.swing.ActionMap;
import javax.swing.ButtonModel;
import javax.swing.Icon;
import javax.swing.InputMap;
import javax.swing.JCheckBoxMenuItem;
import javax.swing.JComponent;
import javax.swing.JMenu;
import javax.swing.JMenuItem;
import javax.swing.JRadioButtonMenuItem;
import javax.swing.KeyStroke;
import javax.swing.LookAndFeel;
import javax.swing.MenuElement;
import javax.swing.MenuSelectionManager;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import javax.swing.event.MenuDragMouseEvent; import javax.swing.event.MenuDragMouseEvent;
import javax.swing.event.MenuDragMouseListener; import javax.swing.event.MenuDragMouseListener;
import javax.swing.event.MenuKeyListener; import javax.swing.event.MenuKeyListener;
import javax.swing.event.MouseInputListener; import javax.swing.event.MouseInputListener;
import javax.swing.plaf.*; import javax.swing.plaf.ActionMapUIResource;
import javax.swing.plaf.ColorUIResource;
import javax.swing.plaf.ComponentInputMapUIResource;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.MenuItemUI;
import javax.swing.plaf.UIResource;
import javax.swing.plaf.basic.BasicGraphicsUtils; import javax.swing.plaf.basic.BasicGraphicsUtils;
import javax.swing.plaf.basic.BasicHTML; import javax.swing.plaf.basic.BasicHTML;
import javax.swing.text.View; import javax.swing.text.View;
import java.awt.*; import java.awt.Color;
import java.awt.Component;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.FontMetrics;
import java.awt.Graphics;
import java.awt.Insets;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.InputEvent; import java.awt.event.InputEvent;
import java.awt.event.KeyEvent; import java.awt.event.KeyEvent;
@ -588,7 +617,7 @@ public class UIBasicMenuItemUI extends MenuItemUI {
} }
protected void installDefaults() { protected void installDefaults() {
String prefix = getPropertyPrefix(); final String prefix = getPropertyPrefix();
acceleratorFont = UIManager.getFont("MenuItem.acceleratorFont"); acceleratorFont = UIManager.getFont("MenuItem.acceleratorFont");
@ -600,7 +629,7 @@ public class UIBasicMenuItemUI extends MenuItemUI {
LookAndFeel.installBorder(menuItem, prefix + ".border"); LookAndFeel.installBorder(menuItem, prefix + ".border");
oldBorderPainted = menuItem.isBorderPainted(); oldBorderPainted = menuItem.isBorderPainted();
menuItem.setBorderPainted(((Boolean) (UIManager.get(prefix + ".borderPainted"))).booleanValue()); menuItem.setBorderPainted(((Boolean) (UIManager.get(prefix + ".borderPainted"))).booleanValue());
LookAndFeel.installColorsAndFont(menuItem, prefix + ".background", prefix + ".foreground", prefix + ".font"); installFont(prefix, menuItem);
// MenuItem specific defaults // MenuItem specific defaults
if (selectionBackground == null || selectionBackground instanceof UIResource) { if (selectionBackground == null || selectionBackground instanceof UIResource) {
@ -637,6 +666,21 @@ public class UIBasicMenuItemUI extends MenuItemUI {
defaultIconGap = DEFAULT_ICON_GAP; // Should be from table defaultIconGap = DEFAULT_ICON_GAP; // Should be from table
} }
private void installFont(final String prefix, final JComponent menuItem) {
Thread thread = new Thread(new Runnable() {
@Override
public void run() {
if (menuItem == null) {
return;
}
LookAndFeel.installColorsAndFont(menuItem, prefix + ".background", prefix + ".foreground", prefix + ".font");
}
});
thread.setName("UIBasicMenuItemUI");
thread.setDaemon(true);
thread.start();
}
protected Dimension getPreferredMenuItemSize(JComponent c, Icon checkIcon, protected Dimension getPreferredMenuItemSize(JComponent c, Icon checkIcon,
Icon arrowIcon, int defaultTextIconGap) { Icon arrowIcon, int defaultTextIconGap) {
JMenuItem b = (JMenuItem) c; JMenuItem b = (JMenuItem) c;

25
designer-base/src/com/fr/design/gui/itree/filetree/EnvFileTree.java

@ -1,19 +1,9 @@
package com.fr.design.gui.itree.filetree; package com.fr.design.gui.itree.filetree;
import java.awt.*;
import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
import com.fr.design.constants.UIConstants;
import com.fr.design.gui.ilable.UILabel;
import javax.swing.JTree;
import javax.swing.tree.DefaultTreeCellRenderer;
import javax.swing.tree.DefaultTreeModel;
import javax.swing.tree.TreePath;
import com.fr.base.Env; import com.fr.base.Env;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.design.constants.UIConstants;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode; import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode;
import com.fr.design.gui.itree.refreshabletree.RefreshableJTree; import com.fr.design.gui.itree.refreshabletree.RefreshableJTree;
import com.fr.file.filetree.FileNode; import com.fr.file.filetree.FileNode;
@ -23,6 +13,15 @@ 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;
import javax.swing.*;
import javax.swing.tree.DefaultTreeCellRenderer;
import javax.swing.tree.DefaultTreeModel;
import javax.swing.tree.TreePath;
import java.awt.*;
import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
/* /*
* 文件结构树. * 文件结构树.
*/ */
@ -192,7 +191,7 @@ public class EnvFileTree extends RefreshableJTree {
FileNode[] res_fns = null; FileNode[] res_fns = null;
try { try {
res_fns = env == null ? new FileNode[0] : env.listFile(filePath); res_fns = env == null ? new FileNode[0] : env.getFileOperator().list(filePath);
} catch (Exception e) { } catch (Exception e) {
FRContext.getLogger().error(e.getMessage(), e); FRContext.getLogger().error(e.getMessage(), e);
} }

5
designer-base/src/com/fr/design/gui/itree/filetree/TemplateFileTree.java

@ -2,6 +2,7 @@ package com.fr.design.gui.itree.filetree;
import com.fr.base.Env; import com.fr.base.Env;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.base.extension.FileExtension;
import com.fr.base.operator.file.FileOperator; import com.fr.base.operator.file.FileOperator;
import com.fr.core.env.proxy.EnvProxy; import com.fr.core.env.proxy.EnvProxy;
import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode; import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode;
@ -104,7 +105,9 @@ public class TemplateFileTree extends EnvFileTree {
} }
public FileNode[] listFile(String path) throws Exception { public FileNode[] listFile(String path) throws Exception {
return FRContext.getCurrentEnv().getFileOperator().list("reportlets", path); return FRContext.getCurrentEnv().getFileOperator().list(
path,
new FileExtension[]{FileExtension.CPT, FileExtension.FRM, FileExtension.CPTX, FileExtension.FRMX});
} }
/* /*

62
designer-base/src/com/fr/design/mainframe/DesignerFrameFileDealerPane.java

@ -10,7 +10,11 @@ import com.fr.design.constants.UIConstants;
import com.fr.design.data.DesignTableDataManager; import com.fr.design.data.DesignTableDataManager;
import com.fr.design.data.datapane.TableDataTreePane; import com.fr.design.data.datapane.TableDataTreePane;
import com.fr.design.data.tabledata.ResponseDataSourceChange; import com.fr.design.data.tabledata.ResponseDataSourceChange;
import com.fr.design.file.*; import com.fr.design.file.FileOperations;
import com.fr.design.file.FileToolbarStateChangeListener;
import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.file.MutilTempalteTabPane;
import com.fr.design.file.TemplateTreePane;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.imenu.UIMenuHighLight; import com.fr.design.gui.imenu.UIMenuHighLight;
@ -33,15 +37,23 @@ import com.fr.stable.CoreConstants;
import com.fr.stable.StableUtils; import com.fr.stable.StableUtils;
import com.fr.stable.project.ProjectConstants; import com.fr.stable.project.ProjectConstants;
import javax.swing.*; import javax.swing.BorderFactory;
import javax.swing.Box;
import javax.swing.BoxLayout;
import javax.swing.JDialog;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import javax.swing.event.DocumentEvent; import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener; import javax.swing.event.DocumentListener;
import java.awt.*; import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.GridLayout;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; 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.io.File;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
@ -129,9 +141,7 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt
public void refreshDockingView() { public void refreshDockingView() {
ToolBarDef toolbarDef = new ToolBarDef(); ToolBarDef toolbarDef = new ToolBarDef();
toolbarDef.addShortCut(openReportAction, refreshTreeAction); toolbarDef.addShortCut(openReportAction, refreshTreeAction);
if (FRContext.getCurrentEnv().isSupportLocalFileOperate()) { toolbarDef.addShortCut(openFolderAction, renameAction);
toolbarDef.addShortCut(openFolderAction, renameAction);
}
toolbarDef.addShortCut(delFileAction); toolbarDef.addShortCut(delFileAction);
Set<ShortCut> extraShortCuts = ExtraDesignClassManager.getInstance().getExtraShortCuts(); Set<ShortCut> extraShortCuts = ExtraDesignClassManager.getInstance().getExtraShortCuts();
for (ShortCut shortCut : extraShortCuts){ for (ShortCut shortCut : extraShortCuts){
@ -256,37 +266,19 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt
public void stateChange() { public void stateChange() {
//当前环境为远程环境时 //当前环境为远程环境时
if (FRContext.getCurrentEnv() != null) { if (FRContext.getCurrentEnv() != null) {
if (!FRContext.getCurrentEnv().isSupportLocalFileOperate()) { //当前环境为本地环境时
if (selectedOperation.getSelectedTemplatePath() != null) { if (selectedOperation.getSelectedTemplatePath() != null) {
openReportAction.setEnabled(true); openReportAction.setEnabled(true);
} else { renameAction.setEnabled(true);
openReportAction.setEnabled(false); delFileAction.setEnabled(true);
}
FileNode node = TemplateTreePane.getInstance().getTemplateFileTree().getSelectedFileNode();
if (selectedOperation.getSelectedTemplatePath() != null){
if (node.getLock() != null && !ComparatorUtils.equals(node.getUserID(),node.getLock())){
delFileAction.setEnabled(false);
} else {
delFileAction.setEnabled(true);
}
} else {
delFileAction.setEnabled(false);
}
} else { } else {
//当前环境为本地环境时 openReportAction.setEnabled(false);
if (selectedOperation.getSelectedTemplatePath() != null) { renameAction.setEnabled(false);
openReportAction.setEnabled(true); delFileAction.setEnabled(false);
renameAction.setEnabled(true);
delFileAction.setEnabled(true);
} else {
openReportAction.setEnabled(false);
renameAction.setEnabled(false);
delFileAction.setEnabled(false);
}
openFolderAction.setEnabled(containsFolderNums() + seletedTemplateNums() != 0);
} }
refreshTreeAction.setEnabled(true); openFolderAction.setEnabled(containsFolderNums() + seletedTemplateNums() != 0);
} }
refreshTreeAction.setEnabled(true);
if (containsFolderNums() > 0 && (containsFolderNums() + seletedTemplateNums() > 1)) { if (containsFolderNums() > 0 && (containsFolderNums() + seletedTemplateNums() > 1)) {
refreshActions(); refreshActions();
} else if (containsFolderNums() == 0 && seletedTemplateNums() > 1) { } else if (containsFolderNums() == 0 && seletedTemplateNums() > 1) {

21
designer-base/src/com/fr/design/mainframe/JTemplate.java

@ -45,8 +45,8 @@ import com.fr.file.MemFILE;
import com.fr.form.ui.NoneWidget; import com.fr.form.ui.NoneWidget;
import com.fr.form.ui.Widget; import com.fr.form.ui.Widget;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.log.FineLoggerFactory;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.log.FineLoggerFactory;
import com.fr.report.cell.Elem; import com.fr.report.cell.Elem;
import com.fr.report.cell.cellattr.CellImage; import com.fr.report.cell.cellattr.CellImage;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
@ -539,7 +539,14 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
if (!editingFILE.exists()) { if (!editingFILE.exists()) {
return saveAsTemplate(isShowLoc); return saveAsTemplate(isShowLoc);
} }
if (!FRContext.getCurrentEnv().hasFileFolderAllow(this.getEditingFILE().getPath())) { boolean access = false;
try {
access = FRContext.getCurrentEnv().getOrganizationOperator().canAccess(this.getEditingFILE().getPath());
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
if (!access) {
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Inter.getLocText("FR-Designer_No-Privilege") + "!", Inter.getLocText("FR-Designer_Message"), JOptionPane.WARNING_MESSAGE); JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Inter.getLocText("FR-Designer_No-Privilege") + "!", Inter.getLocText("FR-Designer_Message"), JOptionPane.WARNING_MESSAGE);
return false; return false;
} }
@ -579,18 +586,22 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
int chooseResult = fileChooser.showSaveDialog(DesignerContext.getDesignerFrame(), this.suffix()); int chooseResult = fileChooser.showSaveDialog(DesignerContext.getDesignerFrame(), this.suffix());
if (isCancelOperation(chooseResult)) { if (isCancelOperation(chooseResult)) {
fileChooser = null;
return false; return false;
} }
if (isOkOperation(chooseResult)) { if (isOkOperation(chooseResult)) {
if (!FRContext.getCurrentEnv().hasFileFolderAllow(fileChooser.getSelectedFILE().getPath()) ) { boolean access = false;
try {
access = FRContext.getCurrentEnv().getOrganizationOperator().canAccess(fileChooser.getSelectedFILE().getPath());
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
if (!access) {
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Inter.getLocText("FR-Designer_No-Privilege") + "!", Inter.getLocText("FR-Designer_Message"), JOptionPane.WARNING_MESSAGE); JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Inter.getLocText("FR-Designer_No-Privilege") + "!", Inter.getLocText("FR-Designer_Message"), JOptionPane.WARNING_MESSAGE);
return false; return false;
} }
editingFILE = fileChooser.getSelectedFILE(); editingFILE = fileChooser.getSelectedFILE();
mkNewFile(editingFILE); mkNewFile(editingFILE);
fileChooser = null;
} }
return saveNewFile(editingFILE, oldName); return saveNewFile(editingFILE, oldName);

2
designer-base/src/com/fr/design/roleAuthority/RoleDataWrapper.java

@ -1 +1 @@
package com.fr.design.roleAuthority; import com.fr.base.FRContext; import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode; import com.fr.design.gui.itree.refreshabletree.loader.ChildrenNodesLoader; import com.fr.general.Inter; import java.util.ArrayList; import java.util.List; /** * 将权限细粒度的角色数据包装一下,区分报表平台管理角色和数据决策系统角色 * <p/> * Author : daisy * Date: 13-8-30 import java.util.ArrayList; import java.util.List; private String roleTypename = null; /** roleTypename = roleName; * <p/> * Author : daisy * Date: 13-8-30 import java.util.ArrayList; import java.util.ArrayList; import java.util.ArrayList; import java.util.ArrayList; import java.util.ArrayList; import java.util.List; } //加载所有的角色列表 public ExpandMutableTreeNode[] load() { calculateRoleList(); return this.load(this.rolelist); } //从workbook中读取的角色列表 public ExpandMutableTreeNode[] load(List<String> rolelist) { this.rolelist = rolelist; ExpandMutableTreeNode[] res = new ExpandMutableTreeNode[rolelist.size()]; for (int i = 0; i < res.length; i++) { res[i] = new ExpandMutableTreeNode(rolelist.get(i)); } return res; } public String getRoleTypename(){ return roleTypename; } } package com.fr.design.roleAuthority; import com.fr.base.FRContext; import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode; import com.fr.design.gui.itree.refreshabletree.loader.ChildrenNodesLoader; import com.fr.general.Inter; import java.util.ArrayList; import java.util.ArrayList; /** import java.util.ArrayList; * 将权限细粒度的角色数据包装一下,区分报表平台管理角色和数据决策系统角色 import java.util.ArrayList; * <p/> import java.util.ArrayList; * Author : daisy import java.util.ArrayList; * Date: 13-8-30 import java.util.List; import java.util.List; import java.util.List; import java.util.ArrayList; import java.util.List; import java.util.List; import java.util.List; */ public class RoleDataWrapper implements ChildrenNodesLoader { import java.util.ArrayList; /** import java.util.List; * <p/> import java.util.List; * Author : daisy import java.util.List; * Date: 13-8-30 import java.util.ArrayList; /** import java.util.ArrayList; /** import java.util.ArrayList; import java.util.List; */ private void calculateRoleList() { try { Collections.addAll(rolelist, FRContext.getCurrentEnv().getOrganizationOperator().getRoleGroup()); } catch (Exception e) { FineLoggerFactory.getLogger().error(e.getMessage(), e); } } //加载所有的角色列表 public ExpandMutableTreeNode[] load() { calculateRoleList(); return this.load(this.rolelist); } //从workbook中读取的角色列表 public ExpandMutableTreeNode[] load(List<String> rolelist) { this.rolelist = rolelist; ExpandMutableTreeNode[] res = new ExpandMutableTreeNode[rolelist.size()]; for (int i = 0; i < res.length; i++) { res[i] = new ExpandMutableTreeNode(rolelist.get(i)); } return res; } public String getRoleTypename(){ return roleTypename; } }

12
designer-base/src/com/fr/design/style/color/ColorSelectConfigManager.java

@ -3,7 +3,6 @@ package com.fr.design.style.color;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.file.XMLFileManager; import com.fr.file.XMLFileManager;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.log.FineLoggerFactory;
import com.fr.general.GeneralContext; import com.fr.general.GeneralContext;
import com.fr.stable.EnvChangedListener; import com.fr.stable.EnvChangedListener;
import com.fr.stable.xml.XMLPrintWriter; import com.fr.stable.xml.XMLPrintWriter;
@ -96,11 +95,6 @@ public class ColorSelectConfigManager extends XMLFileManager implements ColorSel
if (colors != null && !colors.isEmpty()) { if (colors != null && !colors.isEmpty()) {
manager.setColorsToFile(colors); manager.setColorsToFile(colors);
} }
try {
FRContext.getCurrentEnv().writeResource(manager);
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage());
}
} }
@ -115,7 +109,6 @@ public class ColorSelectConfigManager extends XMLFileManager implements ColorSel
ColorSelectConfigManager manager = new ColorSelectConfigManager(); ColorSelectConfigManager manager = new ColorSelectConfigManager();
XMLTools.readInputStreamXML(manager, input); XMLTools.readInputStreamXML(manager, input);
configManager = manager; configManager = manager;
FRContext.getCurrentEnv().writeResource(configManager);
} }
@ -132,11 +125,6 @@ public class ColorSelectConfigManager extends XMLFileManager implements ColorSel
return configManager; return configManager;
} }
public boolean writeResource() throws Exception {
return FRContext.getCurrentEnv().writeResource(ColorSelectConfigManager.getProviderInstance());
}
public String fileName() { public String fileName() {
return "recentcolors.xml"; return "recentcolors.xml";
} }

364
designer-base/src/com/fr/env/RemoteEnv.java vendored

@ -1,32 +1,29 @@
package com.fr.env; package com.fr.env;
import com.fr.base.EnvException; import com.fr.base.EnvException;
import com.fr.base.TableData;
import com.fr.base.operator.common.CommonOperator; import com.fr.base.operator.common.CommonOperator;
import com.fr.base.operator.connect.ConnectOperator; import com.fr.base.operator.connect.ConnectOperator;
import com.fr.base.operator.file.FileOperator; import com.fr.base.operator.file.FileOperator;
import com.fr.base.operator.org.OrganizationOperator;
import com.fr.base.remote.RemoteDeziConstants; import com.fr.base.remote.RemoteDeziConstants;
import com.fr.common.rpc.RemoteCallServerConfig; import com.fr.common.rpc.RemoteCallServerConfig;
import com.fr.common.rpc.netty.MessageSendExecutor; import com.fr.common.rpc.netty.MessageSendExecutor;
import com.fr.common.rpc.netty.RemoteCallClient; import com.fr.common.rpc.netty.RemoteCallClient;
import com.fr.core.env.EnvContext; import com.fr.core.env.EnvContext;
import com.fr.design.env.RemoteEnvConfig;
import com.fr.data.TableDataSource;
import com.fr.data.impl.EmbeddedTableData;
import com.fr.data.impl.storeproc.StoreProcedure; import com.fr.data.impl.storeproc.StoreProcedure;
import com.fr.dav.AbstractEnv; import com.fr.dav.AbstractEnv;
import com.fr.dav.DavXMLUtils; import com.fr.dav.DavXMLUtils;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.design.env.RemoteEnvConfig;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.file.CacheManager; import com.fr.file.CacheManager;
import com.fr.file.ConnectionConfig;
import com.fr.file.TableDataConfig;
import com.fr.general.CommonIOUtils; import com.fr.general.CommonIOUtils;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.EnvProxyFactory;
import com.fr.general.IOUtils; import com.fr.general.IOUtils;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.general.LogRecordTime;
import com.fr.general.LogUtils; import com.fr.general.http.HttpToolbox;
import com.fr.io.utils.ResourceIOUtils; import com.fr.io.utils.ResourceIOUtils;
import com.fr.json.JSONArray; import com.fr.json.JSONArray;
import com.fr.json.JSONObject; import com.fr.json.JSONObject;
@ -37,13 +34,15 @@ import com.fr.share.ShareConstants;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
import com.fr.stable.EncodeConstants; import com.fr.stable.EncodeConstants;
import com.fr.stable.Filter; import com.fr.stable.Filter;
import com.fr.stable.JavaCompileInfo;
import com.fr.stable.ProductConstants;
import com.fr.stable.StableUtils; import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import com.fr.stable.SvgProvider; import com.fr.stable.SvgProvider;
import com.fr.stable.file.XMLFileManagerProvider;
import com.fr.stable.project.ProjectConstants; import com.fr.stable.project.ProjectConstants;
import com.fr.stable.xml.XMLTools;
import com.fr.third.guava.base.Strings;
import com.fr.third.guava.collect.ImmutableMap;
import com.fr.web.ResourceConstants; import com.fr.web.ResourceConstants;
import javax.swing.JOptionPane; import javax.swing.JOptionPane;
@ -54,21 +53,19 @@ import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory; import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource; import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult; import javax.xml.transform.stream.StreamResult;
import java.awt.Component;
import java.io.BufferedReader; import java.awt.*;
import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
import java.io.File; import java.io.File;
import java.io.FileInputStream; import java.io.FileInputStream;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream; import java.io.OutputStream;
import java.io.OutputStreamWriter; import java.io.OutputStreamWriter;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator;
import java.util.Map; import java.util.Map;
/** /**
@ -113,8 +110,27 @@ public class RemoteEnv extends AbstractEnv<RemoteEnvConfig> implements DesignAut
return true; return true;
} }
@Override
public EnvProxyFactory getProxyFactory() {
return new EnvProxyFactory() {
@Override
public <T> T get(Class<T> clazz, T obj) {
assert clazz != null;
try {
return MessageSendExecutor.getInstance().execute(clazz);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
};
}
@Override @Override
public FileOperator getFileOperator() throws Exception { public FileOperator getFileOperator() throws Exception {
return MessageSendExecutor.getInstance().execute(FileOperator.class); return MessageSendExecutor.getInstance().execute(FileOperator.class);
} }
@ -123,6 +139,11 @@ public class RemoteEnv extends AbstractEnv<RemoteEnvConfig> implements DesignAut
return MessageSendExecutor.getInstance().execute(CommonOperator.class); return MessageSendExecutor.getInstance().execute(CommonOperator.class);
} }
@Override
public OrganizationOperator getOrganizationOperator() throws Exception {
return MessageSendExecutor.getInstance().execute(OrganizationOperator.class);
}
@Override @Override
public RemoteEnvConfig getEnvConfig() { public RemoteEnvConfig getEnvConfig() {
return config; return config;
@ -202,7 +223,7 @@ public class RemoteEnv extends AbstractEnv<RemoteEnvConfig> implements DesignAut
* @param in InputStream输入流 * @param in InputStream输入流
* @return 转换后的字符串 * @return 转换后的字符串
*/ */
public static String stream2String(InputStream in) { private static String stream2String(InputStream in) {
if (in == null) { if (in == null) {
return null; return null;
} }
@ -221,14 +242,8 @@ public class RemoteEnv extends AbstractEnv<RemoteEnvConfig> implements DesignAut
* @return 测试连接成功返回true * @return 测试连接成功返回true
* @throws Exception 异常 * @throws Exception 异常
*/ */
public boolean testServerConnection() throws Exception { private boolean testServerConnection() throws Exception {
try { return testConnection(true, true, DesignerContext.getDesignerFrame());
connectOnce();
return true;
} catch (Exception e) {
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Inter.getLocText("Datasource-Connection_failed"));
return false;
}
} }
/** /**
@ -279,16 +294,6 @@ public class RemoteEnv extends AbstractEnv<RemoteEnvConfig> implements DesignAut
* @throws Exception e * @throws Exception e
*/ */
/**
* 返回描述该运行环境的名字
*
* @return 描述环境名字的字符串
*/
@Override
public String getEnvDescription() {
return Inter.getLocText("Env-Remote_Server");
}
public class Bytes2ServerOutputStream extends OutputStream { public class Bytes2ServerOutputStream extends OutputStream {
private ByteArrayOutputStream out = new ByteArrayOutputStream(); private ByteArrayOutputStream out = new ByteArrayOutputStream();
private HashMap<String, String> nameValuePairs; private HashMap<String, String> nameValuePairs;
@ -405,104 +410,6 @@ public class RemoteEnv extends AbstractEnv<RemoteEnvConfig> implements DesignAut
return Boolean.valueOf(IOUtils.inputStream2String(input, EncodeConstants.ENCODING_UTF_8)); return Boolean.valueOf(IOUtils.inputStream2String(input, EncodeConstants.ENCODING_UTF_8));
} }
/**
* DataSource中去除当前角色没有权限访问的数据源
*/
@Override
public void removeNoPrivilegeConnection() {
refreshHttpSProperty();
TableDataConfig dm = TableDataConfig.getInstance();
try {
HashMap<String, String> para = new HashMap<>();
para.put("op", "fs_remote_design");
para.put("cmd", "env_get_role");
para.put("currentUsername", this.getUser());
para.put("currentPwd", this.getPassword());
InputStream input = filterInputStream(
RemoteEnvUtils.simulateRPCByHttpGet(para, false, this)
);
JSONArray ja = new JSONArray(stream2String(input));
ArrayList<String> toBeRemoveTDName = new ArrayList<>();
for (int i = 0; i < ja.length(); i++) {
String toBeRemoveConnName = (String) ((JSONObject) ja.get(i)).get("name");
ConnectionConfig.getInstance().removeConnection(toBeRemoveConnName);
Iterator it = dm.getTableDatas().keySet().iterator();
while (it.hasNext()) {
String tdName = (String) it.next();
TableData td = dm.getTableData(tdName);
td.registerNoPrivilege(toBeRemoveTDName, toBeRemoveConnName, tdName);
}
}
for (int i = 0; i < toBeRemoveTDName.size(); i++) {
dm.removeTableData(toBeRemoveTDName.get(i));
}
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage());
}
}
@Override
public EmbeddedTableData previewTableData(Object tableData, Map parameterMap, int rowCount) throws Exception {
return previewTableData(null, tableData, parameterMap, rowCount);
}
/**
* 根据指定的参数生成一个实际可预览的数据集
*
* @param tableData 带参数的数据集
* @param parameterMap 参数键值对
* @param rowCount 需要获取的行数
* @return 实际的二维数据集
* @throws Exception 如果生成数据失败则抛出此异常
*/
@Override
public EmbeddedTableData previewTableData(TableDataSource dataSource, Object tableData, java.util.Map parameterMap, int rowCount) throws Exception {
ByteArrayOutputStream out = new ByteArrayOutputStream();
// 把tableData写成xml文件到out
DavXMLUtils.writeXMLFileTableDataAndSource((TableData) tableData, out);
// 把parameterMap转成JSON格式的字符串
JSONObject jo = new JSONObject(parameterMap);
String jsonParameter = jo.toString();
HashMap<String, String> para = new HashMap<>();
para.put("op", "fr_remote_design");
para.put("cmd", "design_preview_td");
para.put("pars", jsonParameter);
para.put("rowcount", String.valueOf(rowCount));
InputStream input = postBytes2ServerB(out.toByteArray(), para);
if (input == null) {
return null;
}
return (EmbeddedTableData) DavXMLUtils.readXMLTableData(input);
}
/**
* 根据指定的参数生成一个实际可预览的数据集
*
* @param tableData 带参数的数据集
* @param parameterMap 参数键值对
* @param start 开始
* @param end 结尾
* @param cols 列名
* @param colIdx 列序号
* @return 实际的二位数据条
* @throws Exception 异常
*/
@Override
public Object previewTableData(Object tableData, java.util.Map parameterMap, int start, int end, String[] cols, int[] colIdx) throws Exception {
return previewTableData(tableData, parameterMap, -1);
}
@Override
public Object previewTableData(TableDataSource dataSource, Object tableData, Map parameterMap, int start, int end, String[] cols, int[] colIdx) throws Exception {
return previewTableData(dataSource, tableData, parameterMap, -1);
}
/** /**
* nameValuePairs,这个参数要接着this.path,拼成一个URL,否则服务器端req.getParameter是无法得到的 * nameValuePairs,这个参数要接着this.path,拼成一个URL,否则服务器端req.getParameter是无法得到的
@ -613,67 +520,6 @@ public class RemoteEnv extends AbstractEnv<RemoteEnvConfig> implements DesignAut
return true; return true;
} }
/**
* 写报表运行环境所需的配置文件
*
* @param mgr 管理各个资源文件的管理器
* @return 写入xml成功返回true
* @throws Exception 写入xml错误则抛出此异常
*/
@Override
public boolean writeResource(XMLFileManagerProvider mgr) throws Exception {
testServerConnection();
HashMap<String, String> para = new HashMap<>();
para.put("op", "fr_remote_design");
para.put("cmd", "design_save_resource");
para.put("resource", mgr.fileName());
para.put("class_name", mgr.getClass().getName());
para.put("current_uid", this.getUserID());
para.put("currentUsername", this.getUser());
// alex:通过ByteArrayOutputStream将mgr写成字节流
Bytes2ServerOutputStream out = new Bytes2ServerOutputStream(para);
XMLTools.writeOutputStreamXML(mgr, out);
try {
String res = stream2String(
filterInputStream(
RemoteEnvUtils.simulateRPCByHttpPost(out.getOut().toByteArray(), out.nameValuePairs, false, this)
)
);
if (StringUtils.isNotEmpty(res)) {
JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Already_exist") + res);
return false;
}
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage());
return false;
}
return true;
}
/**
* 读取文件
*
* @param beanPath 文件名
* @param prefix 当前Env下得工程分类如reportletslib等
* @return InputStream 输入流
*/
@Override
public InputStream readBean(String beanPath, String prefix)
throws Exception {
refreshHttpSProperty();
HashMap<String, String> para = new HashMap<>();
para.put("op", "fs_remote_design");
para.put("cmd", "design_open");
para.put(RemoteDeziConstants.PREFXI, prefix);
para.put("resource", beanPath);
return filterInputStream(RemoteEnvUtils.simulateRPCByHttpGet(para, false, this));
}
/** /**
* 写文件 * 写文件
* *
@ -747,93 +593,11 @@ public class RemoteEnv extends AbstractEnv<RemoteEnvConfig> implements DesignAut
} }
/**
* 输出日志信息
*
* @throws Exception e
*/
@Override
public void printLogMessage() throws Exception {
ByteArrayOutputStream out = new ByteArrayOutputStream();
HashMap<String, String> para = new HashMap<>();
para.put("op", "fr_remote_design");
para.put("cmd", "get_log_message");
InputStream input = postBytes2ServerB(out.toByteArray(), para);
if (input == null) {
return;
}
LogRecordTime[] records = LogUtils.readXMLLogRecords(input);
}
@Override @Override
public String[] getSupportedTypes() { public String[] getSupportedTypes() {
return FILE_TYPE; return FILE_TYPE;
} }
/**
* 判断是否有文件夹权限
*
* @param path 路径
* @return 有权限则返回true
*/
@Override
public boolean hasFileFolderAllow(String path) {
refreshHttpSProperty();
try {
HashMap<String, String> para = new HashMap<>();
para.put("op", "fs_remote_design");
para.put("cmd", "design_filefolder_allow");
para.put("current_uid", this.getUserID());
para.put(RemoteDeziConstants.TEMPLATE_PATH, path);
InputStream input = filterInputStream(
RemoteEnvUtils.simulateRPCByHttpGet(para, false, this)
);
if (input == null) {
return false;
}
return Boolean.valueOf(IOUtils.inputStream2String(input, EncodeConstants.ENCODING_UTF_8));
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage());
return false;
}
}
@Override
public InputStream getDataSourceInputStream(String filePath) throws Exception {
return readBean(filePath, "datasource");
}
@Override
public ArrayList getAllRole4Privilege(boolean isFS) {
refreshHttpSProperty();
ArrayList<String> allRoleList = new ArrayList<>();
try {
HashMap<String, String> para = new HashMap<>();
para.put("op", "fr_remote_design");
para.put("cmd", "get_all_role");
para.put("isFS", String.valueOf(isFS));
InputStream input = filterInputStream(
RemoteEnvUtils.simulateRPCByHttpGet(para, false, this)
);
JSONArray ja = new JSONArray(stream2String(input));
for (int i = 0; i < ja.length(); i++) {
String roleName = (String) ((JSONObject) ja.get(i)).get("name");
allRoleList.add(roleName);
}
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage());
}
return allRoleList;
}
/** /**
* 获取当前env的build文件路径 * 获取当前env的build文件路径
*/ */
@ -850,56 +614,6 @@ public class RemoteEnv extends AbstractEnv<RemoteEnvConfig> implements DesignAut
this.buildFilePath = buildFilePath; this.buildFilePath = buildFilePath;
} }
/**
* 编译Java源代码方便二次开发的进行
*
* @param sourceText 源代码
* @return 编译信息有可能是成功信息也有可能是出错或者警告信息
*/
@Override
public JavaCompileInfo compilerSourceCode(String sourceText) throws Exception {
HashMap<String, String> para = new HashMap<>();
para.put("op", "fr_remote_design");
para.put("cmd", "design_compile_source_code");
InputStream in = postBytes2ServerB(sourceText.getBytes(EncodeConstants.ENCODING_UTF_8), para);
BufferedReader br = new BufferedReader(new InputStreamReader(in, EncodeConstants.ENCODING_UTF_8));
StringBuilder sb = new StringBuilder();
String line;
while ((line = br.readLine()) != null) {
sb.append(line);
}
JSONObject jo = new JSONObject(sb.toString());
JavaCompileInfo info = new JavaCompileInfo();
info.parseJSON(jo);
return info;
}
@Override
public String pluginServiceAction(String serviceID, String req) throws Exception {
refreshHttpSProperty();
HashMap<String, String> para = new HashMap<>();
para.put("op", "fr_remote_design");
para.put("cmd", "design_get_plugin_service_data");
para.put("serviceID", serviceID);
para.put("req", req);
//jim :加上user,远程设计点击预览时传递用户角色信息
InputStream inputStream = filterInputStream(
RemoteEnvUtils.simulateRPCByHttpPost(para, false, this)
);
return IOUtils.inputStream2String(inputStream);
}
/**
* 远程不启动使用虚拟服务
* <p>
*
* @param serviceID serviceID
*/
@Override
public void pluginServiceStart(String serviceID) {
}
@Override @Override
public String[] loadREUFile() { public String[] loadREUFile() {
refreshHttpSProperty(); refreshHttpSProperty();

50
designer-base/src/com/fr/file/FILEChooserPane.java

@ -1,8 +1,8 @@
package com.fr.file; package com.fr.file;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.extension.FileExtension;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.base.extension.FileExtension;
import com.fr.dav.LocalEnv; import com.fr.dav.LocalEnv;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.design.actions.UpdateAction; import com.fr.design.actions.UpdateAction;
@ -26,6 +26,7 @@ import com.fr.file.filter.FILEFilter;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.GeneralContext; import com.fr.general.GeneralContext;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.CoreConstants; import com.fr.stable.CoreConstants;
import com.fr.stable.OperatingSystem; import com.fr.stable.OperatingSystem;
import com.fr.stable.ProductConstants; import com.fr.stable.ProductConstants;
@ -33,38 +34,13 @@ import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import com.fr.stable.project.ProjectConstants; import com.fr.stable.project.ProjectConstants;
import javax.swing.AbstractAction; import javax.swing.*;
import javax.swing.AbstractListModel;
import javax.swing.ActionMap;
import javax.swing.BorderFactory;
import javax.swing.DefaultComboBoxModel;
import javax.swing.DefaultListCellRenderer;
import javax.swing.DefaultListModel;
import javax.swing.Icon;
import javax.swing.InputMap;
import javax.swing.JComponent;
import javax.swing.JFileChooser;
import javax.swing.JList;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.KeyStroke;
import javax.swing.ListCellRenderer;
import javax.swing.ListModel;
import javax.swing.ListSelectionModel;
import javax.swing.SwingConstants;
import javax.swing.SwingUtilities;
import javax.swing.event.ListSelectionEvent; import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener; import javax.swing.event.ListSelectionListener;
import javax.swing.filechooser.FileSystemView; import javax.swing.filechooser.FileSystemView;
import javax.swing.plaf.basic.BasicArrowButton; import javax.swing.plaf.basic.BasicArrowButton;
import javax.swing.plaf.basic.BasicButtonUI; import javax.swing.plaf.basic.BasicButtonUI;
import java.awt.BorderLayout; import java.awt.*;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Insets;
import java.awt.Window;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
import java.awt.event.ItemEvent; import java.awt.event.ItemEvent;
@ -707,7 +683,14 @@ public class FILEChooserPane extends BasicPane {
} }
returnValue = OK_OPTION; returnValue = OK_OPTION;
FILE selectedFile = this.getSelectedFILE(); FILE selectedFile = this.getSelectedFILE();
if (!FRContext.getCurrentEnv().hasFileFolderAllow(selectedFile.getPath())) { boolean access = false;
try {
access = FRContext.getCurrentEnv().getOrganizationOperator().canAccess(selectedFile.getPath());
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
if (!access) {
JOptionPane.showMessageDialog(FILEChooserPane.this, Inter.getLocText("FR-App-Privilege_No") + "!", Inter.getLocText("FR-App-File_Message"), JOptionPane.WARNING_MESSAGE); JOptionPane.showMessageDialog(FILEChooserPane.this, Inter.getLocText("FR-App-Privilege_No") + "!", Inter.getLocText("FR-App-File_Message"), JOptionPane.WARNING_MESSAGE);
return; return;
} }
@ -1418,7 +1401,14 @@ public class FILEChooserPane extends BasicPane {
if (currentDirectory == null) { if (currentDirectory == null) {
return; return;
} }
if (!FRContext.getCurrentEnv().hasFileFolderAllow(currentDirectory.getPath() + "/")) {
boolean access = false;
try {
access = FRContext.getCurrentEnv().getOrganizationOperator().canAccess(currentDirectory.getPath());
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
if (!access) {
JOptionPane.showMessageDialog(FILEChooserPane.this, Inter.getLocText("FR-App-Privilege_No") + "!", Inter.getLocText("FR-App-File_Message"), JOptionPane.WARNING_MESSAGE); JOptionPane.showMessageDialog(FILEChooserPane.this, Inter.getLocText("FR-App-Privilege_No") + "!", Inter.getLocText("FR-App-File_Message"), JOptionPane.WARNING_MESSAGE);
return; return;
} }

37
designer-base/src/com/fr/file/FileNodeFILE.java

@ -8,12 +8,14 @@ import com.fr.design.gui.itree.filetree.FileTreeIcon;
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.Inter; import com.fr.general.Inter;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.CoreConstants; import com.fr.stable.CoreConstants;
import com.fr.stable.StableUtils; import com.fr.stable.StableUtils;
import com.fr.stable.project.ProjectConstants; import com.fr.stable.project.ProjectConstants;
import javax.swing.*; import javax.swing.*;
import java.io.ByteArrayInputStream;
import java.io.InputStream; import java.io.InputStream;
import java.io.OutputStream; import java.io.OutputStream;
@ -166,7 +168,7 @@ public class FileNodeFILE implements FILE {
return res_array; return res_array;
} catch (Exception e) { } catch (Exception e) {
FRContext.getLogger().error(e.getMessage(), e); FineLoggerFactory.getLogger().error(e.getMessage(), e);
return new FILE[0]; return new FILE[0];
} }
} }
@ -178,18 +180,10 @@ public class FileNodeFILE implements FILE {
* @return 返回文件节点 * @return 返回文件节点
*/ */
private FileNode[] listFile(String rootFilePath) { private FileNode[] listFile(String rootFilePath) {
if (ComparatorUtils.equals(envPath, FRContext.getCurrentEnv().getWebReportPath())) { try {
try { return FRContext.getCurrentEnv().getFileOperator().list(rootFilePath);
return FRContext.getCurrentEnv().listReportPathFile(rootFilePath); } catch (Exception e) {
} catch (Exception e) { FineLoggerFactory.getLogger().error(e.getMessage(), e);
FRContext.getLogger().error(e.getMessage(), e);
}
} else {
try {
return FRContext.getCurrentEnv().listFile(rootFilePath);
} catch (Exception e) {
FRContext.getLogger().error(e.getMessage(), e);
}
} }
return new FileNode[0]; return new FileNode[0];
} }
@ -206,11 +200,9 @@ public class FileNodeFILE implements FILE {
} }
try { try {
return FRContext.getCurrentEnv().createFolder(StableUtils.pathJoin(new String[]{ return FRContext.getCurrentEnv().getFileOperator().createFolder(StableUtils.pathJoin(node.getEnvPath(), name));
node.getEnvPath(), name
}));
} catch (Exception e) { } catch (Exception e) {
FRContext.getLogger().error(e.getMessage(), e); FineLoggerFactory.getLogger().error(e.getMessage(), e);
return false; return false;
} }
} }
@ -248,7 +240,7 @@ public class FileNodeFILE implements FILE {
} }
try { try {
return FRContext.getCurrentEnv().fileExists(node.getEnvPath()); return FRContext.getCurrentEnv().getFileOperator().isExists(node.getEnvPath());
} catch (Exception e) { } catch (Exception e) {
FRContext.getLogger().error(e.getMessage(), e); FRContext.getLogger().error(e.getMessage(), e);
return false; return false;
@ -275,9 +267,9 @@ public class FileNodeFILE implements FILE {
} }
try { try {
return FRContext.getCurrentEnv().createFile(node.getEnvPath()); return FRContext.getCurrentEnv().getFileOperator().createFile(node.getEnvPath());
} catch (Exception e) { } catch (Exception e) {
FRContext.getLogger().error(e.getMessage(), e); FineLoggerFactory.getLogger().error(e.getMessage(), e);
return false; return false;
} }
} }
@ -299,10 +291,7 @@ public class FileNodeFILE implements FILE {
return null; return null;
} }
InputStream in = FRContext.getCurrentEnv().readBean( InputStream in = new ByteArrayInputStream(FRContext.getCurrentEnv().getFileOperator().read(StableUtils.pathJoin(ProjectConstants.REPORTLETS_NAME, envPath.substring(ProjectConstants.REPORTLETS_NAME.length() + 1))));
envPath.substring(ProjectConstants.REPORTLETS_NAME.length() + 1),
ProjectConstants.REPORTLETS_NAME
);
return envPath.endsWith(".cpt") || envPath.endsWith(".frm") return envPath.endsWith(".cpt") || envPath.endsWith(".frm")
? XMLEncryptUtils.decodeInputStream(in) : in; ? XMLEncryptUtils.decodeInputStream(in) : in;

22
designer-base/src/com/fr/start/BaseDesigner.java

@ -11,6 +11,7 @@ import com.fr.design.file.TemplateTreePane;
import com.fr.design.fun.DesignerStartOpenFileProcessor; import com.fr.design.fun.DesignerStartOpenFileProcessor;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.DesignerFrame; import com.fr.design.mainframe.DesignerFrame;
import com.fr.design.mainframe.loghandler.LogMessageBar;
import com.fr.design.mainframe.toolbar.ToolBarMenuDock; import com.fr.design.mainframe.toolbar.ToolBarMenuDock;
import com.fr.design.utils.DesignUtils; import com.fr.design.utils.DesignUtils;
import com.fr.event.EventDispatcher; import com.fr.event.EventDispatcher;
@ -48,12 +49,32 @@ public abstract class BaseDesigner extends ToolBarMenuDock {
EventDispatcher.fire(ModuleEvent.MajorModuleStarting, InterProviderFactory.getProvider().getLocText("FR-Designer_Initializing")); EventDispatcher.fire(ModuleEvent.MajorModuleStarting, InterProviderFactory.getProvider().getLocText("FR-Designer_Initializing"));
// 初始化look and feel.这个在预加载之前执行是因为lookAndFeel里的东西,预加载时也要用到 // 初始化look and feel.这个在预加载之前执行是因为lookAndFeel里的东西,预加载时也要用到
DesignUtils.initLookAndFeel(); DesignUtils.initLookAndFeel();
// 预加载一些耗时的单例面板
preLoadPane();
// 初始化Log Handler // 初始化Log Handler
DesignerEnvManager.loadLogSetting(); DesignerEnvManager.loadLogSetting();
createDesignerFrame(); createDesignerFrame();
} }
private void preLoadPane() {
ExecutorService service = Executors.newCachedThreadPool();
service.submit(new Runnable() {
@Override
public void run() {
LogMessageBar.getInstance();
}
});
service.submit(new Runnable() {
@Override
public void run() {
HistoryTemplateListPane.getInstance();
}
});
service.shutdown();
}
public void show(final String[] args) { public void show(final String[] args) {
ExecutorService executorService = Executors.newSingleThreadExecutor(); ExecutorService executorService = Executors.newSingleThreadExecutor();
executorService.submit(new Runnable() { executorService.submit(new Runnable() {
@ -61,6 +82,7 @@ public abstract class BaseDesigner extends ToolBarMenuDock {
public void run() { public void run() {
collectUserInformation(); collectUserInformation();
showDesignerFrame(args, DesignerContext.getDesignerFrame(), false); showDesignerFrame(args, DesignerContext.getDesignerFrame(), false);
DesignerContext.getDesignerFrame().refreshEnv();
for (int i = 0; !TemplateTreePane.getInstance().getTemplateFileTree().isTemplateShowing() && i < LOAD_TREE_MAXNUM; i++) { for (int i = 0; !TemplateTreePane.getInstance().getTemplateFileTree().isTemplateShowing() && i < LOAD_TREE_MAXNUM; i++) {
TemplateTreePane.getInstance().getTemplateFileTree().refresh(); TemplateTreePane.getInstance().getTemplateFileTree().refresh();
} }

2
designer-chart/src/com/fr/design/chart/ChartTypePane.java

@ -172,7 +172,7 @@ public class ChartTypePane extends ChartCommonWizardPane {
} }
private boolean supportMap() { private boolean supportMap() {
return VT4FR.ChartMap.support(); return VT4FR.ChartMap.isSupport();
} }
public void update(ChartCollection cc) { public void update(ChartCollection cc) {

16
designer-chart/src/com/fr/design/chart/series/PlotSeries/MapGroupExtensionPane.java

@ -340,13 +340,13 @@ public class MapGroupExtensionPane extends BasicPane implements UIObserver {
return; return;
} }
try{//提醒名字已存在 try{//提醒名字已存在
if(FRContext.getCurrentEnv().fileExists(StableUtils.pathJoin( if(FRContext.getCurrentEnv().getFileOperator().isExists(StableUtils.pathJoin(
new String[]{MapSvgXMLHelper.relativeDefaultMapPath(),newName+SvgProvider.EXTENSION}))){ MapSvgXMLHelper.relativeDefaultMapPath(),newName+SvgProvider.EXTENSION))){
showRenameWaring(newName); showRenameWaring(newName);
return; return;
} }
if(FRContext.getCurrentEnv().fileExists(StableUtils.pathJoin( if(FRContext.getCurrentEnv().getFileOperator().isExists(StableUtils.pathJoin(
new String[]{MapSvgXMLHelper.relativeCustomMapPath(), newName + SvgProvider.EXTENSION}))){ MapSvgXMLHelper.relativeCustomMapPath(), newName + SvgProvider.EXTENSION))){
showRenameWaring(newName); showRenameWaring(newName);
return; return;
} }
@ -361,10 +361,10 @@ public class MapGroupExtensionPane extends BasicPane implements UIObserver {
groupExtensionPane.setValueAtCurrentSelectIndex(newName); groupExtensionPane.setValueAtCurrentSelectIndex(newName);
fireStateChange(); fireStateChange();
saveMapInfo(newName); saveMapInfo(newName);
FRContext.getCurrentEnv().deleteFile( FRContext.getCurrentEnv().getFileOperator().delete(
StableUtils.pathJoin(new String[]{MapSvgXMLHelper.relativeDefaultMapPath(),oldName+SvgProvider.EXTENSION})); StableUtils.pathJoin(MapSvgXMLHelper.relativeDefaultMapPath(),oldName+SvgProvider.EXTENSION));
FRContext.getCurrentEnv().deleteFile( FRContext.getCurrentEnv().getFileOperator().delete(
StableUtils.pathJoin(new String[]{MapSvgXMLHelper.relativeCustomMapPath(),oldName+SvgProvider.EXTENSION})); StableUtils.pathJoin(MapSvgXMLHelper.relativeCustomMapPath(),oldName+SvgProvider.EXTENSION));
refresh(); refresh();
}catch (Exception exp){ }catch (Exception exp){
FineLoggerFactory.getLogger().error(exp.getMessage()); FineLoggerFactory.getLogger().error(exp.getMessage());

10
designer-realize/src/com/fr/design/mainframe/alphafine/component/AlphaFinePane.java

@ -1,16 +1,18 @@
package com.fr.design.mainframe.alphafine.component; package com.fr.design.mainframe.alphafine.component;
import com.bulenkov.iconloader.IconLoader;
import com.fr.design.actions.help.alphafine.AlphaFineContext; import com.fr.design.actions.help.alphafine.AlphaFineContext;
import com.fr.design.actions.help.alphafine.AlphaFineListener; import com.fr.design.actions.help.alphafine.AlphaFineListener;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.mainframe.alphafine.AlphaFineHelper; import com.fr.design.mainframe.alphafine.AlphaFineHelper;
import com.fr.design.utils.ThemeUtils; import com.fr.general.IOUtils;
import com.fr.general.Inter; import com.fr.general.Inter;
import java.awt.*; import java.awt.AWTEvent;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.Toolkit;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
@ -28,7 +30,7 @@ public class AlphaFinePane extends BasicPane {
setPreferredSize(new Dimension(24, 24)); setPreferredSize(new Dimension(24, 24));
setLayout(new BorderLayout()); setLayout(new BorderLayout());
UIButton refreshButton = new UIButton(); UIButton refreshButton = new UIButton();
refreshButton.setIcon(IconLoader.getIcon("/com/fr/design/mainframe/alphafine/images/smallsearch.png")); refreshButton.setIcon(IOUtils.readIcon(("/com/fr/design/mainframe/alphafine/images/smallsearch.png")));
refreshButton.setToolTipText(Inter.getLocText("FR-Designer_AlphaFine")); refreshButton.setToolTipText(Inter.getLocText("FR-Designer_AlphaFine"));
refreshButton.set4ToolbarButton(); refreshButton.set4ToolbarButton();
refreshButton.setRolloverEnabled(false); refreshButton.setRolloverEnabled(false);

8
designer-realize/src/com/fr/design/mainframe/alphafine/search/manager/impl/FileSearchManager.java

@ -12,13 +12,15 @@ import com.fr.design.mainframe.alphafine.model.SearchResult;
import com.fr.design.mainframe.alphafine.search.manager.fun.AlphaFineSearchProvider; import com.fr.design.mainframe.alphafine.search.manager.fun.AlphaFineSearchProvider;
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.log.FineLoggerFactory;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.json.JSONObject; import com.fr.json.JSONObject;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import com.fr.stable.project.ProjectConstants; import com.fr.stable.project.ProjectConstants;
import java.io.BufferedReader; import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.File; import java.io.File;
import java.io.InputStream; import java.io.InputStream;
import java.io.InputStreamReader; import java.io.InputStreamReader;
@ -149,7 +151,7 @@ public class FileSearchManager implements AlphaFineSearchProvider {
*/ */
private void searchFileContent(Env env, String searchText, FileNode node, boolean isAlreadyContain, boolean needMore) { private void searchFileContent(Env env, String searchText, FileNode node, boolean isAlreadyContain, boolean needMore) {
try { try {
InputStream inputStream = env.readBean(node.getEnvPath().substring(ProjectConstants.REPORTLETS_NAME.length() + 1), ProjectConstants.REPORTLETS_NAME); InputStream inputStream = new ByteArrayInputStream(env.getFileOperator().read(StableUtils.pathJoin(ProjectConstants.REPORTLETS_NAME, node.getEnvPath().substring(ProjectConstants.REPORTLETS_NAME.length() + 1))));
InputStreamReader isr = new InputStreamReader(inputStream, "UTF-8"); InputStreamReader isr = new InputStreamReader(inputStream, "UTF-8");
BufferedReader reader = new BufferedReader(isr); BufferedReader reader = new BufferedReader(isr);
String line; String line;
@ -232,7 +234,7 @@ public class FileSearchManager implements AlphaFineSearchProvider {
* @throws Exception * @throws Exception
*/ */
private void listAll(Env env, String rootFilePath, List<FileNode> nodeList, boolean recurse) throws Exception { private void listAll(Env env, String rootFilePath, List<FileNode> nodeList, boolean recurse) throws Exception {
FileNode[] fns = env.listFile(rootFilePath); FileNode[] fns = env.getFileOperator().list(rootFilePath);
for (int i = 0; i < fns.length; i++) { for (int i = 0; i < fns.length; i++) {
FileNode fileNode = fns[i]; FileNode fileNode = fns[i];
if (fileNode.isDirectory()) { if (fileNode.isDirectory()) {

4
designer-realize/src/com/fr/design/mainframe/errorinfo/ErrorInfoLogAppender.java

@ -8,6 +8,7 @@ import com.fr.design.DesignerEnvManager;
import com.fr.general.FRLogManager; import com.fr.general.FRLogManager;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.general.LogDuration; import com.fr.general.LogDuration;
import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import com.fr.stable.project.ProjectConstants; import com.fr.stable.project.ProjectConstants;
import com.fr.stable.xml.XMLPrintWriter; import com.fr.stable.xml.XMLPrintWriter;
@ -18,6 +19,7 @@ import com.fr.third.apache.log4j.spi.LoggingEvent;
import com.fr.web.core.SessionDealWith; import com.fr.web.core.SessionDealWith;
import com.fr.web.core.SessionIDInfor; import com.fr.web.core.SessionIDInfor;
import java.io.ByteArrayInputStream;
import java.io.InputStream; import java.io.InputStream;
/** /**
@ -132,7 +134,7 @@ public class ErrorInfoLogAppender extends AppenderSkeleton {
} }
}; };
try { try {
file.readStream(FRContext.getCurrentEnv().readBean(bookPath, ProjectConstants.REPORTLETS_NAME)); file.readStream(new ByteArrayInputStream(FRContext.getCurrentEnv().getFileOperator().read(StableUtils.pathJoin(ProjectConstants.REPORTLETS_NAME, bookPath))));
return file.getTemplateID(); return file.getTemplateID();
} catch (Exception ignore) { } catch (Exception ignore) {
} }

2
designer-realize/src/com/fr/design/mainframe/errorinfo/ErrorInfoUploader.java

@ -69,7 +69,7 @@ public class ErrorInfoUploader {
// 从云中心更新最新的解决方案文件 // 从云中心更新最新的解决方案文件
private void checkUpdateSolution() { private void checkUpdateSolution() {
if (!VT4FR.AlphaFine.support()) { if (!VT4FR.AlphaFine.isSupport()) {
return; return;
} }

47
designer-realize/src/com/fr/start/Designer.java

@ -30,6 +30,7 @@ import com.fr.design.mainframe.JWorkBook;
import com.fr.design.mainframe.alphafine.component.AlphaFinePane; import com.fr.design.mainframe.alphafine.component.AlphaFinePane;
import com.fr.design.mainframe.bbs.UserInfoLabel; import com.fr.design.mainframe.bbs.UserInfoLabel;
import com.fr.design.mainframe.bbs.UserInfoPane; import com.fr.design.mainframe.bbs.UserInfoPane;
import com.fr.design.mainframe.templateinfo.TemplateInfoCollector;
import com.fr.design.mainframe.toolbar.ToolBarMenuDockPlus; import com.fr.design.mainframe.toolbar.ToolBarMenuDockPlus;
import com.fr.design.menu.KeySetUtils; import com.fr.design.menu.KeySetUtils;
import com.fr.design.menu.MenuDef; import com.fr.design.menu.MenuDef;
@ -41,6 +42,7 @@ import com.fr.design.utils.concurrent.ThreadFactoryBuilder;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
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.module.Module; import com.fr.module.Module;
import com.fr.module.ModuleContext; import com.fr.module.ModuleContext;
import com.fr.stable.BuildContext; import com.fr.stable.BuildContext;
@ -52,16 +54,23 @@ import com.fr.stable.xml.XMLTools;
import com.fr.start.fx.SplashFx; import com.fr.start.fx.SplashFx;
import com.fr.start.jni.SplashMac; import com.fr.start.jni.SplashMac;
import com.fr.start.module.StartupArgs; import com.fr.start.module.StartupArgs;
import com.fr.start.server.FineEmbedServer; import com.fr.start.preload.ImagePreLoader;
import com.fr.start.server.ServerTray; import com.fr.start.server.ServerTray;
import javax.swing.*; import javax.swing.JComponent;
import javax.swing.JPanel;
import javax.swing.border.MatteBorder; import javax.swing.border.MatteBorder;
import java.awt.*; import java.awt.Component;
import java.awt.Cursor;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Insets;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
import java.io.File; import java.io.File;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadFactory; import java.util.concurrent.ThreadFactory;
import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.ThreadPoolExecutor;
@ -87,7 +96,7 @@ public class Designer extends BaseDesigner {
* @param args 参数 * @param args 参数
*/ */
public static void main(String[] args) { public static void main(String[] args) {
preloadResource();
BuildContext.setBuildFilePath("/com/fr/stable/build.properties"); BuildContext.setBuildFilePath("/com/fr/stable/build.properties");
SplashContext.getInstance().registerSplash(createSplash()); SplashContext.getInstance().registerSplash(createSplash());
SplashContext.getInstance().show(); SplashContext.getInstance().show();
@ -102,6 +111,33 @@ public class Designer extends BaseDesigner {
} }
private static void preloadResource() {
ExecutorService service = Executors.newCachedThreadPool();
service.submit(new Runnable() {
@Override
public void run() {
SiteCenter.getInstance();
Cursor cursor = UIConstants.CELL_DEFAULT_CURSOR;
}
});
service.submit(new Runnable() {
@Override
public void run() {
new ImagePreLoader();
}
});
service.submit(new Runnable() {
@Override
public void run() {
TemplateInfoCollector.getInstance();
}
});
service.shutdown();
}
private static SplashStrategy createSplash() { private static SplashStrategy createSplash() {
// 这里可以开接口加载自定义启动画面 // 这里可以开接口加载自定义启动画面
if (OperatingSystem.isWindows()) { if (OperatingSystem.isWindows()) {
@ -498,6 +534,9 @@ public class Designer extends BaseDesigner {
collector.collectStopTime(); collector.collectStopTime();
collector.saveXMLFile(); collector.saveXMLFile();
Env currentEnv = FRContext.getCurrentEnv(); Env currentEnv = FRContext.getCurrentEnv();
if (currentEnv == null) {
return;
}
currentEnv.doWhenServerShutDown(); currentEnv.doWhenServerShutDown();
} }

406
designer-realize/src/com/fr/start/preload/ImagePreLoader.java

@ -0,0 +1,406 @@
package com.fr.start.preload;
import com.fr.general.IOUtils;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
/**
* 在设计器框架加载之前, 先用多个线程把相关的资源文件全部load到缓存中.
*/
public class ImagePreLoader {
public static final int THRESHOLD = 50;
public ImagePreLoader() {
ExecutorService service = Executors.newCachedThreadPool();
int len = preLoadImages.length;
int start = 0;
for (int i = 0; i < len; i++) {
if (i != 0 && i % THRESHOLD == 0) {
loadImage(start,i, service);
start = i;
}
if (len - i < THRESHOLD) {
loadImage(start, len, service);
break;
}
}
service.shutdown();
}
private void loadImage(final int start, final int end, ExecutorService service) {
service.submit(new Runnable() {
@Override
public void run() {
for (int i = start; i < end; i++) {
IOUtils.readImageWithCache(preLoadImages[i]);
}
}
});
}
private String[] preLoadImages = {
"com/fr/design/images/m_file/formExport.png",
"com/fr/base/images/oem/cpt.png",
"com/fr/design/images/data/store_procedure.png",
"/com/fr/design/images/m_file/preview.png",
"com/fr/base/images/cell/blank.gif",
"com/fr/design/images/data/dock/serverdatabase.png",
"/com/fr/design/images/data/dock/serverclasstabledata.png",
"/com/fr/design/images/data/dock/serverdatatable.png",
"/com/fr/design/images/data/file.png",
"/com/fr/design/images/data/tree.png",
"/com/fr/design/images/buttonicon/minus.png",
"/com/fr/design/images/buttonicon/plus.png",
"/com/fr/design/images/data/multi.png",
"/com/fr/design/images/data/store_procedure.png",
"com/fr/design/images/buttonicon/arrowdown.png",
"com/fr/design/images/buttonicon/arrowup.png",
"com/fr/design/images/buttonicon/yes.png",
"com/fr/design/images/buttonicon/select_item.png",
"com/fr/design/images/buttonicon/prewidget.png",
"com/fr/design/images/buttonicon/editn.png",
"com/fr/design/images/buttonicon/editp.png",
"com/fr/design/images/buttonicon/hiden.png",
"com/fr/design/images/buttonicon/hidep.png",
"com/fr/design/images/buttonicon/viewn.png",
"com/fr/design/images/buttonicon/viewp.png",
"com/fr/design/images/buttonicon/run24.png",
"com/fr/design/images/buttonicon/runs.png",
"com/fr/design/mainframe/alphafine/images/smallsearch.png",
"com/fr/design/images/buttonicon/pageb24.png",
"com/fr/design/images/buttonicon/writeb24.png",
"com/fr/design/images/buttonicon/anab24.png",
"com/fr/design/images/buttonicon/pages.png",
"com/fr/design/images/buttonicon/writes.png",
"com/fr/design/images/buttonicon/anas.png",
"com/fr/design/images/buttonicon/refresh.png",
"com/fr/design/images/gui/color/foreground.png",
"com/fr/design/images/buttonicon/history.png",
"com/fr/design/images/m_file/close.png",
"com/fr/design/images/m_file/edit.png",
"com/fr/design/images/data/search.png",
"com/fr/design/images/data/black_search.png",
"com/fr/design/images/data/source/delete.png",
"com/fr/design/images/control/edit.png",
"com/fr/design/images/control/edit_white.png",
"com/fr/design/images/buttonicon/prevew_down_icon.png",
"com/fr/design/images/m_report/close.png",
"com/fr/design/images/m_report/close_over.png",
"com/fr/design/images/m_report/close_press.png",
"com/fr/design/images/buttonicon/save.png",
"com/fr/design/images/buttonicon/undo.png",
"com/fr/design/images/buttonicon/redo.png",
"com/fr/design/images/buttonicon/additicon_grey.png",
"com/fr/design/images/buttonicon/addicon.png",
"com/fr/design/images/buttonicon/list_normal.png",
"com/fr/design/images/buttonicon/list_pressed.png",
"com/fr/design/images/buttonicon/close_icon.png",
"com/fr/design/images/buttonicon/mouseoverclose icon.png",
"com/fr/design/images/buttonicon/pressclose icon.png",
"com/fr/design/images/buttonicon/open.png",
"com/fr/design/images/m_file/view_folder.png",
"com/fr/design/images/data/source/rename.png",
"com/fr/design/images/buttonicon/minus.png",
"com/fr/design/images/buttonicon/plus.png",
"com/fr/design/images/data/database.png",
"com/fr/design/images/data/source/classTableData.png",
"com/fr/design/images/data/dataTable.png",
"com/fr/design/images/data/multi.png",
"com/fr/design/images/data/file.png",
"com/fr/design/images/data/tree.png",
"com/fr/design/images/control/tab/remove.png",
"com/fr/design/images/m_file/preview.png",
"com/fr/design/images/m_web/connection.png",
"com/fr/design/images/control/addPopup.png",
"com/fr/design/images/buttonicon/propertiestab/cellelement_normal.png",
"com/fr/design/images/buttonicon/propertiestab/cellattr_normal.png",
"com/fr/design/images/buttonicon/propertiestab/floatelement_normal.png",
"com/fr/design/images/buttonicon/propertiestab/widgetsettings_normal.png",
"com/fr/design/images/buttonicon/propertiestab/conditionattr_normal.png",
"com/fr/design/images/buttonicon/propertiestab/hyperlink_normal.png",
"com/fr/design/images/buttonicon/propertiestab/widgetlib_normal.png",
"com/fr/design/images/buttonicon/propertiestab/authorityedit_normal.png",
"com/fr/design/images/buttonicon/propertiestab/configuredroles_normal.png",
"com/fr/design/images/buttonicon/propertiestab/cellelement_selected.png",
"com/fr/design/images/log/selectedall.png",
"com/fr/design/images/m_edit/copy.png",
"com/fr/design/images/log/clear.png",
"com/fr/design/images/log/clear.png",
"com/fr/design/images/log/selectedall.png",
"com/fr/design/images/log/setting.png",
"com/fr/design/images/buttonicon/newcpts.png",
"com/fr/base/images/oem/logo.png",
"com/fr/design/images/data/bind/localconnect.png",
"com/fr/design/images/gui/tab_add_normal.png",
"com/fr/design/images/m_help/demo.png",
"com/fr/design/images/gui/tab_add_hover.png",
"com/fr/design/images/gui/tab_add_click.png",
"com/fr/design/images/gui/tab_delete.png",
"com/fr/design/images/bbs.png",
"com/fr/design/images/video.png",
"com/fr/design/images/help.png",
"com/fr/design/images/questions.png",
"com/fr/design/images/update.png",
"com/fr/design/images/need.png",
"com/fr/design/images/bug.png",
"com/fr/design/images/signature.png",
"com/fr/design/images/m_file/switch.png",
"com/fr/design/images/gui/blank.gif",
"com/fr/design/images/gui/folder.png",
"com/fr/design/images/gui/javaFile.gif",
"com/fr/design/images/gui/classFile.gif",
"com/fr/design/images/gui/jspFile.gif",
"com/fr/design/images/gui/jsFile.gif",
"com/fr/design/images/gui/xmlFile.gif",
"com/fr/design/images/gui/htmlFile.gif",
"com/fr/design/images/gui/jarFile.gif",
"com/fr/design/images/gui/gifFile.gif",
"com/fr/design/images/gui/jpgFile.gif",
"com/fr/design/images/gui/bmpFile.gif",
"com/fr/design/images/gui/cptFile.png",
"com/fr/design/images/gui/frm.png",
"com/fr/design/images/gui/cht.png",
"com/fr/design/images/chart/ChartType.png",
"com/fr/van/chart/map/images/mapData.png",
"com/fr/design/images/buttonicon/add.png",
"com/fr/base/images/cell/control/remove.png",
"com/fr/design/images/control/up.png",
"com/fr/design/images/control/down.png",
"com/fr/design/images/control/sortAsc.png",
"com/fr/design/images/m_insert/formula.png",
"com/fr/design/images/calender/year_reduce.png",
"com/fr/design/images/calender/year_reduce_hover.png",
"com/fr/design/images/calender/year_reduce_click.png",
"com/fr/design/images/calender/month_reduce.png",
"com/fr/design/images/calender/month_reduce_hover.png",
"com/fr/design/images/calender/month_reduce_click.png",
"com/fr/design/images/calender/month_add.png",
"com/fr/design/images/calender/month_add_hover.png",
"com/fr/design/images/calender/month_add_click.png",
"com/fr/design/images/calender/year_add.png",
"com/fr/design/images/calender/year_add_hover.png",
"com/fr/design/images/calender/year_add_click.png",
"com/fr/design/images/buttonicon/type_string.png",
"com/fr/base/images/cell/control/add.png",
"com/fr/design/images/expand/cellAttr.gif",
"com/fr/design/images/expand/none16x16.png",
"com/fr/design/images/expand/asc.png",
"com/fr/design/images/expand/des.png",
"com/fr/design/images/form/toolbar/pie.png",
"com/fr/design/images/buttonicon/widget/date_16.png",
"com/fr/design/images/buttonicon/widget/tree_16.png",
"com/fr/design/images/buttonicon/widget/comboboxtree.png",
"com/fr/design/images/buttonicon/widget/checkbox_group_16.png",
"com/fr/design/images/buttonicon/widget/button_group_16.png",
"com/fr/design/images/buttonicon/widget/number_field_16.png",
"com/fr/design/images/buttonicon/widget/label_16.png",
"com/fr/web/images/form/resources/button_16.png",
"com/fr/design/images/buttonicon/widget/button_16.png",
"com/fr/design/images/buttonicon/widget/files_up.png",
"com/fr/design/images/buttonicon/widget/combo_box_16.png",
"com/fr/design/images/buttonicon/widget/combo_check_16.png",
"com/fr/design/images/buttonicon/widget/check_box_16.png",
"com/fr/web/images/form/resources/list_16.png",
"com/fr/design/images/buttonicon/widget/text_field_16.png",
"com/fr/design/images/buttonicon/widget/text_area_16.png",
"com/fr/design/images/buttonicon/widget/password_field_16.png",
"com/fr/web/images/form/resources/iframe_16.png",
"com/fr/design/images/form/toolbar/column.png",
"com/fr/design/images/form/toolbar/bar.png",
"com/fr/design/images/form/toolbar/line.png",
"com/fr/design/images/form/toolbar/area.png",
"com/fr/design/images/form/toolbar/gauge.png",
"com/fr/design/images/form/toolbar/radar.png",
"com/fr/design/images/form/toolbar/scatter.png",
"com/fr/design/images/form/toolbar/bubble.png",
"com/fr/design/images/form/toolbar/custom.png",
"com/fr/design/images/form/toolbar/multiPie.png",
"com/fr/design/images/form/toolbar/map.png",
"com/fr/design/images/form/toolbar/drillmap.png",
"com/fr/design/images/form/toolbar/treeMap.png",
"com/fr/design/images/form/toolbar/funnel.png",
"com/fr/design/images/form/toolbar/heatmap.png",
"com/fr/design/images/form/toolbar/wordcloud.png",
"com/fr/design/images/form/toolbar/gantt.png",
"com/fr/design/images/form/toolbar/structure.png",
"com/fr/design/images/control/help_open.png",
"com/fr/web/images/form/forbid.png",
"com/fr/web/images/form/resources/layout_absolute.png",
"com/fr/design/images/m_edit/cut.png",
"com/fr/design/images/m_edit/paste.png",
"com/fr/design/images/m_report/delete.png",
"com/fr/design/images/toolbarbtn/parametersetting.png",
"com/fr/base/images/oem/addworksheet.png",
"com/fr/design/images/sheet/addpolysheet.png",
"com/fr/base/images/oem/worksheet.png",
"com/fr/design/images/sheet/polysheet.png",
"com/fr/design/images/sheet/left_normal@1x.png",
"com/fr/design/images/sheet/right_normal@1x.png",
"com/fr/design/images/sheet/left_hover@1x.png",
"com/fr/design/images/sheet/right_hover@1x.png",
"com/fr/design/images/data/source/normalDown20.png",
"com/fr/design/images/data/source/hoverDown20.png",
"com/fr/design/images/data/source/normalUp20.png",
"com/fr/design/images/data/source/hoverUp20.png",
"com/fr/design/images/m_edit/formatBrush.png",
"com/fr/design/images/expand/none16x16_selected@1x.png",
"com/fr/design/images/expand/vertical.png",
"com/fr/design/images/expand/vertical_selected@1x.png",
"com/fr/design/images/expand/landspace.png",
"com/fr/design/images/expand/landspace_selected@1x.png",
"com/fr/design/images/buttonicon/select.png",
"com/fr/design/images/expand/asc_selected.png",
"com/fr/design/images/expand/des_selected.png",
"com/fr/design/images/m_format/cellstyle/bold.png",
"com/fr/design/images/m_format/cellstyle/italic.png",
"com/fr/design/images/m_format/cellstyle/underline.png",
"com/fr/design/images/m_format/cellstyle/strikethrough.png",
"com/fr/design/images/m_format/cellstyle/shadow.png",
"com/fr/design/images/m_format/cellstyle/sup.png",
"com/fr/design/images/m_format/cellstyle/sub.png",
"com/fr/base/images/dialog/border/top.png",
"com/fr/design/images/m_format/cellstyle/top_white.png",
"com/fr/base/images/dialog/border/left.png",
"com/fr/design/images/m_format/cellstyle/left_white.png",
"com/fr/base/images/dialog/border/bottom.png",
"com/fr/design/images/m_format/cellstyle/bottom_white.png",
"com/fr/base/images/dialog/border/right.png",
"com/fr/design/images/m_format/cellstyle/right_white.png",
"com/fr/base/images/dialog/border/horizontal.png",
"com/fr/design/images/m_format/cellstyle/horizontal_white.png",
"com/fr/base/images/dialog/border/vertical.png",
"com/fr/design/images/m_format/cellstyle/vertical_white.png",
"com/fr/design/images/m_format/out.png",
"com/fr/design/images/m_format/cellstyle/out_white.png",
"com/fr/design/images/m_format/in.png",
"com/fr/design/images/m_format/cellstyle/in_white.png",
"com/fr/design/images/m_format/cellstyle/h_left_normal.png",
"com/fr/design/images/m_format/cellstyle/h_left_normal_white.png",
"com/fr/design/images/m_format/cellstyle/h_center_normal.png",
"com/fr/design/images/m_format/cellstyle/h_center_normal_white.png",
"com/fr/design/images/m_format/cellstyle/h_right_normal.png",
"com/fr/design/images/m_format/cellstyle/h_right_normal_white.png",
"com/fr/design/images/m_format/cellstyle/h_s_normal.png",
"com/fr/design/images/m_format/cellstyle/h_s_normal_white.png",
"com/fr/design/images/m_format/cellstyle/defaultAlignment.png",
"com/fr/design/images/m_format/cellstyle/defaultAlignment_white.png",
"com/fr/design/images/m_format/cellstyle/v_top_normal.png",
"com/fr/design/images/m_format/cellstyle/v_top_normal_white.png",
"com/fr/design/images/m_format/cellstyle/v_center_normal.png",
"com/fr/design/images/m_format/cellstyle/v_center_normal_white.png",
"com/fr/design/images/m_format/cellstyle/v_down_normal.png",
"com/fr/design/images/m_format/cellstyle/v_down_normal_white.png",
"com/fr/design/images/control/refresh.png",
"com/fr/design/images/toolbarbtn/close.png",
"com/fr/design/images/buttonicon/new_form3.png",
"com/fr/design/images/m_file/save.png",
"com/fr/design/images/m_file/saveAs.png",
"com/fr/design/images/m_edit/undo.png",
"com/fr/design/images/m_edit/redo.png",
"com/fr/design/images/m_file/excel.png",
"com/fr/design/images/m_file/pdf.png",
"com/fr/design/images/m_file/word.png",
"com/fr/design/images/m_file/svg.png",
"com/fr/design/images/m_file/csv.png",
"com/fr/design/images/m_file/text.png",
"com/fr/design/images/m_web/datasource.png",
"com/fr/design/images/m_report/webreportattribute.png",
"com/fr/design/images/m_report/exportAttr.png",
"com/fr/design/images/m_report/p.png",
"com/fr/design/images/m_report/mobile.png",
"com/fr/web/images/print.png",
"com/fr/design/images/m_report/watermark.png",
"com/fr/design/images/m_file/pageSetup.png",
"com/fr/design/images/m_report/header.png",
"com/fr/design/images/m_report/footer.png",
"com/fr/design/images/m_report/background.png",
"com/fr/design/images/m_report/reportWriteAttr.png",
"com/fr/design/images/m_report/linearAttr.png",
"com/fr/design/images/m_report/reportEngineAttr.png",
"com/fr/design/images/m_report/allow_authority_edit.png",
"com/fr/design/images/m_insert/bindColumn.png",
"com/fr/design/images/m_insert/text.png",
"com/fr/design/images/m_insert/richtext.png",
"com/fr/design/images/m_insert/chart.png",
"com/fr/design/images/m_insert/image.png",
"com/fr/design/images/m_insert/bias.png",
"com/fr/design/images/arrow/arrow_up.png",
"com/fr/design/images/m_insert/subReport.png",
"com/fr/design/images/arrow/arrow_down.png",
"com/fr/design/images/toolbarbtn/toolbarbtnsetting.png",
"com/fr/design/images/control/addPopup.png",
"com/fr/design/images/toolbarbtn/toolbarbtnclear.png",
"com/fr/design/images/m_insert/insertRow.png",
"com/fr/design/images/m_insert/insertColumn.png",
"com/fr/design/images/m_format/modified.png",
"com/fr/design/images/m_format/highlight.png",
"com/fr/web/images/form/resources/preview_16.png",
"com/fr/web/images/save.png",
"com/fr/design/images/m_insert/hyperLink.png",
"com/fr/web/images/flashPrint.png",
"com/fr/design/images/m_edit/merge.png",
"com/fr/web/images/appletPrint.png",
"com/fr/design/images/m_edit/unmerge.png",
"com/fr/web/images/pdf.png",
"com/fr/design/images/m_format/cellAttr.png",
"com/fr/web/images/pdfPrint.png",
"com/fr/web/images/serverPrint.png",
"com/fr/web/images/email.png",
"com/fr/web/images/preview.png",
"com/fr/design/images/server/platform_16_16.png",
"com/fr/design/images/data/user_widget.png",
"com/fr/design/images/server/plugin.png",
"com/fr/web/images/excel.png",
"com/fr/design/images/m_web/function.png",
"com/fr/web/images/word.png",
"com/fr/web/images/pageSetup.png",
"com/fr/web/images/export.png",
"com/fr/design/images/m_web/edit.png",
"com/fr/web/images/pageNumber.png",
"com/fr/web/images/first.png",
"com/fr/design/images/m_web/style.png",
"com/fr/web/images/last.png",
"com/fr/web/images/previous.png",
"com/fr/web/images/next.png",
"com/fr/web/images/scale.png",
"com/fr/web/images/appendRow.png",
"com/fr/web/images/deleteRow.png",
"com/fr/web/images/verify.gif",
"com/fr/web/images/save2.png",
"com/fr/design/images/m_file/export.png",
"com/fr/web/images/showValue.png",
"com/fr/web/images/pianyi.png",
"com/fr/web/images/writeOffline.png",
"com/fr/web/images/edit/stash.png",
"com/fr/web/images/edit/clearstash.png",
"com/fr/design/images/m_insert/cell.png",
"com/fr/design/images/m_insert/float.png",
"com/fr/design/images/gui/color/background.png",
"com/fr/design/images/m_format/cell.png",
"com/fr/design/images/data/source/dataDictionary.png",
"com/fr/design/images/m_format/cellstyle/bold_white.png",
"com/fr/design/images/m_format/cellstyle/italic_white.png",
"com/fr/design/images/m_format/cellstyle/underline_white.png",
"com/fr/design/images/m_format/noboder.png",
"com/fr/design/images/gui/popup.gif",
"com/fr/design/images/m_insert/floatPop.png",
"com/fr/web/images/platform/demo.png",
"com/fr/base/images/dialog/pagesetup/down.png",
"com/fr/base/images/dialog/pagesetup/over.png",
"com/fr/web/images/reportlet.png",
"com/fr/design/images/buttonicon/switchShortCuts.png",
"com/fr/design/images/buttonicon/ds_column_name.png",
"com/fr/base/images/cell/control/add.png",
"com/fr/base/images/cell/control/rename.png",
"com/fr/base/images/cell/control/remove.png",
"com/fr/design/images/control/up.png",
"com/fr/design/images/control/down.png",
"com/fr/design/images/condition/bracket.png",
"com/fr/design/images/condition/unBracket.png"
};
}
Loading…
Cancel
Save