diff --git a/designer/src/com/fr/design/mainframe/CellElementPropertyPane.java b/designer/src/com/fr/design/mainframe/CellElementPropertyPane.java index d68bd7757..69a68f451 100644 --- a/designer/src/com/fr/design/mainframe/CellElementPropertyPane.java +++ b/designer/src/com/fr/design/mainframe/CellElementPropertyPane.java @@ -108,8 +108,10 @@ public class CellElementPropertyPane extends DockingView { } public void reInit(ElementCasePane ePane) { - this.add(titlePane, BorderLayout.NORTH); - this.add(cellElementEditPane, BorderLayout.CENTER); + if (titlePane.getParent() == null) { // 如果处于隐藏状态,则让其显示 + this.add(titlePane, BorderLayout.NORTH); + this.add(cellElementEditPane, BorderLayout.CENTER); + } cellElementEditPane.populate(ePane); } diff --git a/designer/src/com/fr/design/webattr/EditToolBar.java b/designer/src/com/fr/design/webattr/EditToolBar.java index ac1295934..938fd4509 100644 --- a/designer/src/com/fr/design/webattr/EditToolBar.java +++ b/designer/src/com/fr/design/webattr/EditToolBar.java @@ -329,15 +329,16 @@ public class EditToolBar extends BasicPane { private JavaScriptActionPane javaScriptPane; private ExportToolBarProvider[] exportToolBarProviders; - private ChangeListener changeListener = new ChangeListener() { - public void stateChanged(ChangeEvent e) { + private ActionListener actionListener = new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { if (isVerify.isSelected()) { failSubmit.setVisible(true); } else { failSubmit.setVisible(false); + failSubmit.setSelected(false); } } - }; public ButtonPane() { @@ -481,7 +482,7 @@ public class EditToolBar extends BasicPane { submitPane.add(isVerify); submitPane.add(failSubmit); submitPane.add(isCurSheet); - isVerify.addChangeListener(changeListener); + isVerify.addActionListener(actionListener); return submitPane; } @@ -573,6 +574,9 @@ public class EditToolBar extends BasicPane { card.show(centerPane, "submit"); Submit submit = ((Submit) widget); this.isVerify.setSelected(submit.isVerify()); + if (!submit.isVerify()) { + this.failSubmit.setVisible(false); + } this.failSubmit.setSelected(submit.isFailVerifySubmit()); this.isCurSheet.setSelected(submit.isOnlySubmitSelect()); } diff --git a/designer_base/build.master.gradle b/designer_base/build.master.gradle index b02f751e7..5220ecebf 100644 --- a/designer_base/build.master.gradle +++ b/designer_base/build.master.gradle @@ -1,8 +1,26 @@ -apply plugin: 'java' tasks.withType(JavaCompile){ options.encoding = 'UTF-8' } +buildscript { + repositories { + maven { + url "http://www.eveoh.nl/files/maven2" + } + } + + dependencies { + classpath "nl.eveoh:gradle-aspectj:1.2" + } +} + +ext.aspectjVersion = '1.7.4' +apply plugin: 'aspectj' + +repositories { + mavenCentral() +} + //指定构建的jdk版本 sourceCompatibility=1.7 //指定生成jar包版本 diff --git a/designer_base/build.master.gradle.bak b/designer_base/build.master.gradle.bak new file mode 100644 index 000000000..86cb6ca3e --- /dev/null +++ b/designer_base/build.master.gradle.bak @@ -0,0 +1,89 @@ + +apply plugin: 'java' +tasks.withType(JavaCompile){ + options.encoding = 'UTF-8' +} +buildscript { + repositories { + maven { + url "http://www.eveoh.nl/files/maven2" + } + } + + dependencies { + classpath "nl.eveoh:gradle-aspectj:1.2" + } +} + +ext.aspectjVersion = '1.7.4' +apply plugin: 'aspectj' + +repositories { + mavenCentral() +} + +//指定构建的jdk版本 +sourceCompatibility=1.7 +//指定生成jar包版本 +version='8.0' +//生成jar包重命名 +jar{ + baseName='fr-designer-core' +} + + +def srcDir="." + +//指定源码路径 +sourceSets{ + main{ + java{ + srcDirs=["${srcDir}/src"] + } + } +} +//获取什么分支名 +FileTree files =fileTree(dir:'./',include:'build.*.gradle') +def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf ('\\')) +buildDir=buildDir.substring(0,buildDir.lastIndexOf ('\\')) +def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1) + +//声明外部依赖 +dependencies{ + +compile fileTree(dir:"../../../finereport-lib-stable/${branchName}",include:'**/*.jar') +compile fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/**/build/libs/*.jar") + + testCompile 'junit:junit:4.12' +} +//复制非.java文件到classes文件夹下参与打包 +task copyFile(type:Copy,dependsOn:compileJava){ + copy{ + from ("${srcDir}/src"){ + exclude '**/.setting/**','.classpath','.project','**/*.java','**/*.db','**/*.g','**/package.html' + } + into 'build/classes/main' + } + +} + + +//压缩项目中的js文件 +task compressJS{ + ant.taskdef(name:'yuicompress',classname:'com.yahoo.platform.yui.compressor.YUICompressTask'){ + classpath { + fileset(dir:'../../../finereport-lib4build-stable',includes:'**/*.jar') + } + } + ant.yuicompress(linebreak:"500",warn:"false", munge:"yes",preserveallsemicolons:"false",charset:"utf-8",encoding:"utf-8",outputfolder:'build/classes/main'){ + fileset (dir:"${srcDir}/src"){ + include (name:'**/*.js') + include (name:'**/*.css') + } + + } +} +jar.dependsOn compressJS + + + diff --git a/designer_base/build.release.gradle b/designer_base/build.release.gradle index 4ed4ba12b..6aa5467c2 100644 --- a/designer_base/build.release.gradle +++ b/designer_base/build.release.gradle @@ -1,8 +1,29 @@ -apply plugin: 'java' tasks.withType(JavaCompile){ options.encoding = 'UTF-8' } + +buildscript { + repositories { + maven { + url "http://www.eveoh.nl/files/maven2" + } + } + + dependencies { + classpath "nl.eveoh:gradle-aspectj:1.2" + } +} + +ext.aspectjVersion = '1.7.4' + +apply plugin: 'aspectj' + +repositories { + mavenCentral() +} + + //指定构建的jdk版本 sourceCompatibility=1.8 //指定生成jar包版本 diff --git a/designer_base/src/com/fr/design/extra/PluginHelper.java b/designer_base/src/com/fr/design/extra/PluginHelper.java index ed0d78aa1..5180af88f 100644 --- a/designer_base/src/com/fr/design/extra/PluginHelper.java +++ b/designer_base/src/com/fr/design/extra/PluginHelper.java @@ -7,6 +7,7 @@ import com.fr.design.extra.plugindependence.DownLoadDependenceUI; import com.fr.general.*; import com.fr.general.http.HttpClient; import com.fr.plugin.Plugin; +import com.fr.plugin.PluginConfigManager; import com.fr.stable.plugin.PluginConstants; import com.fr.plugin.PluginLoader; import com.fr.plugin.PluginManagerHelper; @@ -225,6 +226,8 @@ public class PluginHelper { } // 删除放解压文件的临时文件夹 StableUtils.deleteFile(new File(TEMP_PATH)); + PluginConfigManager.getProviderInstance().pushNewPlugin(plugin); + PluginConfigManager.getProviderInstance().syncPluginConfig(); new SwingWorker() { @Override diff --git a/designer_base/src/com/fr/design/mainframe/templateinfo/TemplateInfoCollector.java b/designer_base/src/com/fr/design/mainframe/templateinfo/TemplateInfoCollector.java index 37446b3d3..b9b7aa194 100644 --- a/designer_base/src/com/fr/design/mainframe/templateinfo/TemplateInfoCollector.java +++ b/designer_base/src/com/fr/design/mainframe/templateinfo/TemplateInfoCollector.java @@ -31,6 +31,7 @@ public class TemplateInfoCollector implements Serializable { private static final int VALID_WIDGET_COUNT = 5; // 有效报表模板的控件数 private static final int COMPLETE_DAY_COUNT = 15; // 判断模板是否完成的天数 private static final int ONE_THOUSAND = 1000; + static final long serialVersionUID = 2007L; @SuppressWarnings("unchecked") private TemplateInfoCollector() { @@ -72,7 +73,7 @@ public class TemplateInfoCollector implements Serializable { } catch (InvalidClassException ex) { // 如果 TemplateInfoCollecor 类结构有改动,则放弃之前收集的数据(下次保存时覆盖) // 这种情况主要在开发、测试过程中遇到,正式上线后不应该出现 - FRLogger.getLogger().error(ex.getMessage()); + FRLogger.getLogger().info(ex.getMessage()); FRLogger.getLogger().info("use a new instance"); instance = new TemplateInfoCollector(); } diff --git a/designer_base/src/com/fr/env/RemoteEnv.java b/designer_base/src/com/fr/env/RemoteEnv.java index 4284b2155..ac5732e73 100644 --- a/designer_base/src/com/fr/env/RemoteEnv.java +++ b/designer_base/src/com/fr/env/RemoteEnv.java @@ -55,7 +55,7 @@ import java.util.Timer; import java.util.logging.Level; import java.util.regex.Pattern; -public class RemoteEnv implements Env { +public class RemoteEnv extends AbstractEnv { private static final int TIME_OUT = 30 * 1000; private static final int PLAIN_SOCKET_PORT = 80; private static final int SSL_PORT = 443; diff --git a/designer_chart/build.master.gradle b/designer_chart/build.master.gradle index ba6df992b..6730fd1ee 100644 --- a/designer_chart/build.master.gradle +++ b/designer_chart/build.master.gradle @@ -1,8 +1,26 @@ -apply plugin: 'java' tasks.withType(JavaCompile){ options.encoding = 'UTF-8' } +buildscript { + repositories { + maven { + url "http://www.eveoh.nl/files/maven2" + } + } + + dependencies { + classpath "nl.eveoh:gradle-aspectj:1.2" + } +} + +ext.aspectjVersion = '1.7.4' +apply plugin: 'aspectj' + +repositories { + mavenCentral() +} + //指定构建的jdk版本 sourceCompatibility=1.7 //指定生成jar包的版本 diff --git a/designer_chart/build.master.gradle.bak b/designer_chart/build.master.gradle.bak new file mode 100644 index 000000000..c0f28d1f8 --- /dev/null +++ b/designer_chart/build.master.gradle.bak @@ -0,0 +1,85 @@ + +apply plugin: 'java' +tasks.withType(JavaCompile){ + options.encoding = 'UTF-8' +} +buildscript { + repositories { + maven { + url "http://www.eveoh.nl/files/maven2" + } + } + + dependencies { + classpath "nl.eveoh:gradle-aspectj:1.2" + } +} + +ext.aspectjVersion = '1.7.4' +apply plugin: 'aspectj' + +repositories { + mavenCentral() +} + +//指定构建的jdk版本 +sourceCompatibility=1.7 +//指定生成jar包的版本 +version='8.0' + +def srcDir="." + +//对生成的jar包进行重命名 + +jar{ + baseName='fr-designer-chart' +} + +sourceSets{ + main{ + java{ + srcDirs=["${srcDir}/src"] + } + } +} +FileTree files =fileTree(dir:'./',include:'build.*.gradle') +def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf ('\\')) +buildDir=buildDir.substring(0,buildDir.lastIndexOf ('\\')) +def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1) + +//指定外部依赖 +dependencies{ +compile fileTree(dir:"../../../finereport-lib-stable/${branchName}",include:'**/*.jar') +compile fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/**/build/libs/*.jar") + + testCompile 'junit:junit:4.12' +} +//将非.java 文件复制到classes文件夹下参与打包 +task copyFile(type:Copy,dependsOn:compileJava){ + copy{ + from ("${srcDir}/src"){ + exclude '**/.setting/**','.classpath','.project','**/*.java','**/*.db','**/*.g','**/package.html' + + } + into 'build/classes/main' + } + +} + +//压缩项目中的js文件 +task compressJS{ + ant.taskdef(name:'yuicompress',classname:'com.yahoo.platform.yui.compressor.YUICompressTask'){ + classpath { + fileset(dir:'../../../finereport-lib4build-stable',includes:'**/*.jar') + } + } + ant.yuicompress(linebreak:"500",warn:"false", munge:"yes",preserveallsemicolons:"false",charset:"utf-8",encoding:"utf-8",outputfolder:'build/classes/main'){ + fileset (dir:"${srcDir}/src"){ + include (name:'**/*.js') + include (name:'**/*.css') + } + + } +} +jar.dependsOn compressJS + diff --git a/designer_chart/build.release.gradle b/designer_chart/build.release.gradle index e97176e24..b897c71de 100644 --- a/designer_chart/build.release.gradle +++ b/designer_chart/build.release.gradle @@ -1,8 +1,26 @@ -apply plugin: 'java' tasks.withType(JavaCompile){ options.encoding = 'UTF-8' } +buildscript { + repositories { + maven { + url "http://www.eveoh.nl/files/maven2" + } + } + + dependencies { + classpath "nl.eveoh:gradle-aspectj:1.2" + } +} + +ext.aspectjVersion = '1.7.4' +apply plugin: 'aspectj' + +repositories { + mavenCentral() +} + //指定构建的jdk版本 sourceCompatibility=1.8 //指定生成jar包的版本 diff --git a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPoplinkPane.java b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPoplinkPane.java index 94836c7a3..1a68ad5e5 100644 --- a/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPoplinkPane.java +++ b/designer_chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPoplinkPane.java @@ -45,7 +45,7 @@ public class ChartHyperPoplinkPane extends BasicBeanPane { ChartCollection cc = createChartCollection(); chartComponent = new ChartComponent(); - chartComponent.setPreferredSize(new Dimension(220, 170));// 在单元格弹出时 需要调整保证属性表的大小. + chartComponent.setPreferredSize(new Dimension(200, 170));// 在单元格弹出时 需要调整保证属性表的大小. chartComponent.setSupportEdit(false); chartComponent.populate(cc); diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java index 4a18611fa..3710dcd52 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java @@ -79,7 +79,7 @@ public class ChartTypeButtonPane extends BasicBeanPane implemen eastPane.setLayout(new BorderLayout()); - eastPane.setBorder(BorderFactory.createEmptyBorder(5, 0, 0, 15)); + eastPane.setBorder(BorderFactory.createEmptyBorder(5, 0, 0, 5)); JPanel button = new JPanel(); button.setPreferredSize(new Dimension(45, 20)); button.setLayout(new GridLayout(1, 2, 5, 0)); diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/AbstractReportDataContentPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/AbstractReportDataContentPane.java index 4ff643522..768ecb7e8 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/AbstractReportDataContentPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/AbstractReportDataContentPane.java @@ -3,6 +3,8 @@ package com.fr.design.mainframe.chart.gui.data.report; import com.fr.base.Formula; import com.fr.base.Utils; import com.fr.chart.chartattr.ChartCollection; +import com.fr.chart.chartdata.NormalReportDataDefinition; +import com.fr.chart.chartdata.SeriesDefinition; import com.fr.design.beans.BasicBeanPane; import com.fr.design.constants.UIConstants; import com.fr.design.event.UIObserverListener; @@ -16,6 +18,7 @@ import com.fr.stable.StableUtils; import javax.swing.*; import javax.swing.event.ChangeEvent; import java.awt.*; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -95,6 +98,20 @@ public abstract class AbstractReportDataContentPane extends BasicBeanPane } } } -FileTree f1=fileTree(dir:'../../../'include:"finereport-*-stable/${branchName}/build/libs/*.jar") +FileTree f1=fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/build/libs/*.jar") f1.each{File file-> println "----------${file.path}" } diff --git a/designer_form/build.release.gradle b/designer_form/build.release.gradle index 90abcb81e..793f6a0b1 100644 --- a/designer_form/build.release.gradle +++ b/designer_form/build.release.gradle @@ -1,10 +1,27 @@ -apply plugin: 'java' tasks.withType(JavaCompile){ options.encoding = 'UTF-8' } +buildscript { + repositories { + maven { + url "http://www.eveoh.nl/files/maven2" + } + } + + dependencies { + classpath "nl.eveoh:gradle-aspectj:1.2" + } +} + +ext.aspectjVersion = '1.7.4' +apply plugin: 'aspectj' + +repositories { + mavenCentral() +} //指定构建的jdk版本 -sourceCompatibility=1.8 +sourceCompatibility=1.7 //指定生成的jar包版本 version='8.0' diff --git a/designer_form/src/com/fr/design/designer/beans/ConnectorCreator.java b/designer_form/src/com/fr/design/designer/beans/ConnectorCreator.java index 350235d45..ca9934416 100644 --- a/designer_form/src/com/fr/design/designer/beans/ConnectorCreator.java +++ b/designer_form/src/com/fr/design/designer/beans/ConnectorCreator.java @@ -6,7 +6,7 @@ import java.util.ArrayList; import java.util.PriorityQueue; import com.fr.form.ui.container.WLayout; -import com.fr.form.ui.widget.BoundsWidget; +import com.fr.form.ui.container.WAbsoluteLayout.BoundsWidget; public class ConnectorCreator { diff --git a/designer_form/src/com/fr/design/designer/beans/location/Inner.java b/designer_form/src/com/fr/design/designer/beans/location/Inner.java index 4f475adf0..b07b18b4a 100644 --- a/designer_form/src/com/fr/design/designer/beans/location/Inner.java +++ b/designer_form/src/com/fr/design/designer/beans/location/Inner.java @@ -9,8 +9,8 @@ import com.fr.design.mainframe.FormDesigner; import com.fr.design.mainframe.FormSelection; import com.fr.design.utils.ComponentUtils; import com.fr.form.ui.container.WAbsoluteLayout; -import com.fr.form.ui.widget.BoundsWidget; import com.fr.stable.ArrayUtils; +import com.fr.form.ui.container.WAbsoluteLayout.BoundsWidget; import java.awt.*; import java.awt.Rectangle; diff --git a/designer_form/src/com/fr/design/designer/creator/XWAbsoluteLayout.java b/designer_form/src/com/fr/design/designer/creator/XWAbsoluteLayout.java index 4ed1b6549..b585383c6 100644 --- a/designer_form/src/com/fr/design/designer/creator/XWAbsoluteLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/XWAbsoluteLayout.java @@ -8,6 +8,7 @@ import java.awt.event.ContainerEvent; import java.awt.event.MouseEvent; import java.awt.image.BufferedImage; import java.beans.IntrospectionException; +import java.util.ArrayList; import java.util.HashMap; import com.fr.design.designer.beans.AdapterBus; @@ -16,6 +17,7 @@ import com.fr.design.designer.beans.LayoutAdapter; import com.fr.design.designer.beans.adapters.layout.FRAbsoluteLayoutAdapter; import com.fr.design.designer.beans.location.Direction; import com.fr.design.designer.beans.models.SelectionModel; +import com.fr.design.designer.creator.cardlayout.XWTabFitLayout; import com.fr.design.form.layout.FRAbsoluteLayout; import com.fr.design.icon.IconPathConstants; import com.fr.design.mainframe.*; @@ -23,7 +25,7 @@ import com.fr.form.ui.Connector; import com.fr.form.ui.Widget; import com.fr.form.ui.container.WAbsoluteLayout; import com.fr.form.ui.container.WLayout; -import com.fr.form.ui.widget.BoundsWidget; +import com.fr.form.ui.container.WAbsoluteLayout.BoundsWidget; import com.fr.general.FRScreen; import com.fr.general.IOUtils; import com.fr.general.Inter; @@ -154,8 +156,15 @@ public class XWAbsoluteLayout extends XLayoutContainer { if (xCreator.acceptType(XWAbsoluteLayout.class)){ ((XWAbsoluteLayout) xCreator).updateBoundsWidget(); } - BoundsWidget boundsWidget = layout.getBoundsWidget(xCreator.toData()); - Rectangle rectangle = dealWidgetBound(xCreator.getBounds()); + // 如果子组件时tab布局,则tab布局内部的组件的wiget也要更新,否则保存后重新打开大小不对 + ArrayList childrenList = xCreator.getTargetChildrenList(); + if(!childrenList.isEmpty()){ + for(int i=0; i