From 05e4fc08cd0641933dcf81ad853864e01dbd120d Mon Sep 17 00:00:00 2001 From: Fangjie Hu Date: Mon, 29 Aug 2016 14:38:31 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E8=A1=A8=E5=8D=95=E7=94=BB=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_chart/src/com/fr/design/chart/gui/ChartComponent.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_chart/src/com/fr/design/chart/gui/ChartComponent.java b/designer_chart/src/com/fr/design/chart/gui/ChartComponent.java index a33fdc1663..186b7eb6c1 100644 --- a/designer_chart/src/com/fr/design/chart/gui/ChartComponent.java +++ b/designer_chart/src/com/fr/design/chart/gui/ChartComponent.java @@ -316,7 +316,7 @@ public class ChartComponent extends MiddleChartComponent implements MouseListene //不直接画chartGlyph而画image的原因是表单的柱形图会溢出表单 //其他图都ok,其实感觉应该是柱形图画的不对,应该也可以改那边 Image chartImage = chartGlyph.toImage(chartWidth,chartHeight,ScreenResolution.getScreenResolution()); - g2d.drawImage(chartImage, 0, 0, chartWidth, chartHeight, null); + g2d.drawImage(chartImage, 0, 0, null); } } From d6788f0f0a0cbadeed83d5588df5a42b4673c3ba Mon Sep 17 00:00:00 2001 From: sunmondong Date: Mon, 29 Aug 2016 17:35:55 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E7=BC=A9=E5=B0=8F=E4=BE=9D=E8=B5=96?= =?UTF-8?q?=E8=8C=83=E5=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/build.gradle | 2 +- designer_base/build.gradle.bak | 4 ++-- designer_chart/build.gradle | 2 +- designer_chart/build.gradle.bak | 4 ++-- designer_form/build.gradle | 2 +- designer_form/build.gradle.bak | 20 ++++++++++---------- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/designer_base/build.gradle b/designer_base/build.gradle index cbaf1a6953..285295c56d 100644 --- a/designer_base/build.gradle +++ b/designer_base/build.gradle @@ -33,7 +33,7 @@ def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1) dependencies{ compile fileTree(dir:'../../../finereport-lib-stable',include:'**/*.jar') -compile fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/**/*.jar") +compile fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/*/build/libs/*.jar") testCompile 'junit:junit:4.12' } diff --git a/designer_base/build.gradle.bak b/designer_base/build.gradle.bak index bd5f62e8e1..e7c5a8e1ff 100644 --- a/designer_base/build.gradle.bak +++ b/designer_base/build.gradle.bak @@ -33,7 +33,7 @@ def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1) dependencies{ compile fileTree(dir:'../../../finereport-lib-stable',include:'**/*.jar') -compile fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/**/*.jar") +compile fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/**/build/libs/*.jar") testCompile 'junit:junit:4.12' } @@ -56,7 +56,7 @@ task compressJS{ 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'){ + 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') diff --git a/designer_chart/build.gradle b/designer_chart/build.gradle index 9466491957..ec39e786a0 100644 --- a/designer_chart/build.gradle +++ b/designer_chart/build.gradle @@ -31,7 +31,7 @@ def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1) //指定外部依赖 dependencies{ compile fileTree(dir:'../../../finereport-lib-stable',include:'**/*.jar') -compile fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/**/*.jar") +compile fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/*/build/libs/*.jar") testCompile 'junit:junit:4.12' } diff --git a/designer_chart/build.gradle.bak b/designer_chart/build.gradle.bak index 2a97773711..92f0551624 100644 --- a/designer_chart/build.gradle.bak +++ b/designer_chart/build.gradle.bak @@ -31,7 +31,7 @@ def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1) //指定外部依赖 dependencies{ compile fileTree(dir:'../../../finereport-lib-stable',include:'**/*.jar') -compile fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/**/*.jar") +compile fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/**/build/libs/*.jar") testCompile 'junit:junit:4.12' } @@ -54,7 +54,7 @@ task compressJS{ 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'){ + 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') diff --git a/designer_form/build.gradle b/designer_form/build.gradle index ca89333a40..6c0df949c4 100644 --- a/designer_form/build.gradle +++ b/designer_form/build.gradle @@ -33,7 +33,7 @@ def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1) //声明外部依赖 dependencies{ compile fileTree(dir:'../../../finereport-lib-stable',include:'**/*.jar') -compile fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/**/build/libs/*.jar")//,exclude:"finereport-design-stable/${branchName}/build/libs/*.jar") +compile fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/*/build/libs/*.jar") testCompile 'junit:junit:4.12' } diff --git a/designer_form/build.gradle.bak b/designer_form/build.gradle.bak index f6c634dd1d..4204c2415e 100644 --- a/designer_form/build.gradle.bak +++ b/designer_form/build.gradle.bak @@ -3,19 +3,19 @@ apply plugin: 'java' tasks.withType(JavaCompile){ options.encoding = 'UTF-8' } -//ָjdk汾 +//指定构建的jdk版本 sourceCompatibility=1.8 -//ָɵjar汾 +//指定生成的jar包版本 version='8.0' def srcDir="." -//ָjar +//指明生成jar包的名字 jar{ baseName='fr-designer-report' } -//Դλ +//源码所在位置 sourceSets{ main{ java{ @@ -25,20 +25,20 @@ sourceSets{ } } -//ȡʲô֧ +//获取什么分支名 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',include:'**/*.jar') -compile fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/**/build/libs/*.jar")//,exclude:"finereport-design-stable/${branchName}/build/libs/*.jar") +compile fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/**/build/libs/*.jar") testCompile 'junit:junit:4.12' } -//ָ޷ļ· +//指明无法编译文件所在路径 def dataContent ={def dir -> copySpec{ from ("${dir}"){ @@ -47,7 +47,7 @@ def dataContent ={def dir -> } } -//.javaļƵclassesļ +//将非.java文件复制到classes文件夹下 参与打包 task copyFile(type:Copy,dependsOn:compileJava){ copy{ with dataContent.call("${srcDir}/src") @@ -58,7 +58,7 @@ task copyFile(type:Copy,dependsOn:compileJava){ } -//ѹĿеjsļ +//压缩项目中的js文件 task compressJS{ ant.taskdef(name:'yuicompress',classname:'com.yahoo.platform.yui.compressor.YUICompressTask'){ classpath { From 59a3e8f7bec4dc4515095cc27f1e5012d065f5f1 Mon Sep 17 00:00:00 2001 From: sunmondong Date: Mon, 29 Aug 2016 18:07:17 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E4=BE=9D=E8=B5=96?= =?UTF-8?q?=E8=8C=83=E5=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/build.gradle | 2 +- designer_base/build.gradle.bak | 2 +- designer_chart/build.gradle | 2 +- designer_chart/build.gradle.bak | 2 +- designer_form/build.gradle | 2 +- designer_form/build.gradle.bak | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/designer_base/build.gradle b/designer_base/build.gradle index 285295c56d..e7c5a8e1ff 100644 --- a/designer_base/build.gradle +++ b/designer_base/build.gradle @@ -33,7 +33,7 @@ def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1) dependencies{ compile fileTree(dir:'../../../finereport-lib-stable',include:'**/*.jar') -compile fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/*/build/libs/*.jar") +compile fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/**/build/libs/*.jar") testCompile 'junit:junit:4.12' } diff --git a/designer_base/build.gradle.bak b/designer_base/build.gradle.bak index e7c5a8e1ff..285295c56d 100644 --- a/designer_base/build.gradle.bak +++ b/designer_base/build.gradle.bak @@ -33,7 +33,7 @@ def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1) dependencies{ compile fileTree(dir:'../../../finereport-lib-stable',include:'**/*.jar') -compile fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/**/build/libs/*.jar") +compile fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/*/build/libs/*.jar") testCompile 'junit:junit:4.12' } diff --git a/designer_chart/build.gradle b/designer_chart/build.gradle index ec39e786a0..92f0551624 100644 --- a/designer_chart/build.gradle +++ b/designer_chart/build.gradle @@ -31,7 +31,7 @@ def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1) //指定外部依赖 dependencies{ compile fileTree(dir:'../../../finereport-lib-stable',include:'**/*.jar') -compile fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/*/build/libs/*.jar") +compile fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/**/build/libs/*.jar") testCompile 'junit:junit:4.12' } diff --git a/designer_chart/build.gradle.bak b/designer_chart/build.gradle.bak index 92f0551624..ec39e786a0 100644 --- a/designer_chart/build.gradle.bak +++ b/designer_chart/build.gradle.bak @@ -31,7 +31,7 @@ def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1) //指定外部依赖 dependencies{ compile fileTree(dir:'../../../finereport-lib-stable',include:'**/*.jar') -compile fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/**/build/libs/*.jar") +compile fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/*/build/libs/*.jar") testCompile 'junit:junit:4.12' } diff --git a/designer_form/build.gradle b/designer_form/build.gradle index 6c0df949c4..4204c2415e 100644 --- a/designer_form/build.gradle +++ b/designer_form/build.gradle @@ -33,7 +33,7 @@ def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1) //声明外部依赖 dependencies{ compile fileTree(dir:'../../../finereport-lib-stable',include:'**/*.jar') -compile fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/*/build/libs/*.jar") +compile fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/**/build/libs/*.jar") testCompile 'junit:junit:4.12' } diff --git a/designer_form/build.gradle.bak b/designer_form/build.gradle.bak index 4204c2415e..6c0df949c4 100644 --- a/designer_form/build.gradle.bak +++ b/designer_form/build.gradle.bak @@ -33,7 +33,7 @@ def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1) //声明外部依赖 dependencies{ compile fileTree(dir:'../../../finereport-lib-stable',include:'**/*.jar') -compile fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/**/build/libs/*.jar") +compile fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/*/build/libs/*.jar") testCompile 'junit:junit:4.12' } From 52af1da90319089e0a1bd45d5a38afcae212d48c Mon Sep 17 00:00:00 2001 From: zack Date: Mon, 29 Aug 2016 19:04:18 +0800 Subject: [PATCH 4/4] =?UTF-8?q?bug103155,tab=E5=B8=83=E5=B1=80=E7=9A=84?= =?UTF-8?q?=E9=87=8D=E5=91=BD=E5=90=8D=E5=8A=9F=E8=83=BD=E5=85=88=E5=B1=8F?= =?UTF-8?q?=E8=94=BD=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/CompositeComponentAdapter.java | 36 ++++++++----------- .../fr/design/designer/creator/XCreator.java | 9 +++++ .../creator/cardlayout/XWCardLayout.java | 30 +++++++--------- 3 files changed, 36 insertions(+), 39 deletions(-) diff --git a/designer_form/src/com/fr/design/designer/beans/adapters/component/CompositeComponentAdapter.java b/designer_form/src/com/fr/design/designer/beans/adapters/component/CompositeComponentAdapter.java index e6f607e413..12bd2515f8 100644 --- a/designer_form/src/com/fr/design/designer/beans/adapters/component/CompositeComponentAdapter.java +++ b/designer_form/src/com/fr/design/designer/beans/adapters/component/CompositeComponentAdapter.java @@ -1,38 +1,31 @@ package com.fr.design.designer.beans.adapters.component; -import java.awt.AlphaComposite; -import java.awt.Component; -import java.awt.Dimension; -import java.awt.Graphics; -import java.awt.Graphics2D; -import java.awt.event.MouseEvent; -import java.beans.IntrospectionException; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; - -import javax.swing.Action; -import javax.swing.JComponent; -import javax.swing.JPopupMenu; - import com.fr.base.FRContext; import com.fr.design.actions.UpdateAction; import com.fr.design.beans.GroupModel; -import com.fr.design.mainframe.FormDesigner; -import com.fr.design.gui.xtable.PropertyGroupModel; import com.fr.design.designer.beans.ComponentAdapter; import com.fr.design.designer.beans.actions.ChangeNameAction; import com.fr.design.designer.beans.events.DesignerEditor; import com.fr.design.designer.creator.CRPropertyDescriptor; import com.fr.design.designer.creator.XButton; import com.fr.design.designer.creator.XCreator; +import com.fr.design.form.util.XCreatorConstants; +import com.fr.design.gui.xtable.PropertyGroupModel; +import com.fr.design.mainframe.FormDesigner; +import com.fr.design.utils.ComponentUtils; +import com.fr.design.utils.gui.LayoutUtils; import com.fr.form.ui.Button; import com.fr.form.ui.Widget; -import com.fr.design.form.util.XCreatorConstants; import com.fr.stable.StringUtils; import com.fr.stable.core.PropertyChangeAdapter; -import com.fr.design.utils.ComponentUtils; -import com.fr.design.utils.gui.LayoutUtils; + +import javax.swing.*; +import java.awt.*; +import java.awt.event.MouseEvent; +import java.beans.IntrospectionException; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; public class CompositeComponentAdapter implements ComponentAdapter { @@ -81,7 +74,8 @@ public class CompositeComponentAdapter implements ComponentAdapter { } //底层布局或者是自适应布局都不能删除 boolean isRootComponent = ComponentUtils.isRootComponent(xCreator) || designer.isRoot(xCreator); - changeVarNameAction.setEnabled(!isRootComponent); + //bug103155 有的布局的重命名(tab布局)涉及到其他非子节点的属性修改,支持起来比较麻烦,先屏蔽了控件树面板的修改,强制使用属性面板修改 + changeVarNameAction.setEnabled(!isRootComponent && xCreator.supportRenameInWidgetTree()); popupMenu.add(changeVarNameAction); Action[] actions = designer.getActions(); diff --git a/designer_form/src/com/fr/design/designer/creator/XCreator.java b/designer_form/src/com/fr/design/designer/creator/XCreator.java index 62cfe0b256..ab08de3fea 100644 --- a/designer_form/src/com/fr/design/designer/creator/XCreator.java +++ b/designer_form/src/com/fr/design/designer/creator/XCreator.java @@ -544,4 +544,13 @@ public abstract class XCreator extends JPanel implements XComponent, XCreatorToo public WidgetPropertyUIProvider[] getWidgetPropertyUIProviders() { return new WidgetPropertyUIProvider[0]; } + + /** + * 控件树面板中是否支持重命名选项 + * + * @return 控件树面板中是否支持重命名选项 + */ + public boolean supportRenameInWidgetTree() { + return true; + } } \ No newline at end of file diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java index e5d8d44d2d..b5c155c700 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java @@ -3,33 +3,17 @@ */ package com.fr.design.designer.creator.cardlayout; -import java.awt.CardLayout; -import java.awt.Color; -import java.awt.Dimension; -import java.awt.event.ContainerEvent; -import java.beans.IntrospectionException; - -import javax.swing.border.Border; - import com.fr.base.background.ColorBackground; import com.fr.design.designer.beans.LayoutAdapter; import com.fr.design.designer.beans.adapters.layout.FRCardLayoutAdapter; import com.fr.design.designer.beans.models.SelectionModel; -import com.fr.design.designer.creator.CRPropertyDescriptor; -import com.fr.design.designer.creator.XCreator; -import com.fr.design.designer.creator.XCreatorUtils; -import com.fr.design.designer.creator.XLayoutContainer; -import com.fr.design.designer.creator.XWidgetCreator; +import com.fr.design.designer.creator.*; import com.fr.design.form.layout.FRCardLayout; import com.fr.design.form.util.XCreatorConstants; import com.fr.design.mainframe.FormDesigner; import com.fr.design.mainframe.widget.editors.CardTagWLayoutBorderStyleEditor; import com.fr.design.mainframe.widget.renderer.LayoutBorderStyleRenderer; -import com.fr.form.ui.CardAddButton; -import com.fr.form.ui.CardSwitchButton; -import com.fr.form.ui.LayoutBorderStyle; -import com.fr.form.ui.Widget; -import com.fr.form.ui.WidgetTitle; +import com.fr.form.ui.*; import com.fr.form.ui.container.WBorderLayout; import com.fr.form.ui.container.WCardLayout; import com.fr.form.ui.container.WLayout; @@ -41,6 +25,11 @@ import com.fr.general.Inter; import com.fr.stable.Constants; import com.fr.stable.core.PropertyChangeAdapter; +import javax.swing.border.Border; +import java.awt.*; +import java.awt.event.ContainerEvent; +import java.beans.IntrospectionException; + /** * @author richer * @since 6.5.3 @@ -379,4 +368,9 @@ public class XWCardLayout extends XLayoutContainer { public XLayoutContainer getTopLayout() { return this.getBackupParent().getTopLayout(); } + + @Override + public boolean supportRenameInWidgetTree() { + return false; + } } \ No newline at end of file