diff --git a/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java b/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java index 13ea214ec..d16622184 100644 --- a/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java +++ b/designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java @@ -3,7 +3,6 @@ package com.fr.design.gui.icontainer; import com.fr.base.BaseUtils; import com.fr.design.constants.UIConstants; import com.fr.design.mainframe.DesignerContext; -import com.fr.design.mainframe.EastRegionContainerPane; import com.fr.stable.Constants; import com.fr.design.utils.gui.GUICoreUtils; @@ -217,8 +216,8 @@ public class UIResizableContainer extends JPanel { } } else if (direction == Constants.LEFT) { if(isDownPaneVisible){ - if (toolPaneY > getHeight() - toolPaneHeight) { - toolPaneY = getHeight() - toolPaneHeight; + if (toolPaneY > getHeight() - toolPaneHeight - getParameterPaneHeight()) { + toolPaneY = getHeight() - toolPaneHeight - getParameterPaneHeight(); } parameterPane.setBounds(20, 0, 230, getParameterPaneHeight()); upPane.setBounds(toolPaneHeight, getParameterPaneHeight(), containerWidth - toolPaneHeight, toolPaneY); diff --git a/designer_base/src/com/fr/design/mainframe/DesignerFrameFileDealerPane.java b/designer_base/src/com/fr/design/mainframe/DesignerFrameFileDealerPane.java index c02862d93..9355a3348 100644 --- a/designer_base/src/com/fr/design/mainframe/DesignerFrameFileDealerPane.java +++ b/designer_base/src/com/fr/design/mainframe/DesignerFrameFileDealerPane.java @@ -27,6 +27,7 @@ import com.fr.file.FILE; import com.fr.file.FileNodeFILE; import com.fr.file.filetree.FileNode; import com.fr.general.ComparatorUtils; +import com.fr.general.GeneralContext; import com.fr.general.Inter; import com.fr.stable.CoreConstants; import com.fr.stable.StableUtils; @@ -42,6 +43,7 @@ import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; import java.io.File; import java.util.HashMap; +import java.util.Locale; import java.util.Map; import java.util.Set; @@ -385,25 +387,46 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt oldName = oldName.replaceAll(suffix, ""); jd = new JDialog(); - jd.setLayout(null); + jd.setLayout(new GridLayout(2, 2)); jd.setModal(true); - UILabel newNameLable = new UILabel(Inter.getLocText("FR-Designer_Enter-New-FileName")); - newNameLable.setBounds(20, 10, 130, 30); + UILabel newNameLabel = new UILabel(Inter.getLocText("FR-Designer_Enter-New-FileName")); + newNameLabel.setMinimumSize(new Dimension(150, 27)); + newNameLabel.setHorizontalAlignment(SwingConstants.RIGHT); jt = new UITextField(oldName); jt.getDocument().addDocumentListener(getdoDocumentListener()); jt.selectAll(); - jt.setBounds(130, 15, 150, 20); - jd.add(newNameLable); - jd.add(jt); + jt.setPreferredSize(new Dimension(150, 20)); + + JPanel newNamePanel = new JPanel(); + newNamePanel.setLayout(new BoxLayout(newNamePanel, BoxLayout.X_AXIS)); + newNamePanel.add(Box.createHorizontalGlue()); + newNamePanel.add(newNameLabel); + newNamePanel.add(Box.createHorizontalStrut(5)); + jd.add(newNamePanel); + + JPanel jtPanel = new JPanel(); + jtPanel.setLayout(new BoxLayout(jtPanel, BoxLayout.Y_AXIS)); + JPanel containJt = new JPanel(new BorderLayout()); + containJt.add(jt, BorderLayout.WEST); + containJt.setMaximumSize(new Dimension(200, 20)); + jtPanel.add(Box.createVerticalGlue()); + jtPanel.add(containJt); + jtPanel.add(Box.createVerticalGlue()); + jd.add(jtPanel); + addUITextFieldListener(nodeFile, path); hintsLabel = new UILabel(); hintsLabel.setBounds(20, 50, 250, 30); + hintsLabel.setMaximumSize(new Dimension(200, 30)); + hintsLabel.setHorizontalAlignment(SwingConstants.RIGHT); hintsLabel.setForeground(Color.RED); hintsLabel.setVisible(false); confirmButton = new UIButton(Inter.getLocText("FR-Designer_Confirm")); - confirmButton.setBounds(180, 90, 60, 25); + confirmButton.setPreferredSize(new Dimension(80, 25)); + confirmButton.setMinimumSize(new Dimension(80, 25)); + confirmButton.setMaximumSize(new Dimension(80, 25)); confirmButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { confirmClose(nodeFile, path); @@ -411,18 +434,31 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt }); UIButton cancelButton = new UIButton(Inter.getLocText("FR-Designer_Cancel")); + cancelButton.setPreferredSize(new Dimension(80, 25)); + cancelButton.setMinimumSize(new Dimension(80, 25)); + cancelButton.setMaximumSize(new Dimension(80, 25)); - cancelButton.setBounds(250, 90, 60, 25); cancelButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { jd.dispose(); } }); - jd.add(cancelButton); - jd.add(confirmButton); + JPanel hintsPanel = new JPanel(); + hintsPanel.setLayout(new BorderLayout()); + hintsPanel.add(hintsLabel, BorderLayout.EAST); jd.add(hintsLabel); - jd.setSize(340, 180); + + JPanel btPanel = new JPanel(new BorderLayout()); + btPanel.setLayout(new BoxLayout(btPanel, BoxLayout.X_AXIS)); + btPanel.add(Box.createHorizontalGlue()); + btPanel.add(confirmButton); + btPanel.add(Box.createHorizontalStrut(5)); + btPanel.add(cancelButton); + btPanel.add(Box.createHorizontalStrut(20)); + jd.add(btPanel); + + jd.setSize(380, 200); jd.setTitle(Inter.getLocText("FR-Designer_Rename")); jd.setResizable(false); jd.setAlwaysOnTop(true); diff --git a/designer_chart/build.dev.gradle b/designer_chart/build.dev.gradle index 2b727caac..ba6df992b 100644 --- a/designer_chart/build.dev.gradle +++ b/designer_chart/build.dev.gradle @@ -4,83 +4,60 @@ tasks.withType(JavaCompile){ options.encoding = 'UTF-8' } //指定构建的jdk版本 -sourceCompatibility=1.8 -//指定生成的jar包版本 +sourceCompatibility=1.7 +//指定生成jar包的版本 version='8.0' def srcDir="." +//对生成的jar包进行重命名 -//指明生成jar包的名字 jar{ - baseName='fr-designer-report' + baseName='fr-designer-chart' } -//源码所在位置 + sourceSets{ main{ java{ - srcDirs=["${srcDir}/src", -"${srcDir}/../designer/src"] + 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) -//显示依赖jar包 -FileTree f=fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/**/build/libs/*.jar") -f.each{File file-> - println "----${file.path}" -} - -//声明外部依赖 +//指定外部依赖 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' -} +compile fileTree(dir:"../../../finereport-lib-stable/${branchName}",include:'**/*.jar') +compile fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/**/build/libs/*.jar") -//指明无法编译文件所在路径 -def dataContent ={def dir -> - copySpec{ - from ("${dir}"){ - exclude '**/.setting/**','.classpath','.project','**/*.java','**/*.db','**/*.g','**/package.html' - } - } + testCompile 'junit:junit:4.12' } - -//将非.java文件复制到classes文件夹下 参与打包 +//将非.java 文件复制到classes文件夹下参与打包 task copyFile(type:Copy,dependsOn:compileJava){ copy{ - with dataContent.call("${srcDir}/src") - with dataContent.call("${srcDir}/../designer/src") - into ('build/classes/main') + 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'){ + 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') - - } - fileset (dir:"${srcDir}/../designer/src"){ - include (name:'**/*.js') - include (name:'**/*.css') } } diff --git a/designer_chart/build.master.gradle b/designer_chart/build.master.gradle index 9c9764727..ba6df992b 100644 --- a/designer_chart/build.master.gradle +++ b/designer_chart/build.master.gradle @@ -5,60 +5,48 @@ tasks.withType(JavaCompile){ } //指定构建的jdk版本 sourceCompatibility=1.7 -//指定生成的jar包版本 +//指定生成jar包的版本 version='8.0' def srcDir="." +//对生成的jar包进行重命名 -//指明生成jar包的名字 jar{ - baseName='fr-designer-report' + baseName='fr-designer-chart' } -//源码所在位置 + sourceSets{ main{ java{ - srcDirs=["${srcDir}/src", -"${srcDir}/../designer/src"] + 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' } - -//指明无法编译文件所在路径 -def dataContent ={def dir -> - copySpec{ - from ("${dir}"){ - exclude '**/.setting/**','.classpath','.project','**/*.java','**/*.db','**/*.g','**/package.html' - } - } -} - -//将非.java文件复制到classes文件夹下 参与打包 +//将非.java 文件复制到classes文件夹下参与打包 task copyFile(type:Copy,dependsOn:compileJava){ copy{ - with dataContent.call("${srcDir}/src") - with dataContent.call("${srcDir}/../designer/src") - into ('build/classes/main') + 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'){ @@ -66,15 +54,10 @@ 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') - - } - fileset (dir:"${srcDir}/../designer/src"){ - include (name:'**/*.js') - include (name:'**/*.css') } } diff --git a/designer_chart/build.release.gradle b/designer_chart/build.release.gradle index 90abcb81e..e97176e24 100644 --- a/designer_chart/build.release.gradle +++ b/designer_chart/build.release.gradle @@ -5,76 +5,59 @@ tasks.withType(JavaCompile){ } //指定构建的jdk版本 sourceCompatibility=1.8 -//指定生成的jar包版本 +//指定生成jar包的版本 version='8.0' def srcDir="." +//对生成的jar包进行重命名 -//指明生成jar包的名字 jar{ - baseName='fr-designer-report' + baseName='fr-designer-chart' } -//源码所在位置 + sourceSets{ main{ java{ - srcDirs=["${srcDir}/src", -"${srcDir}/../designer/src"] + 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/master',include:'**/*.jar') compile fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/**/build/libs/*.jar") testCompile 'junit:junit:4.12' } - -//指明无法编译文件所在路径 -def dataContent ={def dir -> - copySpec{ - from ("${dir}"){ - exclude '**/.setting/**','.classpath','.project','**/*.java','**/*.db','**/*.g','**/package.html' - } - } -} - -//将非.java文件复制到classes文件夹下 参与打包 +//将非.java 文件复制到classes文件夹下参与打包 task copyFile(type:Copy,dependsOn:compileJava){ copy{ - with dataContent.call("${srcDir}/src") - with dataContent.call("${srcDir}/../designer/src") - into ('build/classes/main') + 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'){ + 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') - - } - fileset (dir:"${srcDir}/../designer/src"){ - include (name:'**/*.js') - include (name:'**/*.css') } }