Browse Source

Merge branch 'release/9.0' of http://cloud.finedevelop.com:2015/scm/~fanglei/design into release/9.0

master
方磊 7 years ago
parent
commit
7c1de56376
  1. 2
      build.9.0.gradle
  2. 4
      designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java
  3. 4
      designer/src/com/fr/design/mainframe/ReportFloatPane.java
  4. 10
      designer/src/com/fr/design/mainframe/errorinfo/ErrorInfoUploader.java
  5. 8
      designer/src/com/fr/poly/PolyDesignUI.java
  6. 4
      designer/src/com/fr/start/Designer.java
  7. 2
      designer_base/src/com/fr/design/extra/PluginUtils.java
  8. 8
      designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java
  9. 3
      designer_base/src/com/fr/design/mainframe/DesignerFrame.java
  10. 2
      designer_base/src/com/fr/design/module/DesignModule.java
  11. 2
      designer_base/src/com/fr/design/present/dict/FormulaDictPane.java
  12. 3
      designer_base/src/com/fr/design/present/dict/TableDataDictPane.java
  13. 3
      designer_base/src/com/fr/start/BaseDesigner.java
  14. 40
      designer_base/src/com/fr/start/SplashWindow.java
  15. 4
      designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java

2
build.9.0.gradle

@ -15,7 +15,7 @@ task appletJar<<{
fileset(dir:"${basicDir}/report/build/classes/main") fileset(dir:"${basicDir}/report/build/classes/main")
fileset(dir:"${basicDir}/platform/build/classes/main") fileset(dir:"${basicDir}/platform/build/classes/main")
} }
unjar(src:"${libDir}/3rd.jar",dest:"./tmp") unjar(src:"${libDir}/fr-third-9.0.jar",dest:"./tmp")
unjar(src:"${libDir}/servlet-api.jar",dest:"./tmp") unjar(src:"${libDir}/servlet-api.jar",dest:"./tmp")
jar(jarfile:"build/libs/fr-applet-9.0.jar"){ jar(jarfile:"build/libs/fr-applet-9.0.jar"){
fileset(dir:"build/classes"){ fileset(dir:"build/classes"){

4
designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java

@ -75,7 +75,9 @@ public class ElementCasePaneDelegate extends ElementCasePane<WorkSheet> {
EastRegionContainerPane.getInstance().replaceConfiguredRolesPane(RolesAlreadyEditedPane.getInstance()); EastRegionContainerPane.getInstance().replaceConfiguredRolesPane(RolesAlreadyEditedPane.getInstance());
return; return;
} }
CellWidgetPropertyPane.getInstance().populate(ElementCasePaneDelegate.this); if (DesignerContext.getDesignerFrame().getSelectedJTemplate() != null) {
CellWidgetPropertyPane.getInstance().populate(ElementCasePaneDelegate.this);
}
CellElementPropertyPane.getInstance().populate(ElementCasePaneDelegate.this); CellElementPropertyPane.getInstance().populate(ElementCasePaneDelegate.this);
QuickEditorRegion.getInstance().populate(getCurrentEditor()); QuickEditorRegion.getInstance().populate(getCurrentEditor());
JTemplate editingTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); JTemplate editingTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate();

4
designer/src/com/fr/design/mainframe/ReportFloatPane.java

@ -80,7 +80,9 @@ public class ReportFloatPane extends JPanel {
insertFloatMenu.setIconPath("com/fr/design/images/control/addPopup.png"); insertFloatMenu.setIconPath("com/fr/design/images/control/addPopup.png");
JTemplate editingTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); JTemplate editingTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate();
ElementCasePaneDelegate elementCasePaneDelegate = (ElementCasePaneDelegate) editingTemplate.getCurrentElementCasePane(); ElementCasePaneDelegate elementCasePaneDelegate = (ElementCasePaneDelegate) editingTemplate.getCurrentElementCasePane();
refreshInsertFloatMenu(elementCasePaneDelegate); if (elementCasePaneDelegate != null) {
refreshInsertFloatMenu(elementCasePaneDelegate);
}
} }
private UIButton createButtonUI() { private UIButton createButtonUI() {

10
designer/src/com/fr/design/mainframe/errorinfo/ErrorInfoUploader.java

@ -11,6 +11,8 @@ import com.fr.json.JSONException;
import com.fr.json.JSONObject; import com.fr.json.JSONObject;
import com.fr.license.function.VT4FR; import com.fr.license.function.VT4FR;
import com.fr.log.LogHandler; import com.fr.log.LogHandler;
import com.fr.regist.FRCoreContext;
import com.fr.regist.LicenseListener;
import com.fr.stable.CodeUtils; import com.fr.stable.CodeUtils;
import com.fr.stable.EnvChangedListener; import com.fr.stable.EnvChangedListener;
import com.fr.stable.ProductConstants; import com.fr.stable.ProductConstants;
@ -52,6 +54,14 @@ public class ErrorInfoUploader {
// 这个控制没啥意义, 主要在于宣传功能. // 这个控制没啥意义, 主要在于宣传功能.
licSupport = VT4FR.AlphaFine.support(); licSupport = VT4FR.AlphaFine.support();
FRCoreContext.listenerLicense(new LicenseListener() {
@Override
public void onChange() {
licSupport = VT4FR.AlphaFine.support();
}
});
} }
private ErrorInfoUploader() { private ErrorInfoUploader() {

8
designer/src/com/fr/poly/PolyDesignUI.java

@ -209,10 +209,10 @@ public class PolyDesignUI extends ComponentUI {
private void paintAddingData(Graphics g, AddingData addingData) { private void paintAddingData(Graphics g, AddingData addingData) {
BlockCreator comp = addingData.getCreator(); BlockCreator comp = addingData.getCreator();
int x = (int) (addingData.getCurrentX()*time); int x = (int) (addingData.getCurrentX() / time);
int y = (int) (addingData.getCurrentY()*time); int y = (int) (addingData.getCurrentY() / time);
int width = (int) (comp.getWidth()*time); int width = comp.getWidth();
int height = (int) (comp.getHeight()*time); int height = comp.getHeight();
paintCreator(g, comp, x, y, width, height); paintCreator(g, comp, x, y, width, height);
} }

4
designer/src/com/fr/start/Designer.java

@ -1,6 +1,7 @@
package com.fr.start; package com.fr.start;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.Env;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.design.actions.core.ActionFactory; import com.fr.design.actions.core.ActionFactory;
@ -447,7 +448,8 @@ public class Designer extends BaseDesigner {
InformationCollector collector = InformationCollector.getInstance(); InformationCollector collector = InformationCollector.getInstance();
collector.collectStopTime(); collector.collectStopTime();
collector.saveXMLFile(); collector.saveXMLFile();
ServletContext.fireServletStopListener(); Env currentEnv = FRContext.getCurrentEnv();
currentEnv.doWhenServerShutDown();
} }
} }

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

@ -195,7 +195,7 @@ public class PluginUtils {
JSONArray resultJSONArray = JSONArray.create(); JSONArray resultJSONArray = JSONArray.create();
for(int i = 0; i < oriJSONArray.length(); i++){ for(int i = 0; i < oriJSONArray.length(); i++){
JSONObject jo = oriJSONArray.getJSONObject(i); JSONObject jo = oriJSONArray.getJSONObject(i);
String envVersion = jo.optString("env-version"); String envVersion = jo.optString("envversion");
if(isCompatibleCurrentEnv(envVersion)){ if(isCompatibleCurrentEnv(envVersion)){
resultJSONArray.put(jo); resultJSONArray.put(jo);
} }

8
designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java

@ -37,7 +37,8 @@ public abstract class UIControlPane extends BasicPane implements UnrepeatedNameH
protected CardLayout cardLayout; protected CardLayout cardLayout;
protected JPanel cardPane; protected JPanel cardPane;
protected BasePlot plot; protected BasePlot plot;
private static final int TOP_TOOLBAR_HEIGHT = 24; private static final int TOP_TOOLBAR_HEIGHT = 20;
private static final int TOP_TOOLBAR_WIDTH = 156; // 可能因为用了tablelayout,要比其他地方多一个像素,看起来才正常
public UIControlPane() { public UIControlPane() {
this.initComponentPane(); this.initComponentPane();
@ -191,6 +192,7 @@ public abstract class UIControlPane extends BasicPane implements UnrepeatedNameH
g2.fillRect(0, 0, c.getWidth(), c.getHeight()); g2.fillRect(0, 0, c.getWidth(), c.getHeight());
} }
}); });
topToolBar.setBorder(null);
topToolBar.setLayout(new BorderLayout()); topToolBar.setLayout(new BorderLayout());
ShortCut addItem = addItemShortCut().getShortCut(); ShortCut addItem = addItemShortCut().getShortCut();
addItem.intoJToolBar(topToolBar); addItem.intoJToolBar(topToolBar);
@ -206,10 +208,10 @@ public abstract class UIControlPane extends BasicPane implements UnrepeatedNameH
protected JPanel getLeftTopPane (UIToolbar topToolBar) { protected JPanel getLeftTopPane (UIToolbar topToolBar) {
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize = { p, f}; double[] columnSize = { p, f, TOP_TOOLBAR_WIDTH};
double[] rowSize = {TOP_TOOLBAR_HEIGHT}; double[] rowSize = {TOP_TOOLBAR_HEIGHT};
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{new UILabel(getAddItemText()), topToolBar}, new Component[]{new UILabel(getAddItemText()), new JPanel(), topToolBar},
}; };
return TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); return TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize);
} }

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

