Browse Source

Merge remote-tracking branch 'design/master'

master
anchore 8 years ago
parent
commit
6ad164ce3f
  1. 5
      designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java
  2. 49
      designer_chart/build.dev.gradle
  3. 39
      designer_chart/build.master.gradle
  4. 41
      designer_chart/build.release.gradle
  5. 14
      designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java

5
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.base.BaseUtils;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.EastRegionContainerPane;
import com.fr.stable.Constants; import com.fr.stable.Constants;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
@ -217,8 +216,8 @@ public class UIResizableContainer extends JPanel {
} }
} else if (direction == Constants.LEFT) { } else if (direction == Constants.LEFT) {
if(isDownPaneVisible){ if(isDownPaneVisible){
if (toolPaneY > getHeight() - toolPaneHeight) { if (toolPaneY > getHeight() - toolPaneHeight - getParameterPaneHeight()) {
toolPaneY = getHeight() - toolPaneHeight; toolPaneY = getHeight() - toolPaneHeight - getParameterPaneHeight();
} }
parameterPane.setBounds(20, 0, 230, getParameterPaneHeight()); parameterPane.setBounds(20, 0, 230, getParameterPaneHeight());
upPane.setBounds(toolPaneHeight, getParameterPaneHeight(), containerWidth - toolPaneHeight, toolPaneY); upPane.setBounds(toolPaneHeight, getParameterPaneHeight(), containerWidth - toolPaneHeight, toolPaneY);

49
designer_chart/build.dev.gradle

@ -4,71 +4,53 @@ tasks.withType(JavaCompile){
options.encoding = 'UTF-8' options.encoding = 'UTF-8'
} }
//jdk版本 //jdk版本
sourceCompatibility=1.8 sourceCompatibility=1.7
//jar包版本 //jar包版本
version='8.0' version='8.0'
def srcDir="." def srcDir="."
//jar包进行重命名
//jar包的名字
jar{ jar{
baseName='fr-designer-report' baseName='fr-designer-chart'
} }
//
sourceSets{ sourceSets{
main{ main{
java{ java{
srcDirs=["${srcDir}/src", srcDirs=["${srcDir}/src"]
"${srcDir}/../designer/src"]
} }
} }
} }
//
FileTree files =fileTree(dir:'./',include:'build.*.gradle') FileTree files =fileTree(dir:'./',include:'build.*.gradle')
def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf ('\\')) def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf ('\\'))
buildDir=buildDir.substring(0,buildDir.lastIndexOf ('\\')) buildDir=buildDir.substring(0,buildDir.lastIndexOf ('\\'))
def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1) 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{ dependencies{
compile fileTree(dir:"../../../finereport-lib-stable/${branchName}",include:'**/*.jar') compile fileTree(dir:"../../../finereport-lib-stable/${branchName}",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'
}
// 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){ task copyFile(type:Copy,dependsOn:compileJava){
copy{ copy{
with dataContent.call("${srcDir}/src") from ("${srcDir}/src"){
with dataContent.call("${srcDir}/../designer/src") exclude '**/.setting/**','.classpath','.project','**/*.java','**/*.db','**/*.g','**/package.html'
into ('build/classes/main')
}
} }
into 'build/classes/main'
}
}
//js文件 //js文件
task compressJS{ task compressJS{
ant.taskdef(name:'yuicompress',classname:'com.yahoo.platform.yui.compressor.YUICompressTask'){ ant.taskdef(name:'yuicompress',classname:'com.yahoo.platform.yui.compressor.YUICompressTask'){
classpath { classpath {
fileset(dir:'../../../finereport-lib4build-stable',includes:'**/*.jar') fileset(dir:'../../../finereport-lib4build-stable',includes:'**/*.jar')
} }
} }
@ -76,11 +58,6 @@ task compressJS{
fileset (dir:"${srcDir}/src"){ fileset (dir:"${srcDir}/src"){
include (name:'**/*.js') include (name:'**/*.js')
include (name:'**/*.css') include (name:'**/*.css')
}
fileset (dir:"${srcDir}/../designer/src"){
include (name:'**/*.js')
include (name:'**/*.css')
} }
} }

39
designer_chart/build.master.gradle

@ -5,59 +5,47 @@ tasks.withType(JavaCompile){
} }
//jdk版本 //jdk版本
sourceCompatibility=1.7 sourceCompatibility=1.7
//jar包版本 //jar包版本
version='8.0' version='8.0'
def srcDir="." def srcDir="."
//jar包进行重命名
//jar包的名字
jar{ jar{
baseName='fr-designer-report' baseName='fr-designer-chart'
} }
//
sourceSets{ sourceSets{
main{ main{
java{ java{
srcDirs=["${srcDir}/src", srcDirs=["${srcDir}/src"]
"${srcDir}/../designer/src"]
} }
} }
} }
//
FileTree files =fileTree(dir:'./',include:'build.*.gradle') FileTree files =fileTree(dir:'./',include:'build.*.gradle')
def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf ('\\')) def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf ('\\'))
buildDir=buildDir.substring(0,buildDir.lastIndexOf ('\\')) buildDir=buildDir.substring(0,buildDir.lastIndexOf ('\\'))
def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1) def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1)
// //
dependencies{ dependencies{
compile fileTree(dir:"../../../finereport-lib-stable/${branchName}",include:'**/*.jar') compile fileTree(dir:"../../../finereport-lib-stable/${branchName}",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' 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){ task copyFile(type:Copy,dependsOn:compileJava){
copy{ copy{
with dataContent.call("${srcDir}/src") from ("${srcDir}/src"){
with dataContent.call("${srcDir}/../designer/src") exclude '**/.setting/**','.classpath','.project','**/*.java','**/*.db','**/*.g','**/package.html'
into ('build/classes/main')
}
} }
into 'build/classes/main'
}
}
//js文件 //js文件
task compressJS{ task compressJS{
@ -70,11 +58,6 @@ task compressJS{
fileset (dir:"${srcDir}/src"){ fileset (dir:"${srcDir}/src"){
include (name:'**/*.js') include (name:'**/*.js')
include (name:'**/*.css') include (name:'**/*.css')
}
fileset (dir:"${srcDir}/../designer/src"){
include (name:'**/*.js')
include (name:'**/*.css')
} }
} }

41
designer_chart/build.release.gradle

@ -5,64 +5,52 @@ tasks.withType(JavaCompile){
} }
//jdk版本 //jdk版本
sourceCompatibility=1.8 sourceCompatibility=1.8
//jar包版本 //jar包版本
version='8.0' version='8.0'
def srcDir="." def srcDir="."
//jar包进行重命名
//jar包的名字
jar{ jar{
baseName='fr-designer-report' baseName='fr-designer-chart'
} }
//
sourceSets{ sourceSets{
main{ main{
java{ java{
srcDirs=["${srcDir}/src", srcDirs=["${srcDir}/src"]
"${srcDir}/../designer/src"]
} }
} }
} }
//
FileTree files =fileTree(dir:'./',include:'build.*.gradle') FileTree files =fileTree(dir:'./',include:'build.*.gradle')
def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf ('\\')) def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf ('\\'))
buildDir=buildDir.substring(0,buildDir.lastIndexOf ('\\')) buildDir=buildDir.substring(0,buildDir.lastIndexOf ('\\'))
def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1) def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1)
//
//
dependencies{ dependencies{
compile fileTree(dir:'../../../finereport-lib-stable/master',include:'**/*.jar') compile fileTree(dir:'../../../finereport-lib-stable/master',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' 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){ task copyFile(type:Copy,dependsOn:compileJava){
copy{ copy{
with dataContent.call("${srcDir}/src") from ("${srcDir}/src"){
with dataContent.call("${srcDir}/../designer/src") exclude '**/.setting/**','.classpath','.project','**/*.java','**/*.db','**/*.g','**/package.html'
into ('build/classes/main')
}
} }
into 'build/classes/main'
}
}
//js文件 //js文件
task compressJS{ task compressJS{
ant.taskdef(name:'yuicompress',classname:'com.yahoo.platform.yui.compressor.YUICompressTask'){ ant.taskdef(name:'yuicompress',classname:'com.yahoo.platform.yui.compressor.YUICompressTask'){
classpath { classpath {
fileset(dir:'../../../finereport-lib4build-stable',includes:'**/*.jar') fileset(dir:'../../../finereport-lib4build-stable',includes:'**/*.jar')
} }
} }
@ -70,11 +58,6 @@ task compressJS{
fileset (dir:"${srcDir}/src"){ fileset (dir:"${srcDir}/src"){
include (name:'**/*.js') include (name:'**/*.js')
include (name:'**/*.css') include (name:'**/*.css')
}
fileset (dir:"${srcDir}/../designer/src"){
include (name:'**/*.js')
include (name:'**/*.css')
} }
} }

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

@ -163,7 +163,7 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh
Map.Entry entry = (Map.Entry) iterator.next(); Map.Entry entry = (Map.Entry) iterator.next();
String priority = (String) entry.getKey(); String priority = (String) entry.getKey();
String imagePath = getIconPath(priority, plotID); String imagePath = getIconPath(priority, plotID);
if (!StringUtils.isEmpty(imagePath)) { if (StringUtils.isNotEmpty(imagePath)) {
return imagePath; return imagePath;
} }
} }
@ -273,10 +273,20 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh
*/ */
public String getTitle4PopupWindow(String priority, String plotID){ public String getTitle4PopupWindow(String priority, String plotID){
if (chartTypeInterfaces != null && chartTypeInterfaces.containsKey(priority) && chartTypeInterfaces.get(priority).containsKey(plotID)){ if (chartTypeInterfaces != null && chartTypeInterfaces.containsKey(priority) && chartTypeInterfaces.get(priority).containsKey(plotID)){
HashMap<String, IndependentChartUIProvider> chartUIList = chartTypeInterfaces.get(priority);
IndependentChartUIProvider provider = chartTypeInterfaces.get(priority).get(plotID); IndependentChartUIProvider provider = chartTypeInterfaces.get(priority).get(plotID);
return provider.getPlotTypePane().title4PopupWindow(); return provider.getPlotTypePane().title4PopupWindow();
}
//兼容老的插件
if (chartTypeInterfaces != null) {
Iterator iterator = chartTypeInterfaces.entrySet().iterator();
while (iterator.hasNext()) {
Map.Entry entry = (Map.Entry) iterator.next();
String defaultPriority = (String) entry.getKey();
if (chartTypeInterfaces.get(defaultPriority).containsKey(plotID)) {
return chartTypeInterfaces.get(defaultPriority).get(plotID).getPlotTypePane().title4PopupWindow();
}
}
} }
return new String(); return new String();
} }

Loading…
Cancel
Save