fr_shine 8 years ago
parent
commit
76682b642f
  1. 4
      build.master.gradle
  2. 86
      build.master.gradle.bak
  3. 75
      designer_base/src/com/fr/design/actions/file/LocalePane.java

4
build.master.gradle

@ -27,8 +27,8 @@ task appletJar<<{
fileset(dir:"${basicDir}/finereport-performance-stable/${branchName}/build/classes/main")
}
unjar(src:"${libDir}/3rd.jar",dest:"${libDir}/tmp-${branchName}")
unjar(src:"${libDir}/servlet-api.jar",dest:"${libDir}/tmp-${branchName}")
unjar(src:"${libDir}/${branchName}/3rd.jar",dest:"${libDir}/tmp-${branchName}")
unjar(src:"${libDir}/${branchName}/servlet-api.jar",dest:"${libDir}/tmp-${branchName}")
jar(jarfile:"build/libs/fr-applet-8.0.jar"){
fileset(dir:"build/classes"){
exclude(name:"*.*")

86
build.master.gradle.bak

@ -0,0 +1,86 @@
apply plugin: "java"
tasks.withType(JavaCompile){
options.encoding = "UTF-8"
}
def basicDir="../../"
def libDir="${basicDir}/finereport-lib-stable"
//
FileTree files =fileTree(dir:"./",include:"build.*.gradle")
def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf ("\\"))
def branchName=buildDir.substring(buildDir.lastIndexOf ("\\")+1)
task appletJar<<{
ant{
mkdir(dir:"${libDir}/tmp-${branchName}")
mkdir(dir:"build/classes/")
copy(todir:"build/classes/"){
fileset(dir:"${basicDir}/finereport-core-stable/${branchName}/build/classes/main")
fileset(dir:"${basicDir}/finereport-chart-stable/${branchName}/build/classes/main")
fileset(dir:"${basicDir}/finereport-report-stable/${branchName}/build/classes/main")
fileset(dir:"${basicDir}/finereport-platform-stable/${branchName}/build/classes/main")
fileset(dir:"${basicDir}/finereport-performance-stable/${branchName}/build/classes/main")
}
unjar(src:"${libDir}/${branchName}/3rd.jar",dest:"${libDir}/tmp-${branchName}")
unjar(src:"${libDir}/branchName/servlet-api.jar",dest:"${libDir}/tmp-${branchName}")
jar(jarfile:"build/libs/fr-applet-8.0.jar"){
fileset(dir:"build/classes"){
exclude(name:"*.*")
exclude(name:"bin/*.*")
exclude(name:"classes/**")
exclude(name:"com/fr/schedule/**")
exclude(name:"com/fr/cell/**")
exclude(name:"com/fr/dialog/**")
exclude(name:"com/fr/view/**")
exclude(name:"com/fr/web/**")
exclude(name:"com/fr/fs/**")
exclude(name:"com/fr/design/**")
exclude(name:"com/fr/start/**")
exclude(name:"com/fr/process/**")
}
fileset(dir:"${libDir}/tmp-${branchName}"){
include(name:"javax/mail/**")
include(name:"javax/servlet/**")
include(name:"org/freehep/**")
include(name:"com/fr/third/JAI/**")
include(name:"com/fr/third/antlr/**")
include(name:"com/fr/third/javax/**")
include(name:"com/sun/xml/**")
include(name:"javax/xml/**")
}
fileset(dir:"build/classes"){
include(name:"com/fr/web/*.class")
include(name:"com/fr/web/attr/*.class")
}
}
delete(dir:"${libDir}/tmp-${branchName}")
def jdk6home= "D:/FineReport/develop/java/jdk1.6u35"
def keystore="frapplet.store"
def keycert="fr.cert"
def keypassword="123456"
def keyalias="fr"
exec(executable:"${jdk6home}/bin/keytool"){
arg(line:"-genkey -dname &quot;CN=FineReport L=NanJing C=China&quot; -keystore ${keystore} -alias ${keyalias} -validity 3650 -storepass ${keypassword}")
}
exec(executable:"${jdk6home}/bin/keytool"){
arg(line:"-export -keystore ${keystore} -alias ${keyalias} -file ${keycert} -storepass ${keypassword}")
}
exec(executable:"${jdk6home}/bin/jarsigner"){
arg(line:"-keystore ${keystore} -storepass ${keypassword} 'build/libs/fr-applet-8.0.jar' ${keyalias}")
}
delete(file:"${keystore}")
delete(file:"${keycert}")
delete(dir:"build/classes")
}
}

75
designer_base/src/com/fr/design/actions/file/LocalePane.java

@ -8,13 +8,7 @@ import java.awt.BorderLayout;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Properties;
import java.util.Set;
import java.util.Vector;
import java.util.*;
import javax.swing.JTable;
import javax.swing.RowFilter;
@ -31,10 +25,7 @@ import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.dialog.BasicPane;
import com.fr.file.filetree.FileNode;
import com.fr.general.FRLogger;
import com.fr.general.GeneralUtils;
import com.fr.general.IOUtils;
import com.fr.general.Inter;
import com.fr.general.*;
import com.fr.stable.ArrayUtils;
import com.fr.stable.project.ProjectConstants;
@ -43,12 +34,6 @@ import com.fr.stable.project.ProjectConstants;
* @since : 8.0
*/
public class LocalePane extends BasicPane {
private static final String FR = "fr.properties";
private static final String US = "fr_en_US.properties";
private static final String CN = "fr_zh_CN.properties";
private static final String JP = "fr_ja_JP.properties";
private static final String TW = "fr_zh_TW.properties";
private static final String KR = "fr_ko_KR.properties";
private static final String PREFIX = "fr_";
private static final int LOCALE_NAME_LEN = 5;
@ -124,39 +109,35 @@ public class LocalePane extends BasicPane {
}
private void initPredefinedProperties() {
Properties fr = loadLocaleProperties(FR);
Properties us = loadLocaleProperties(US);
Properties cn = loadLocaleProperties(CN);
Properties jp = loadLocaleProperties(JP);
Properties tw = loadLocaleProperties(TW);
Properties kr = loadLocaleProperties(KR);
Set<String> keys = fr.stringPropertyNames();
List<String> sortKeys = new ArrayList<String>(keys);
Map<Locale, LocalePackage> map = Inter.getPredefinedPackageMap();
LocalePackage chinese = map.get(Locale.SIMPLIFIED_CHINESE);
List<String> sortKeys = new ArrayList<String>();
Set<ResourceBundle> bundles = chinese.getKindsOfResourceBundle();
for (ResourceBundle bundle : bundles) {
sortKeys.addAll(bundle.keySet());
}
Collections.sort(sortKeys);
Vector<String> keyVector = new Vector<String>();
Vector<String> valueVector = new Vector<String>();
Vector<String> usVector = new Vector<String>();
Vector<String> cnVector = new Vector<String>();
Vector<String> jpVector = new Vector<String>();
Vector<String> twVector = new Vector<String>();
Vector<String> krVector = new Vector<String>();
for (String key : sortKeys) {
keyVector.add(key);
valueVector.add(fr.getProperty(key));
usVector.add(us.getProperty(key));
cnVector.add(cn.getProperty(key));
jpVector.add(jp.getProperty(key));
twVector.add(tw.getProperty(key));
krVector.add(kr.getProperty(key));
Map<Locale, Vector<String>> data = new HashMap<Locale, Vector<String>>();
for (Map.Entry<Locale, LocalePackage> entry : map.entrySet()) {
Vector<String> column = new Vector<String>();
for (String key : sortKeys) {
column.add(entry.getValue().getLocText(key));
}
data.put(entry.getKey(), column);
}
Vector<String> keyVector = new Vector<String>();
keyVector.addAll(sortKeys);
predefineTableModel.addColumn(Inter.getLocText("Key"), keyVector);
predefineTableModel.addColumn(Inter.getLocText("Value"), valueVector);
predefineTableModel.addColumn("en_US", usVector);
predefineTableModel.addColumn("zh_CN", cnVector);
predefineTableModel.addColumn("ja_JP", jpVector);
predefineTableModel.addColumn("zh_TW", twVector);
predefineTableModel.addColumn("ko_KR", krVector);
for (Map.Entry<Locale, Vector<String>> entry : data.entrySet()) {
predefineTableModel.addColumn(entry.getKey().getDisplayName(), entry.getValue());
}
}
private void initCustomProperties() throws Exception {

Loading…
Cancel
Save