@ -925,7 +925,8 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
} else { } else {
this.addAndActivateJTemplate(jt); this.addAndActivateJTemplate(jt);
} }
//REPORT-5084:激活后刷新一下右側面板
jt.refreshEastPropertiesPane();
} }
/** /**

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

@ -95,7 +95,7 @@ public abstract class DesignModule extends TopModule {
new NameObjectCreator(Inter.getLocText("FR-Designer_Email"), EmailJavaScript.class, EmailPane.class), new NameObjectCreator(Inter.getLocText("FR-Designer_Email"), EmailJavaScript.class, EmailPane.class),
new NameObjectCreator(Inter.getLocText("Hyperlink-Web_link"), WebHyperlink.class, WebHyperlinkPane.ChartNoRename.class), new NameObjectCreator(Inter.getLocText("Hyperlink-Web_link"), WebHyperlink.class, WebHyperlinkPane.ChartNoRename.class),
new NameObjectCreator(Inter.getLocText("JavaScript-Dynamic_Parameters"), ParameterJavaScript.class, ParameterJavaScriptPane.ChartNoRename.class), new NameObjectCreator(Inter.getLocText("JavaScript-Dynamic_Parameters"), ParameterJavaScript.class, ParameterJavaScriptPane.ChartNoRename.class),
new NameObjectCreator("FR-Designer_JavaScript", JavaScriptImpl.class, JavaScriptImplPane.ChartNoRename.class) new NameObjectCreator(Inter.getLocText("FR-Designer_JavaScript"), JavaScriptImpl.class, JavaScriptImplPane.ChartNoRename.class)
}; };
} }

2
designer_base/src/com/fr/design/present/dict/FormulaDictPane.java

@ -49,7 +49,7 @@ public class FormulaDictPane extends FurtherBasicBeanPane<FormulaDictionary> {
int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}}; int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}};
UILabel tag = new UILabel(Inter.getLocText("FR-Designer-Formula_Dictionary_Display_Examples_Html")); UILabel tag = new UILabel(Inter.getLocText("FR-Designer-Formula_Dictionary_Display_Examples_Html"));
tag.setForeground(new Color(51, 51, 52)); tag.setForeground(new Color(143, 143, 146));
tag.setPreferredSize(new Dimension(225, 80)); tag.setPreferredSize(new Dimension(225, 80));
JPanel t = new JPanel(new BorderLayout()); JPanel t = new JPanel(new BorderLayout());
t.add(tag, BorderLayout.CENTER); t.add(tag, BorderLayout.CENTER);

3
designer_base/src/com/fr/design/present/dict/TableDataDictPane.java

@ -51,6 +51,7 @@ import java.util.List;
public class TableDataDictPane extends FurtherBasicBeanPane<TableDataDictionary> implements Previewable, UIObserver { public class TableDataDictPane extends FurtherBasicBeanPane<TableDataDictionary> implements Previewable, UIObserver {
private static final int BEGIN = 1; private static final int BEGIN = 1;
private static final int END = 10; private static final int END = 10;
private static final int VGAP = 24;
private static final long serialVersionUID = -5469742115988153206L; private static final long serialVersionUID = -5469742115988153206L;
private static final int SELECTED_NO_TABLEDATA = -2; private static final int SELECTED_NO_TABLEDATA = -2;
public TableDataComboBox tableDataNameComboBox; public TableDataComboBox tableDataNameComboBox;
@ -111,7 +112,7 @@ public class TableDataDictPane extends FurtherBasicBeanPane<TableDataDictionary>
new Component[]{new UILabel(Inter.getLocText("FR-Designer_Display_Value") + " ", UILabel.LEFT), valueDictPane}, new Component[]{new UILabel(Inter.getLocText("FR-Designer_Display_Value") + " ", UILabel.LEFT), valueDictPane},
}; };
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_MEDIUM, LayoutConstants.VGAP_MEDIUM); JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, VGAP, LayoutConstants.VGAP_MEDIUM);
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
this.add(panel, BorderLayout.CENTER); this.add(panel, BorderLayout.CENTER);
} }

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

@ -3,6 +3,8 @@
*/ */
package com.fr.start; package com.fr.start;
import com.fr.base.ConfigManagerCreatorProxy;
import com.fr.base.ConfigManagerFactory;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.design.ExtraDesignClassManager; import com.fr.design.ExtraDesignClassManager;
@ -62,6 +64,7 @@ public abstract class BaseDesigner extends ToolBarMenuDock {
public BaseDesigner(String[] args) { public BaseDesigner(String[] args) {
RestartHelper.deleteRecordFilesWhenStart(); RestartHelper.deleteRecordFilesWhenStart();
ConfigManagerFactory.registerConfigManagerProxy(new ConfigManagerCreatorProxy());
//启动core //启动core
BuildContext.setBuildFilePath(buildPropertiesPath()); BuildContext.setBuildFilePath(buildPropertiesPath());
Register.load(); Register.load();

40
designer_base/src/com/fr/start/SplashWindow.java

@ -1,46 +1,40 @@
package com.fr.start; package com.fr.start;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Image;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JPanel;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.stable.OperatingSystem; import com.fr.stable.OperatingSystem;
import com.sun.awt.AWTUtilities; import com.sun.awt.AWTUtilities;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Image;
public class SplashWindow extends JFrame { public class SplashWindow extends JFrame {
private SplashPane splash = null; private SplashPane splash = null;
@SuppressWarnings("LeakingThisInConstructor") @SuppressWarnings("LeakingThisInConstructor")
public SplashWindow(SplashPane splashPane) { public SplashWindow(SplashPane splashPane) {
// alex:必须设置这个属性为true,才可以用透明背景 // alex:必须设置这个属性为true,才可以用透明背景
System.setProperty("sun.java2d.noddraw", "true"); System.setProperty("sun.java2d.noddraw", "true");
this.setIconImage(BaseUtils.readImage("/com/fr/base/images/oem/logo.png")); this.setIconImage(BaseUtils.readImage("/com/fr/base/images/oem/logo.png"));
JPanel defaultPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
this.setContentPane(defaultPane);
defaultPane.setBackground(new Color(0, 0, 0, 0));
//slash pane //slash pane
this.splash = splashPane; this.splash = splashPane;
splash.setBackground(null);
Image image = splash.getSplashImage();
ImageIcon imageIcon = new ImageIcon(image);
if (splash != null) { if (splash != null) {
defaultPane.add(splash, BorderLayout.CENTER); splash.setBackground(null);
Image image = splash.getSplashImage();
ImageIcon imageIcon = new ImageIcon(image);
this.setContentPane(splash);
this.setSize(new Dimension(imageIcon.getIconWidth(), imageIcon.getIconHeight())); this.setSize(new Dimension(imageIcon.getIconWidth(), imageIcon.getIconHeight()));
} else { } else {
defaultPane.add(new UILabel("Error, please contract: support@finereport.com"), BorderLayout.CENTER); this.setContentPane(new UILabel("Error, please contract: support@finereport.com"));
this.setSize(new Dimension(480, 320)); this.setSize(new Dimension(480, 320));
} }
@ -50,7 +44,7 @@ public class SplashWindow extends JFrame {
//使窗体背景透明 //使窗体背景透明
if (OperatingSystem.isWindows()) { if (OperatingSystem.isWindows()) {
this.setBackground(new Color(0,0,0,0)); this.setBackground(new Color(0, 0, 0, 0));
} }
GUICoreUtils.centerWindow(this); GUICoreUtils.centerWindow(this);
@ -62,8 +56,8 @@ public class SplashWindow extends JFrame {
*/ */
public void dispose() { public void dispose() {
super.dispose(); super.dispose();
if(this.splash != null){ if (this.splash != null) {
this.splash.releaseTimer(); this.splash.releaseTimer();
} }
} }

4
designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java

@ -69,7 +69,6 @@ import com.fr.plugin.chart.map.MapIndependentVanChartInterface;
import com.fr.plugin.chart.map.VanChartMapPlot; import com.fr.plugin.chart.map.VanChartMapPlot;
import com.fr.plugin.chart.multilayer.MultiPieIndependentVanChartInterface; import com.fr.plugin.chart.multilayer.MultiPieIndependentVanChartInterface;
import com.fr.plugin.chart.multilayer.VanChartMultiPiePlot; import com.fr.plugin.chart.multilayer.VanChartMultiPiePlot;
import com.fr.plugin.chart.phantom.VanChartPhantomService;
import com.fr.plugin.chart.pie.PieIndependentVanChartInterface; import com.fr.plugin.chart.pie.PieIndependentVanChartInterface;
import com.fr.plugin.chart.radar.RadarIndependentVanChartInterface; import com.fr.plugin.chart.radar.RadarIndependentVanChartInterface;
import com.fr.plugin.chart.radar.VanChartRadarPlot; import com.fr.plugin.chart.radar.VanChartRadarPlot;
@ -157,9 +156,6 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr
@Override @Override
public void run() { public void run() {
VanChartPhantomService.startPhantomService();
initAllChartsDemoImage(allCharts); initAllChartsDemoImage(allCharts);
} }
}).start(); }).start();

Loading…
Cancel
Save