Browse Source

Merge pull request #591 in BA/design from ~NEIL/design:release to dev

* commit 'e36b2fdbf903fc674d2281c3c46a223588b17c13': (135 commits)
  pmd
  pmd
  ct
  无JIRA任务, 修复合并冲突
  REPORT-1181 mac10.12和javafx弹出框初始化时会有大几率卡死在native方法,这里先屏蔽一下。
  rt
  rt
  rt
  1
  REPORT-1147 脚本更新问题
  test
  测试
  调试
  调试
  1
  无JIRA任务, build failed
  REPORT-1092 两个一样的表单demo,预览的效果不一样 pmd
  无JIRA任务, 国际化
  pmd
  REPORT-1092 两个一样的表单demo,预览的效果不一样 dev上测试验收过了,同步到master
  ...
master
superman 8 years ago
parent
commit
e32b9f3ca5
  1. 86
      build.dev.gradle.bak
  2. 2
      build.master.gradle.bak
  3. 2
      build.release.gradle.bak
  4. 96
      designer/.classpath
  5. 48
      designer/src/com/fr/design/mainframe/bbs/UserInfoLabel.java
  6. 55
      designer_base/.classpath
  7. 34
      designer_base/src/com/fr/design/data/datapane/connect/ConnectionTableProcedurePane.java
  8. 21
      designer_base/src/com/fr/design/extra/PluginTask.java
  9. 24
      designer_base/src/com/fr/design/extra/ShopPaneConfig.java
  10. 2
      designer_base/src/com/fr/design/formula/FunctionManagerPane.java
  11. 29
      designer_base/src/com/fr/design/gui/style/FormatPane.java
  12. 5272
      designer_base/src/com/fr/design/gui/syntax/ui/rsyntaxtextarea/modes/GroovyTokenMaker.java
  13. 4
      designer_base/src/com/fr/design/hyperlink/WebHyperNorthPane.java
  14. 7
      designer_base/src/com/fr/design/locale/designer.properties
  15. 7
      designer_base/src/com/fr/design/locale/designer_en_US.properties
  16. 8
      designer_base/src/com/fr/design/locale/designer_ja_JP.properties
  17. 7
      designer_base/src/com/fr/design/locale/designer_ko_KR.properties
  18. 7
      designer_base/src/com/fr/design/locale/designer_zh_CN.properties
  19. 7
      designer_base/src/com/fr/design/locale/designer_zh_TW.properties
  20. 59
      designer_base/src/com/fr/design/mainframe/DesignerFrameFileDealerPane.java
  21. 27
      designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java
  22. 50
      designer_base/src/com/fr/design/menu/KeySetUtils.java
  23. 50
      designer_base/src/com/fr/design/style/AbstractPopBox.java
  24. 5
      designer_base/src/com/fr/design/style/color/NewColorSelectPane.java
  25. 49
      designer_chart/.classpath
  26. 16
      designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java
  27. 4
      designer_chart/src/com/fr/design/chart/fun/impl/AbstractIndependentChartUIWithAPILevel.java
  28. 13
      designer_chart/src/com/fr/design/chart/series/SeriesCondition/DataSeriesConditionPane.java
  29. 1
      designer_chart/src/com/fr/design/mainframe/chart/gui/ChartDataPane.java
  30. 40
      designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java
  31. 11
      designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypePane.java
  32. 2
      designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartDatapointLabelPane.java
  33. 44
      designer_form/.classpath
  34. 10
      designer_form/build.master.gradle
  35. 93
      designer_form/build.master.gradle.bak
  36. 13
      designer_form/src/com/fr/design/designer/beans/adapters/layout/FRFitLayoutAdapter.java
  37. 43
      designer_form/src/com/fr/design/designer/properties/FRFitLayoutConstraints.java
  38. 1
      designer_form/src/com/fr/design/mainframe/ComponentTree.java
  39. 44
      designer_form/src/com/fr/design/mainframe/WidgetPropertyPane.java

86
build.dev.gradle.bak

@ -1,86 +0,0 @@
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")
}
}

2
build.master.gradle.bak

@ -28,7 +28,7 @@ task appletJar<<{
}
unjar(src:"${libDir}/${branchName}/3rd.jar",dest:"${libDir}/tmp-${branchName}")
unjar(src:"${libDir}/${branchName}/servlet-api.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:"*.*")

2
build.release.gradle.bak

@ -27,7 +27,7 @@ task appletJar<<{
}
unjar(src:"${libDir}/3rd.jar",dest:"${libDir}/tmp-${branchName}")
unjar(src:"${libDir}/servlet-api.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:"*.*")

96
designer/.classpath

@ -1,52 +1,62 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.6u35"/>
<classpathentry kind="src" path="src"/>
<classpathentry exported="true" kind="con" path="org.eclipse.jdt.USER_LIBRARY/lib"/>
<classpathentry combineaccessrules="false" exported="true" kind="src" path="/base"/>
<classpathentry combineaccessrules="false" exported="true" kind="src" path="/designer_base"/>
<classpathentry combineaccessrules="false" exported="true" kind="src" path="/form"/>
<classpathentry combineaccessrules="false" exported="true" kind="src" path="/engine"/>
<classpathentry combineaccessrules="false" kind="src" path="/base-stable"/>
<classpathentry combineaccessrules="false" kind="src" path="/base-basic"/>
<classpathentry kind="lib" path="/lib/3rd.jar"/>
<classpathentry kind="lib" path="/lib/junit.jar"/>
<classpathentry kind="lib" path="/lib/ojdbc14.jar"/>
<classpathentry kind="lib" path="/lib/poi2007_fat.jar"/>
<classpathentry kind="lib" path="/lib/postgresql-8.0-311.jdbc3.jar"/>
<classpathentry kind="lib" path="/lib/servlet-api.jar"/>
<classpathentry kind="lib" path="/lib/sqljdbc.jar"/>
<classpathentry kind="lib" path="/lib/jetty/activation.jar"/>
<classpathentry kind="lib" path="/lib/jetty/commons-el.jar"/>
<classpathentry kind="lib" path="/lib/jetty/commons-logging.jar"/>
<classpathentry kind="lib" path="/lib/jetty/jasper-compiler.jar"/>
<classpathentry kind="lib" path="/lib/jetty/jasper-runtime.jar"/>
<classpathentry kind="lib" path="/lib/jetty/javax.servlet.jar"/>
<classpathentry kind="lib" path="/lib/jetty/jaxrpc.jar"/>
<classpathentry kind="lib" path="/lib/jetty/mail.jar"/>
<classpathentry kind="lib" path="/lib/jetty/mx4j-remote.jar"/>
<classpathentry kind="lib" path="/lib/jetty/mx4j-tools.jar"/>
<classpathentry kind="lib" path="/lib/jetty/mx4j.jar"/>
<classpathentry kind="lib" path="/lib/jetty/org.mortbay.jetty.jar"/>
<classpathentry kind="lib" path="/lib/jetty/org.mortbay.jmx.jar"/>
<classpathentry kind="lib" path="/lib/jetty/saaj.jar"/>
<classpathentry kind="lib" path="/lib/jetty/xercesImpl.jar"/>
<classpathentry kind="lib" path="/lib/jetty/xml-apis.jar"/>
<classpathentry kind="lib" path="/lib/jetty/xmlParserAPIs.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/base-calculate"/>
<classpathentry combineaccessrules="false" kind="src" path="/chart-base"/>
<classpathentry combineaccessrules="false" kind="src" path="/chart-chartattr"/>
<classpathentry combineaccessrules="false" kind="src" path="/chart-chartdata"/>
<classpathentry combineaccessrules="false" kind="src" path="/chart-chartglyph"/>
<classpathentry combineaccessrules="false" kind="src" path="/chart-web"/>
<classpathentry combineaccessrules="false" kind="src" path="/engine-page"/>
<classpathentry combineaccessrules="false" kind="src" path="/base-data"/>
<classpathentry combineaccessrules="false" kind="src" path="/engine-view"/>
<classpathentry combineaccessrules="false" kind="src" path="/engine-write"/>
<classpathentry combineaccessrules="false" kind="src" path="/engine-remote"/>
<classpathentry combineaccessrules="false" kind="src" path="/designer_chart"/>
<classpathentry combineaccessrules="false" kind="src" path="/designer_form"/>
<classpathentry kind="lib" path="/lib/swt.jar"/>
<classpathentry kind="lib" path="/lib/sqlite-jdbc.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jetty/activation.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jetty/commons-el.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jetty/commons-logging.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jetty/jasper-compiler.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jetty/jasper-runtime.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jetty/javax.servlet.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jetty/jaxrpc.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jetty/mail.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jetty/mx4j.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jetty/mx4j-remote.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jetty/mx4j-tools.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jetty/org.mortbay.jetty.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jetty/org.mortbay.jmx.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jetty/saaj.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jetty/xercesImpl.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jetty/xml-apis.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jetty/xmlParserAPIs.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/3rd.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/ant-junit.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/cglib-nodep-2.2.2.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/commons-codec-1.6.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/commons-logging-1.2.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/easymock-3.2.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/hamcrest-core-1.3.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jamm.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jna.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jts-1.13.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/junit.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/junit-4.12.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/mysql-connector-java-5.1.6-bin.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/objenesis-2.1.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/ojdbc14.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/olap4j-1.1.0.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/olap4j-xmla-1.1.0.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/postgresql-8.0-311.jdbc3.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/quartz.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/sapjco.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/sapjco3.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/servlet-api.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/sqlite-jdbc.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/sqljdbc.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/swag.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/swexpl.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/swt.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/Sybelux.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/xercesImpl.jar"/>
<classpathentry kind="lib" path="D:/code/fr-chart-8.0.jar"/>
<classpathentry kind="lib" path="D:/code/fr-core-8.0.jar"/>
<classpathentry kind="lib" path="D:/code/fr-performance-8.0.jar"/>
<classpathentry kind="lib" path="D:/code/fr-platform-8.0.jar"/>
<classpathentry kind="lib" path="D:/code/fr-report-8.0.jar"/>
<classpathentry kind="lib" path="D:/code/fr-third-8.0.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>

48
designer/src/com/fr/design/mainframe/bbs/UserInfoLabel.java

@ -18,6 +18,7 @@ import com.fr.general.Inter;
import com.fr.general.SiteCenter;
import com.fr.general.http.HttpClient;
import com.fr.stable.EncodeConstants;
import com.fr.stable.OperatingSystem;
import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils;
@ -34,10 +35,9 @@ import java.util.HashMap;
/**
* @author neil
*
* @date: 2015-3-4-上午9:05:52
*/
public class UserInfoLabel extends UILabel{
public class UserInfoLabel extends UILabel {
//默认查询消息时间, 30s
private static final long CHECK_MESSAGE_TIME = 30 * 1000L;
@ -109,7 +109,7 @@ public class UserInfoLabel extends UILabel{
@Override
public void showLoginContext() {
LoginPane managerPane = new LoginPane();
UIDialog qqdlg = new LoginDialog(DesignerContext.getDesignerFrame(),managerPane);
UIDialog qqdlg = new LoginDialog(DesignerContext.getDesignerFrame(), managerPane);
LoginWebBridge.getHelper().setDialogHandle(qqdlg);
LoginWebBridge.getHelper().setUILabel(UserInfoLabel.this);
QQLoginWebBridge.getHelper().setLoginlabel();
@ -120,26 +120,27 @@ public class UserInfoLabel extends UILabel{
});
}
private void clearLoginInformation(){
private void clearLoginInformation() {
DesignerEnvManager.getEnvManager().setBBSName(StringUtils.EMPTY);
DesignerEnvManager.getEnvManager().setBBSPassword(StringUtils.EMPTY);
DesignerEnvManager.getEnvManager().setInShowBBsName(StringUtils.EMPTY);
DesignerEnvManager.getEnvManager().setBbsUid(DEFAULT_BBS_UID);
}
private void updateInfoPane(){
private void updateInfoPane() {
userInfoPane.markUnSignIn();
}
/**
* showBBSDialog 弹出BBS资讯框
*/
public static void showBBSDialog(){
public static void showBBSDialog() {
Thread showBBSThread = new Thread(new Runnable() {
@Override
public void run() {
if(!FRContext.isChineseEnv()){
// vito:最新mac10.12和javafx弹出框初始化时会有大几率卡死在native方法,这里先屏蔽一下。
if (!FRContext.isChineseEnv() || OperatingSystem.isMacOS()) {
return;
}
String lastBBSNewsTime = DesignerEnvManager.getEnvManager().getLastShowBBSNewsTime();
@ -153,11 +154,11 @@ public class UserInfoLabel extends UILabel{
FRContext.getLogger().error(e.getMessage());
}
HttpClient hc = new HttpClient(SiteCenter.getInstance().acquireUrlByKind("bbs.popup"));
if (!hc.isServerAlive()){
if (!hc.isServerAlive()) {
return;
}
String res = hc.getResponseText();
if (res.indexOf(BBSConstants.UPDATE_KEY) == -1){
if (res.indexOf(BBSConstants.UPDATE_KEY) == -1) {
return;
}
try {
@ -171,7 +172,7 @@ public class UserInfoLabel extends UILabel{
showBBSThread.start();
}
private void sleep(long millis){
private void sleep(long millis) {
try {
Thread.sleep(millis);
} catch (InterruptedException e) {
@ -185,18 +186,17 @@ public class UserInfoLabel extends UILabel{
/**
* 重置当前用户名
*
*/
public void resetUserName(){
public void resetUserName() {
this.userName = StringUtils.EMPTY;
}
public void setUserName(String userName) {
if(StringUtils.isEmpty(userName)){
if (StringUtils.isEmpty(userName)) {
return;
}
if(StringUtils.isEmpty(this.userName)){
if (StringUtils.isEmpty(this.userName)) {
updateMessageCount();
}
//往designerenvmanger里写一下
@ -204,7 +204,7 @@ public class UserInfoLabel extends UILabel{
this.userName = userName;
}
private void updateMessageCount(){
private void updateMessageCount() {
//启动获取消息更新的线程
//登陆状态, 根据存起来的用户名密码, 每1分钟发起一次请求, 更新消息条数.
Thread updateMessageThread = new Thread(new Runnable() {
@ -213,12 +213,12 @@ public class UserInfoLabel extends UILabel{
public void run() {
sleep(CHECK_MESSAGE_TIME);
//从env中获取username, 因为如果注销的话, env的里username会被清空.
while(StringUtils.isNotEmpty(DesignerEnvManager.getEnvManager().getBBSName())){
while (StringUtils.isNotEmpty(DesignerEnvManager.getEnvManager().getBBSName())) {
HashMap<String, String> para = new HashMap<String, String>();
para.put("username", encode(encode(userName)));
HttpClient getMessage = new HttpClient(SiteCenter.getInstance().acquireUrlByKind("bbs.message"), para);
getMessage.asGet();
if(getMessage.isServerAlive()){
if (getMessage.isServerAlive()) {
try {
String res = getMessage.getResponseText();
if (StringUtils.isNotEmpty(res)) {
@ -234,7 +234,7 @@ public class UserInfoLabel extends UILabel{
updateMessageThread.start();
}
private String encode(String str){
private String encode(String str) {
try {
return URLEncoder.encode(str, EncodeConstants.ENCODING_UTF_8);
} catch (UnsupportedEncodingException e) {
@ -248,11 +248,11 @@ public class UserInfoLabel extends UILabel{
public void setMessageCount(int messageCount) {
// 当只有一条消息时,阅读之后,消息面板重置为只含用户名的状态
if(this.messageCount == MIN_MESSAGE_COUNT && messageCount < MIN_MESSAGE_COUNT){
if (this.messageCount == MIN_MESSAGE_COUNT && messageCount < MIN_MESSAGE_COUNT) {
this.setText(this.userName);
return;
}
if(this.messageCount == messageCount || messageCount < MIN_MESSAGE_COUNT){
if (this.messageCount == messageCount || messageCount < MIN_MESSAGE_COUNT) {
return;
}
@ -271,21 +271,21 @@ public class UserInfoLabel extends UILabel{
public void mouseEntered(MouseEvent e) {
UserInfoLabel.this.setCursor(new Cursor(Cursor.HAND_CURSOR));
};
}
@Override
public void mouseClicked(MouseEvent e) {
userName = DesignerEnvManager.getEnvManager().getBBSName();
if(StringUtils.isNotEmpty(userName)) {
if (StringUtils.isNotEmpty(userName)) {
UIPopupMenu menu = new UIPopupMenu();
menu.setOnlyText(true);
menu.setPopupSize(userInfoPane.getWidth(),userInfoPane.getHeight()*3);
menu.setPopupSize(userInfoPane.getWidth(), userInfoPane.getHeight() * 3);
//私人消息
UIMenuItem priviteMessage = new UIMenuItem(Inter.getLocText("FR-Designer-BBSLogin_Privite-Message"));
priviteMessage.addMouseListener(new MouseAdapter() {
public void mousePressed(MouseEvent e) {
if(StringUtils.isNotEmpty(userName)){
if (StringUtils.isNotEmpty(userName)) {
try {
String loginUrl = SiteCenter.getInstance().acquireUrlByKind("bbs.default");
Desktop.getDesktop().browse(new URI(loginUrl));

55
designer_base/.classpath

@ -3,8 +3,57 @@
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/lib"/>
<classpathentry kind="lib" path="D:/Program Files/Git/finereport/lib/report/fr-core-8.0.jar"/>
<classpathentry kind="lib" path="D:/Program Files/Git/finereport/lib/report/fr-third-8.0.jar"/>
<classpathentry kind="lib" path="D:/Program Files/Git/finereport/lib/jetty/org.mortbay.jetty.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jetty/activation.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jetty/commons-el.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jetty/commons-logging.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jetty/jasper-compiler.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jetty/jasper-runtime.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jetty/javax.servlet.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jetty/jaxrpc.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jetty/mail.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jetty/mx4j.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jetty/mx4j-remote.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jetty/mx4j-tools.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jetty/org.mortbay.jetty.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jetty/org.mortbay.jmx.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jetty/saaj.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jetty/xercesImpl.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jetty/xml-apis.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jetty/xmlParserAPIs.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/3rd.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/ant-junit.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/cglib-nodep-2.2.2.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/commons-codec-1.6.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/commons-logging-1.2.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/easymock-3.2.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/hamcrest-core-1.3.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jamm.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jna.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jts-1.13.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/junit.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/junit-4.12.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/mysql-connector-java-5.1.6-bin.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/objenesis-2.1.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/ojdbc14.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/olap4j-1.1.0.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/olap4j-xmla-1.1.0.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/postgresql-8.0-311.jdbc3.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/quartz.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/sapjco.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/sapjco3.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/servlet-api.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/sqlite-jdbc.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/sqljdbc.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/swag.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/swexpl.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/swt.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/Sybelux.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/xercesImpl.jar"/>
<classpathentry kind="lib" path="D:/code/fr-chart-8.0.jar"/>
<classpathentry kind="lib" path="D:/code/fr-core-8.0.jar"/>
<classpathentry kind="lib" path="D:/code/fr-performance-8.0.jar"/>
<classpathentry kind="lib" path="D:/code/fr-platform-8.0.jar"/>
<classpathentry kind="lib" path="D:/code/fr-report-8.0.jar"/>
<classpathentry kind="lib" path="D:/code/fr-third-8.0.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>

34
designer_base/src/com/fr/design/data/datapane/connect/ConnectionTableProcedurePane.java

@ -11,6 +11,7 @@ import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.gui.ilist.TableViewList;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.dialog.BasicPane;
import com.fr.general.GeneralContext;
import com.fr.general.Inter;
import com.fr.stable.ArrayUtils;
@ -37,8 +38,8 @@ public class ConnectionTableProcedurePane extends BasicPane {
public ConnectionTableProcedurePane() {
this.setLayout(new BorderLayout(4, 4));
connectionComboBox = new ConnectionComboBoxPanel(com.fr.data.impl.Connection.class){
protected void refreshItems(){
connectionComboBox = new ConnectionComboBoxPanel(com.fr.data.impl.Connection.class) {
protected void refreshItems() {
super.refreshItems();
if (tableViewList != null) {
search();
@ -54,8 +55,8 @@ public class ConnectionTableProcedurePane extends BasicPane {
Object obj = tableViewList.getSelectedValue();
TableProcedure tableProcedure = null;
if (obj instanceof TableProcedure) {
tableProcedure = (TableProcedure)obj;
}else {
tableProcedure = (TableProcedure) obj;
} else {
return;
}
for (int i = 0; i < ConnectionTableProcedurePane.this.listeners.size(); i++) {
@ -89,15 +90,27 @@ public class ConnectionTableProcedurePane extends BasicPane {
tableCheckBox.setSelected(true);
tableCheckBox.addActionListener(filter);
first.add(tableCheckBox);
first.add(new UILabel(Inter.getLocText("Table"), BaseUtils.readIcon("/com/fr/design/images/data/tables.png"), UILabel.LEADING));
JPanel second = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
viewCheckBox = new UICheckBox();
viewCheckBox.setSelected(true);
viewCheckBox.addActionListener(filter);
second.add(viewCheckBox);
second.add(new UILabel(Inter.getLocText("SQL-View"), BaseUtils.readIcon("/com/fr/design/images/data/views.png"), UILabel.LEADING));
// 根据环境是否为中文设置不同的显示
if (GeneralContext.isChineseEnv()) {
first.add(new UILabel(Inter.getLocText("FR-Designer_SQL-Table"),
BaseUtils.readIcon("/com/fr/design/images/data/tables.png"), UILabel.LEADING));
second.add(new UILabel(Inter.getLocText("FR-Designer_SQL-View"),
BaseUtils.readIcon("/com/fr/design/images/data/views.png"), UILabel.LEADING));
} else {
UILabel ui1 = new UILabel(BaseUtils.readIcon("/com/fr/design/images/data/tables.png"), UILabel.LEADING);
UILabel ui2 = new UILabel(BaseUtils.readIcon("/com/fr/design/images/data/views.png"), UILabel.LEADING);
ui1.setToolTipText(Inter.getLocText("FR-Designer_SQL-Table"));
ui2.setToolTipText(Inter.getLocText("FR-Designer_SQL-View"));
first.add(ui1);
second.add(ui2);
}
checkBoxgroupPane.add(first);
checkBoxgroupPane.add(second);
@ -106,11 +119,13 @@ public class ConnectionTableProcedurePane extends BasicPane {
/**
* itemComboBox 加上 itemListener
*
* @param itemListener
*/
public void addItemListener(ItemListener itemListener) {
connectionComboBox.itemComboBox.addItemListener(itemListener);
}
private DocumentListener searchListener = new DocumentListener() {
@Override
@ -146,13 +161,13 @@ public class ConnectionTableProcedurePane extends BasicPane {
String[] types = ArrayUtils.EMPTY_STRING_ARRAY;
if (tableCheckBox != null) {
if (tableCheckBox.isSelected()) {
types = (String[])ArrayUtils.add(types, TableProcedure.TABLE);
types = (String[]) ArrayUtils.add(types, TableProcedure.TABLE);
}
if (viewCheckBox.isSelected()) {
types = (String[])ArrayUtils.add(types, TableProcedure.VIEW);
types = (String[]) ArrayUtils.add(types, TableProcedure.VIEW);
}
} else {
types = (String[])ArrayUtils.add(types, TableProcedure.PROCEDURE);
types = (String[]) ArrayUtils.add(types, TableProcedure.PROCEDURE);
}
tableViewList.populate(selectedObj, searchField.getText().trim(), types);
}
@ -181,6 +196,7 @@ public class ConnectionTableProcedurePane extends BasicPane {
public static interface DoubleClickSelectedNodeOnTreeListener {
/**
* 处理双击事件
*
* @param target
*/
public void actionPerformed(TableProcedure target);

21
designer_base/src/com/fr/design/extra/PluginTask.java

@ -49,7 +49,7 @@ public class PluginTask<T> extends Task<T> {
@Override
public void process(String s) {
if (StringUtils.isNotBlank(s)) {
updateMessage(changText(s));
updateMessage(trimText(s));
}
}
});
@ -59,20 +59,25 @@ public class PluginTask<T> extends Task<T> {
@Override
protected void done() {
updateMessage(changText(executor.getTaskFinishMessage()));
updateMessage(trimText(executor.getTaskFinishMessage()));
}
/**
* 转换掉一些会造成错误的特殊字符
* 1 ""中的""必须转义
* 2 js字符串中的\n会导致js字符串变成多行,而js字符创不支持多行拼接
* vito:由于使用webEngine.executeScript("(" + callback + ")(\"" + newValue + "\")")
* 执行脚本所以原来规范的json格式也会在拼接字符串后可能抛出参数异常需要转换掉一些会造成错误的特殊字符
* 选择在java端替换的原因是异常抛出自executeScript方法的参数.
*
* 1.""中的""必须转义
* 2.js字符串中的\n会导致js字符串变成多行,而js字符串不支持多行拼接
* 3.由JSONObject.toString()得到的字符串中html标签的属性会自动加上\造成替换难度加大
* 这边建议去除所有的html标签
*
* @param old 原始字符串
* @return 处理之后的字符串
*/
private String changText(String old) {
if(StringUtils.isNotBlank(old)){
return old.replaceAll("\"", "\\\\\"").replaceAll("\n", "");
private String trimText(String old) {
if (StringUtils.isNotBlank(old)) {
return old.replaceAll("\n", "").replaceAll("\"", "\\\\\"").replaceAll("\'", "\\\\\'");
}
return StringUtils.EMPTY;
}

24
designer_base/src/com/fr/design/extra/ShopPaneConfig.java

@ -11,14 +11,26 @@ public abstract class ShopPaneConfig {
private JFXPanel webPane;
public ShopPaneConfig() {
this.mainJS = getMainJS();
this.scriptsId = getScriptsId();
this.webPane = getWebPane();
this.mainJS = setMainJS();
this.scriptsId = setScriptsId();
this.webPane = setWebPane();
}
abstract String getMainJS();
abstract String setMainJS();
abstract String getScriptsId();
abstract String setScriptsId();
abstract JFXPanel getWebPane();
abstract JFXPanel setWebPane();
public String getMainJS() {
return mainJS;
}
public String getScriptsId() {
return scriptsId;
}
public JFXPanel getWebPane() {
return webPane;
}
}

2
designer_base/src/com/fr/design/formula/FunctionManagerPane.java

@ -132,7 +132,7 @@ public class FunctionManagerPane extends BasicPane {
JPanel northPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane();
this.add(northPane, BorderLayout.NORTH);
JPanel reportletNamePane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
classNameTextField = new UITextField(28);
classNameTextField = new UITextField(25);
reportletNamePane.add(classNameTextField);
UIButton browserButton = new UIButton(Inter.getLocText("FR-Designer_Select"));
browserButton.setPreferredSize(new Dimension(browserButton.getPreferredSize().width, classNameTextField.getPreferredSize().height));

29
designer_base/src/com/fr/design/gui/style/FormatPane.java

@ -4,10 +4,10 @@ import com.fr.base.CoreDecimalFormat;
import com.fr.base.GraphHelper;
import com.fr.base.Style;
import com.fr.base.TextFormat;
import com.fr.design.constants.UIConstants;
import com.fr.data.core.FormatField;
import com.fr.data.core.FormatField.FormatContents;
import com.fr.design.border.UIRoundedBorder;
import com.fr.design.constants.UIConstants;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.icombobox.UIComboBoxRenderer;
import com.fr.design.gui.icontainer.UIScrollPane;
@ -81,16 +81,7 @@ public class FormatPane extends AbstractBasicStylePane {
};
typeComboBox = new UIComboBox(types);
UIComboBoxRenderer render = new UIComboBoxRenderer() {
@Override
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
JLabel label = (JLabel) super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
if (value instanceof Integer) {
label.setText(" " + FormatField.getInstance().getName((Integer) value));
}
return label;
}
};
UIComboBoxRenderer render = createComBoxRender();
typeComboBox.setRenderer(render);
typeComboBox.addItemListener(itemListener);
contentPane.add(sampleLabel, BorderLayout.NORTH);
@ -114,11 +105,23 @@ public class FormatPane extends AbstractBasicStylePane {
}
protected UIComboBoxRenderer createComBoxRender(){
return new UIComboBoxRenderer() {
@Override
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
JLabel label = (JLabel) super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
if (value instanceof Integer) {
label.setText(" " + FormatField.getInstance().getName((Integer) value));
}
return label;
}
};
}
private void iniSampleLable() {
Border innterborder = new UIRoundedBorder(UIConstants.LINE_COLOR, 1, 4);
Font tmpFont = null;
Border border = BorderFactory.createTitledBorder(innterborder, Inter.getLocText("StyleFormat-Sample"), TitledBorder.LEFT, 0, tmpFont, UIConstants.LINE_COLOR);
Border border = BorderFactory.createTitledBorder(innterborder, Inter.getLocText("FR-Base_StyleFormat_Sample"), TitledBorder.LEFT, 0, tmpFont, UIConstants.LINE_COLOR);
sampleLabel = new UILabel(FormatField.getInstance().getFormatValue()) {
@Override
@ -156,7 +159,7 @@ public class FormatPane extends AbstractBasicStylePane {
* @return 标题
*/
public String title4PopupWindow() {
return Inter.getLocText("Format");
return Inter.getLocText("FR-Base_Format");
}
/**

5272
designer_base/src/com/fr/design/gui/syntax/ui/rsyntaxtextarea/modes/GroovyTokenMaker.java

File diff suppressed because it is too large Load Diff

4
designer_base/src/com/fr/design/hyperlink/WebHyperNorthPane.java

@ -51,10 +51,10 @@ public class WebHyperNorthPane extends AbstractHyperlinkPane<WebHyperlink> {
urlPane.add(urlTextField);
urlTextField.setText(ProductConstants.WEBSITE_URL);
UILabel label = new UILabel(Inter.getLocText(new String[]{"Example","Or"}, new String[]{":http://www.baidu.com","/main.jsp"}));
//UILabel label = new UILabel(Inter.getLocText(new String[]{"Example","Or"}, new String[]{":http://www.baidu.com","/main.jsp"}));
JPanel urlWithHelp = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(2);
urlWithHelp.add(GUICoreUtils.createNamedPane(urlPane, "URL:"));
urlWithHelp.add(label);
//urlWithHelp.add(label);
if(this.needRenamePane){
headerPane.setLayout(new BorderLayout(LayoutConstants.VGAP_LARGE,LayoutConstants.VGAP_SMALL));

7
designer_base/src/com/fr/design/locale/designer.properties

@ -480,3 +480,10 @@ FR-Designer_Data_Analysis_Settings=Data Analysis Settings
FR-Designer_Browser_Background=Browser Background
FR-Designer_Import_Css=Import Css
FR-Designer_Import_JavaScript=Import JavaScript
FR-Designer-Datasource-Param_DES=<html>&nbsp;you can type "${abc}" as a parameter, here, abc is a parameter name. <br/>&nbsp;for example\: select * from table where id\=${abc}.<br/>&nbsp;select * from table where id\='${abc}'.(if the field id is typeof string)</html>
FR-Designer-DS-Database_Query=
FR-Designer_Is_Share_DBTableData=
FR-Designer-LayerPageReport_PageQuery=
FR-Designer-LayerPageReport_Define_PageQuerySQL=
FR-Designer_Event=
FR-Designer_Properties=

7
designer_base/src/com/fr/design/locale/designer_en_US.properties

@ -479,3 +479,10 @@ FR-Designer_Data_Analysis_Settings=Data Analysis Settings
FR-Designer_Browser_Background=Browser Background
FR-Designer_Import_Css=Reference Css
FR-Designer_Import_JavaScript=Reference JavaScript
FR-Designer-LayerPageReport_PageQuery=Page Break query
FR-Designer-LayerPageReport_Define_PageQuerySQL=Define sql for page break query
FR-Designer-Datasource-Param_DES=<html>&nbsp;You can type "${abc}" as a parameter, here, abc is a parameter name. <br/>&nbsp;for example\: select * from table where id\=${abc}.<br/>&nbsp;select * from table where id\='${abc}'.(if the type of id is string)</html>
FR-Designer-DS-Database_Query=DB Query
FR-Designer_Is_Share_DBTableData=Shared data set
FR-Designer_Event=Event
FR-Designer_Properties=Properties

8
designer_base/src/com/fr/design/locale/designer_ja_JP.properties

@ -458,3 +458,11 @@ FR-Designer_Data_Analysis_Settings=\u30C7\u30FC\u30BF\u5206\u6790\u8A2D\u5B9A
FR-Designer_Browser_Background=\u30D6\u30E9\u30A6\u30B6\u80CC\u666F
FR-Designer_Import_Css=Css\u5F15\u7528
FR-Designer_Import_JavaScript=JavaScript\u5F15\u7528
FR-Designer-Datasource-Param_DES=<html>&nbsp; "${abc}"\u3092\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC\u3068\u3057\u3066\u5165\u529B\u3067\u304D\u307E\u3059\u3002\u3053\u3053\u3067abc\u306F\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC\u3002abc\u306F\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC\u306E\u540D\u524D\u3067\u3059\u3002\u4F8B\u3048\u3070<br/>&nbsp;select * from table where id\=${abc}\u3002<br/>&nbsp;select * from table where id\='${abc}'\u3002(\u3082\u3057id\u306F\u6587\u5B57\u5217\u306A\u3089)</html>\uFFFD
FR-Designer-DS-Database_Query=\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u30AF\u30A8\u30EA\u30FC
FR-Designer-LayerPageReport_PageQuery=\u30DA\u30FC\u30B8\u5225\u30AF\u30A8\u30EA
FR-Designer-LayerPageReport_Define_PageQuerySQL=\u5B9A\u7FA9\u30DA\u30FC\u30B8\u5225\u30AF\u30A8\u30EAsql
FR-Designer_Is_Share_DBTableData=\u5171\u6709\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8
FR-Designer_Event=\
FR-Designer_Properties=FR-Designer_Properties=\
\

7
designer_base/src/com/fr/design/locale/designer_ko_KR.properties

@ -454,3 +454,10 @@ FR-Designer_Data_Analysis_Settings=\uB370\uC774\uD130\uBD84\uC11D\uC124\uC815
FR-Designer_Browser_Background=\uC6F9\uBE0C\uB77C\uC6B0\uC800\uBC30\uACBD
FR-Designer_Import_Css=Css\uC778\uC6A9
FR-Designer_Import_JavaScript=JavaScript\uC778\uC6A9
FR-Designer-Datasource-Param_DES=<html>&nbsp, "${abc}"\uB97C\uB9E4\uAC1C\uBCC0\uC218\uB85C\uC785\uB825\uD560\uC218\uC788\uC73C\uBA70,abc\uB294\uB9E4\uAC1C\uBCC0\uC218\uC758\uBA85\uCE6D\uC785\uB2C8\uB2E4. \uC608\uFF1A<br/>&nbsp;select * from table where id\='${abc}'. (id\uD544\uB4DC\uAC00\uBB38\uC790\uC5F4\uC720\uD615\uC77C\uACBD\uC6B0)</html>
FR-Designer-DS-Database_Query=\uB370\uC774\uD130\uBCA0\uC774\uC2A4\uCC3E\uC544\uBCF4\uAE30
FR-Designer_Is_Share_DBTableData=\uB370\uC774\uD130\uC138\uD2B8\uACF5\uC720
FR-Designer-LayerPageReport_PageQuery=\uD398\uC774\uC9C0\uB098\uB204\uAE30\uCC3E\uC544\uBCF4\uAE30
FR-Designer-LayerPageReport_Define_PageQuerySQL=\uC815\uC758\uD398\uC774\uC9C0\uB098\uB204\uAE30\uCC3E\uC544\uBCF4\uAE30sql
FR-Designer_Event=\
FR-Designer_Properties=\

7
designer_base/src/com/fr/design/locale/designer_zh_CN.properties

@ -483,3 +483,10 @@ FR-Designer_Data_Analysis_Settings=\u6570\u636E\u5206\u6790\u8BBE\u7F6E
FR-Designer_Browser_Background=\u6D4F\u89C8\u5668\u80CC\u666F
FR-Designer_Import_Css=\u5F15\u7528Css
FR-Designer_Import_JavaScript=\u5F15\u7528JavaScript
FR-Designer-Datasource-Param_DES=<html>&nbsp;\u60A8\u53EF\u4EE5\u952E\u5165"${abc}"\u505A\u4E3A\u4E00\u4E2A\u53C2\u6570\uFF0C\u8FD9\u91CCabc\u662F\u53C2\u6570\u7684\u540D\u79F0\u3002\u4F8B\u5982\uFF1A<br/>&nbsp;select * from table where id\=${abc}\u3002<br/>&nbsp;select * from table where id\='${abc}'\u3002(\u5982\u679Cid\u5B57\u6BB5\u4E3A\u5B57\u7B26\u4E32\u7C7B\u578B)</html>
FR-Designer-DS-Database_Query=\u6570\u636E\u5E93\u67E5\u8BE2
FR-Designer-LayerPageReport_PageQuery=\u5206\u9875\u67E5\u8BE2
FR-Designer-LayerPageReport_Define_PageQuerySQL=\u5B9A\u4E49\u5206\u9875\u67E5\u8BE2sql
FR-Designer_Is_Share_DBTableData=\u5171\u4EAB\u6570\u636E\u96C6
FR-Designer_Event=\u4E8B\u4EF6
FR-Designer_Properties=\u5C5E\u6027

7
designer_base/src/com/fr/design/locale/designer_zh_TW.properties

@ -471,3 +471,10 @@ FR-Designer_Data_Analysis_Settings=\u8CC7\u6599\u5206\u6790\u8A2D\u5B9A
FR-Designer_Browser_Background=\u700F\u89BD\u5668\u80CC\u666F
FR-Designer_Import_Css=\u5F15\u7528Css
FR-Designer_Import_JavaScript=\u5F15\u7528JavaScript
FR-Designer-Datasource-Param_DES=<html>&nbsp;\u60A8\u53EF\u4EE5\u9375\u5165"${abc}"\u505A\u70BA\u4E00\u500B\u53C3\u6578\uFF0C\u9019\u91CCabc\u662F\u53C3\u6578\u7684\u540D\u7A31\u3002\u4F8B\u5982\uFF1A<br/>&nbsp;select * from table where idDatasource-Procedurewaring\=\u7CFB\u7D71\u4E0D\u80FD\u81EA\u52D5\u7372\u53D6\u8A72\u5B58\u5132\u7A0B\u5E8F\u7684\u53C3\u6578\uFF0C\u8ACB\u624B\u52D5\u65B0\u589E\!
FR-Designer-DS-Database_Query=\u8CC7\u6599\u5EAB\u67E5\u8A62
FR-Designer-LayerPageReport_PageQuery=\u5206\u9801\u67E5\u8A62
FR-Designer-LayerPageReport_Define_PageQuerySQL=\u5B9A\u7FA9\u5206\u9801\u67E5\u8A62sql
FR-Designer_Is_Share_DBTableData=\u662F\u5426\u5171\u4EAB\u8CC7\u6599\u96C6
FR-Designer_Properties=\u5C6C\u6027
FR-Designer_Event=\u4E8B\u4EF6

59
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,17 +434,31 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt
});
UIButton cancelButton = new UIButton(Inter.getLocText("FR-Designer_Cancel"));
cancelButton.setBounds(250, 90, 60, 25);
cancelButton.setPreferredSize(new Dimension(80, 25));
cancelButton.setMinimumSize(new Dimension(80, 25));
cancelButton.setMaximumSize(new Dimension(80, 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);

27
designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java

@ -140,9 +140,32 @@ public abstract class ToolBarMenuDock {
// 添加帮助菜单
menuList.add(createHelpMenuDef());
// 添加社区菜单
addCommunityMenuDef(menuList);
return menuList.toArray(new MenuDef[menuList.size()]);
}
public void addCommunityMenuDef(java.util.List<MenuDef> menuList){
Locale locale = FRContext.getLocale();
Locale [] locales =supportCommunityLocales();
for(int i = 0; i < locales.length; i++) {
if(locale.equals(locales[i])){
menuList.add(createCommunityMenuDef());
break;
}
}
}
public Locale[] supportCommunityLocales() {
return new Locale[]{
Locale.CHINA,
Locale.JAPAN,
Locale.TAIWAN,
Locale.US,
};
}
public void insertTemplateExtendMenu(ToolBarMenuDockPlus plus, MenuDef[] menuDefs) {
// 给菜单加插件入口
for (MenuDef m : menuDefs) {
@ -295,7 +318,9 @@ public abstract class ToolBarMenuDock {
//shortCuts.add(new TutorialAction());
shortCuts.add(SeparatorDef.DEFAULT);
if (ComparatorUtils.equals(ProductConstants.APP_NAME,FINEREPORT)) {
shortCuts.add(new FeedBackAction());
// mod by anchore 16/11/17 去掉反馈
//shortCuts.add(new FeedBackAction());
shortCuts.add(SeparatorDef.DEFAULT);
shortCuts.add(SeparatorDef.DEFAULT);
// shortCuts.add(new ForumAction());

50
designer_base/src/com/fr/design/menu/KeySetUtils.java

@ -4,10 +4,13 @@
package com.fr.design.menu;
import com.fr.general.ComparatorUtils;
import com.fr.general.GeneralContext;
import com.fr.general.Inter;
import javax.swing.*;
import java.awt.event.KeyEvent;
import java.util.Locale;
/**
* Created by IntelliJ IDEA.
@ -63,7 +66,7 @@ public class KeySetUtils {
@Override
public String getMenuName() {
return Inter.getLocText("M_Close_Current");
return Inter.getLocText("FR-Designer_Close");
}
@Override
@ -80,7 +83,7 @@ public class KeySetUtils {
@Override
public String getMenuName() {
return Inter.getLocText("M-Save");
return Inter.getLocText("FR-Designer_Save");
}
@Override
@ -148,7 +151,7 @@ public class KeySetUtils {
@Override
public String getMenuName() {
return Inter.getLocText("Export");
return Inter.getLocText("FR-Designer_Export");
}
@Override
@ -183,7 +186,7 @@ public class KeySetUtils {
@Override
public String getMenuName() {
return Inter.getLocText("Export-Excel-Page");
return Inter.getLocText("FR-Engine_Export-Excel-Page");
}
@Override
@ -201,7 +204,7 @@ public class KeySetUtils {
@Override
public String getMenuName() {
return Inter.getLocText("Export-Excel-Simple");
return Inter.getLocText("FR-Engine_Export-Excel-Simple");
}
@Override
@ -219,7 +222,7 @@ public class KeySetUtils {
@Override
public String getMenuName() {
return Inter.getLocText("Export-Excel-PageToSheet");
return Inter.getLocText("FR-Engine_Export-Excel-PageToSheet");
}
@Override
@ -362,7 +365,7 @@ public class KeySetUtils {
@Override
public String getMenuName() {
return Inter.getLocText("ExportAndOutput");
return Inter.getLocText("FR-Designer_ExportAndOutput");
}
@Override
@ -379,7 +382,7 @@ public class KeySetUtils {
@Override
public String getMenuName() {
return "EXCEL"+Inter.getLocText("ExportAndOutput");
return "EXCEL"+Inter.getLocText("FR-Designer_ExportAndOutput");
}
@Override
@ -413,7 +416,7 @@ public class KeySetUtils {
@Override
public String getMenuName() {
return Inter.getLocText("M-SwitchWorkspace");
return Inter.getLocText("FR-Designer_M-SwitchWorkspace");
}
@Override
@ -430,7 +433,7 @@ public class KeySetUtils {
@Override
public String getMenuName() {
return Inter.getLocText("M-Exit");
return Inter.getLocText("FR-Designer_M-Exit");
}
@Override
@ -448,7 +451,7 @@ public class KeySetUtils {
@Override
public String getMenuName() {
return Inter.getLocText("M-Template");
return Inter.getLocText("FR-Designer_M-Template");
}
@Override
@ -639,7 +642,7 @@ public class KeySetUtils {
@Override
public String getMenuName() {
return Inter.getLocText("ReportColumns-Columns");
return Inter.getLocText("FR-Designer_ReportColumns-Columns");
}
@Override
@ -657,7 +660,7 @@ public class KeySetUtils {
@Override
public String getMenuName() {
return Inter.getLocText("M-Repeat-Freeze");
return Inter.getLocText("FR-Designer_M-Repeat-Freeze");
}
@Override
@ -675,7 +678,7 @@ public class KeySetUtils {
@Override
public String getMenuName() {
return Inter.getLocText("Frozen");
return Inter.getLocText("FR-Engine_Frozen");
}
@Override
@ -710,7 +713,14 @@ public class KeySetUtils {
@Override
public String getMenuName() {
return Inter.getLocText(new String[]{"Allow", "DashBoard-Potence", "Edit"});
// mod by anchore 16/11/16
if (ComparatorUtils.equals(Locale.JAPAN, GeneralContext.getLocale())) {
return Inter.getLocText(new String[]{"FR-Engine_RP_Authority_Edit", "Allow"});
} else {
return Inter.getLocText(new String[]{"Allow", "FR-Engine_RP_Authority_Edit"});
}
//return Inter.getLocText(new String[]{"Allow", "DashBoard-Potence", "Edit"});
}
@Override
@ -727,7 +737,7 @@ public class KeySetUtils {
@Override
public String getMenuName() {
return Inter.getLocText("M-Cell");
return Inter.getLocText("FR-Designer_Cell");
}
@Override
@ -761,7 +771,7 @@ public class KeySetUtils {
@Override
public String getMenuName() {
return Inter.getLocText("Widget-Settings");
return Inter.getLocText("FR-Designer_Widget-Settings");
}
@Override
@ -795,7 +805,7 @@ public class KeySetUtils {
@Override
public String getMenuName() {
return Inter.getLocText("Condition_Attributes");
return Inter.getLocText("FR-Designer_Condition_Attributes");
}
@Override
@ -812,7 +822,7 @@ public class KeySetUtils {
@Override
public String getMenuName() {
return Inter.getLocText("Present");
return Inter.getLocText("FR-Chart-Style_Present");
}
@Override
@ -880,7 +890,7 @@ public class KeySetUtils {
@Override
public String getMenuName() {
return Inter.getLocText("Currency_Line");
return Inter.getLocText("FR-Designer_Currency_Line");
}
@Override

50
designer_base/src/com/fr/design/style/AbstractPopBox.java

@ -9,6 +9,7 @@ import javax.swing.*;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.*;
import java.awt.event.AWTEventListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.ArrayList;
@ -35,25 +36,16 @@ public abstract class AbstractPopBox extends JPanel {
showPopupMenu();
}
public void mouseExited(MouseEvent evt) {
int x= evt.getXOnScreen();//mac和widows的计算结果还不一样
int y = evt.getYOnScreen();
if (selectPopupWindow != null) {
Rectangle rectangle = selectPopupWindow.getBounds();
boolean b1 = x < rectangle.x - GAP || x > rectangle.x + rectangle.width + GAP;
boolean b2 = y < rectangle.y - GAP || y >rectangle.y + rectangle.height + GAP;
if(b1 || b2) {
hidePopupMenu();
};
AWTEventListener awt = new AWTEventListener() {
public void eventDispatched(AWTEvent event) {
if (event instanceof MouseEvent) {
MouseEvent evt = (MouseEvent) event;
if (evt.getClickCount() > 0) {
mouseClick(evt);
}
// if (OperatingSystem.isWindows()) {
//
// }else{
// Point pp = SwingUtilities.convertPoint(evt.getComponent(), evt.getPoint(), selectPopupWindow.getParent());
// Rectangle rectangle = selectPopupWindow.getBounds();
// if (pp.getY() < rectangle.getY() || pp.getY() > rectangle.getY() + rectangle.getHeight()) {
// //hidePopupMenu();
// }
// }
}
}
};
@ -67,6 +59,7 @@ public abstract class AbstractPopBox extends JPanel {
if (!this.isEnabled()) {
return;
}
Toolkit.getDefaultToolkit().addAWTEventListener(awt, AWTEvent.MOUSE_EVENT_MASK);
selectPopupWindow = this.getControlWindow();
@ -83,7 +76,7 @@ public abstract class AbstractPopBox extends JPanel {
y = y - selectPopupWindow.getHeight() - GAP2;// 超过屏幕高度了
}
if(width > screenSize.width) {
if (width > screenSize.width) {
x = screenSize.width - selectPopupWindow.getWidth();
}
selectPopupWindow.setLocation(x, y);
@ -103,12 +96,14 @@ public abstract class AbstractPopBox extends JPanel {
}
private void mouseClick(MouseEvent evt) {
int x = evt.getLocationOnScreen().x;
int y = evt.getLocationOnScreen().y;
Rectangle rectangle = this.getControlWindow().getBounds();
boolean b1 = x < rectangle.x || x > rectangle.x + rectangle.width;
boolean b2 = y < rectangle.y || y > rectangle.y + rectangle.height;
if (b1 || b2) {
Point point = new Point((int) (evt.getLocationOnScreen().getX()), (int) evt.getLocationOnScreen().getY());
Dimension popBoxD = AbstractPopBox.this.getSize();
Point popBoxP = AbstractPopBox.this.getLocationOnScreen();
Dimension popMenuD = this.getControlWindow().getSize();
Point popMenuP = this.getControlWindow().getLocation();
Rectangle popBoxRect = new Rectangle(popBoxP, popBoxD);
Rectangle popMenuRect = new Rectangle(popMenuP, popMenuD);
if (!popBoxRect.contains(point) && !popMenuRect.contains(point)) {
this.hidePopupMenu();
}
}
@ -119,6 +114,7 @@ public abstract class AbstractPopBox extends JPanel {
}
selectPopupWindow = null;
Toolkit.getDefaultToolkit().removeAWTEventListener(awt);
}
protected JWindow getControlWindow() {
@ -152,6 +148,7 @@ public abstract class AbstractPopBox extends JPanel {
/**
* 添加事件
*
* @param changeListener 事件
*/
public void addSelectChangeListener(ChangeListener changeListener) {
@ -160,6 +157,7 @@ public abstract class AbstractPopBox extends JPanel {
/**
* 删除事件
*
* @param changeListener 事件
*/
public void removeSelectChangeListener(ChangeListener changeListener) {
@ -180,6 +178,7 @@ public abstract class AbstractPopBox extends JPanel {
/**
* 待说明
*
* @param background 背景
*/
public void fireDisplayComponent(Background background) {
@ -192,6 +191,7 @@ public abstract class AbstractPopBox extends JPanel {
/**
* 初始化弹出框的面板
*
* @param preWidth 宽度
* @return 弹出面板
*/

5
designer_base/src/com/fr/design/style/color/NewColorSelectPane.java

@ -93,7 +93,10 @@ public class NewColorSelectPane extends BasicPane implements ColorSelectable {
}
centerPane.add(Box.createVerticalStrut(1));
UIButton customButton = new UIButton(Inter.getLocText(new String[]{"More", "Color"}) + "...");
// mod by anchore 16/11/16
UIButton customButton = new UIButton(Inter.getLocText("FR-Designer-Basic_More_Color"));
//UIButton customButton = new UIButton(Inter.getLocText(new String[]{"More", "Color"}) + "...");
customButton.addMouseListener(new MouseAdapter() {
@Override

49
designer_chart/.classpath

@ -1,20 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.6u35"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/lib"/>
<classpathentry combineaccessrules="false" exported="true" kind="src" path="/base"/>
<classpathentry combineaccessrules="false" exported="true" kind="src" path="/designer_base"/>
<classpathentry combineaccessrules="false" kind="src" path="/base-stable"/>
<classpathentry combineaccessrules="false" kind="src" path="/base-basic"/>
<classpathentry combineaccessrules="false" kind="src" path="/base-calculate"/>
<classpathentry combineaccessrules="false" kind="src" path="/chart-base"/>
<classpathentry combineaccessrules="false" kind="src" path="/chart-chartattr"/>
<classpathentry combineaccessrules="false" kind="src" path="/chart-chartglyph"/>
<classpathentry combineaccessrules="false" kind="src" path="/chart-web"/>
<classpathentry combineaccessrules="false" kind="src" path="/chart-chartdata"/>
<classpathentry kind="lib" path="/lib/3rd.jar" sourcepath="/lookandfeel"/>
<classpathentry combineaccessrules="false" kind="src" path="/base-data"/>
<classpathentry kind="lib" path="/lib/poi2007_fat.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/3rd.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/ant-junit.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/cglib-nodep-2.2.2.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/commons-codec-1.6.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/commons-logging-1.2.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/easymock-3.2.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/hamcrest-core-1.3.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jamm.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jna.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jts-1.13.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/junit.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/junit-4.12.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/mysql-connector-java-5.1.6-bin.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/objenesis-2.1.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/ojdbc14.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/olap4j-1.1.0.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/olap4j-xmla-1.1.0.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/postgresql-8.0-311.jdbc3.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/quartz.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/sapjco.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/sapjco3.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/servlet-api.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/sqlite-jdbc.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/sqljdbc.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/swag.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/swexpl.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/swt.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/Sybelux.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/xercesImpl.jar"/>
<classpathentry kind="lib" path="D:/code/fr-chart-8.0.jar"/>
<classpathentry kind="lib" path="D:/code/fr-core-8.0.jar"/>
<classpathentry kind="lib" path="D:/code/fr-performance-8.0.jar"/>
<classpathentry kind="lib" path="D:/code/fr-platform-8.0.jar"/>
<classpathentry kind="lib" path="D:/code/fr-report-8.0.jar"/>
<classpathentry kind="lib" path="D:/code/fr-third-8.0.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>

16
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();
String priority = (String) entry.getKey();
String imagePath = getIconPath(priority, plotID);
if (!StringUtils.isEmpty(imagePath)) {
if (StringUtils.isNotEmpty(imagePath)) {
return imagePath;
}
}
@ -273,10 +273,20 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh
*/
public String getTitle4PopupWindow(String priority, String 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);
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();
}
@ -485,7 +495,7 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh
extraChartDesignInterfaceList.add(tagName);
}
if (IndependentChartUIProvider.XML_TAG.equals(tagName)) {
addChartInterface(reader.getAttrAsString("class", ""), reader.getAttrAsString("priority", ChartTypeManager.CHART_PRIORITY),reader.getAttrAsString("plotID", ""), simplify);
addChartInterface(reader.getAttrAsString("class", ""), reader.getAttrAsString("priority", ChartTypeManager.DEFAULT_PRIORITY),reader.getAttrAsString("plotID", ""), simplify);
}
}
}

4
designer_chart/src/com/fr/design/chart/fun/impl/AbstractIndependentChartUIWithAPILevel.java

@ -15,7 +15,9 @@ import com.fr.general.ComparatorUtils;
* Created by Mitisky on 16/3/7.
*/
public abstract class AbstractIndependentChartUIWithAPILevel implements IndependentChartUIProvider {
private static final int OLD_PLUGIN_LEVEL = 3;
//这个不能改,是做兼容用的
//2016.10.14-11.24号的8.0jar因为改了这个为3,不会提示5.26号之前的插件更新
private static final int OLD_PLUGIN_LEVEL = -2;
@Override
//以前的插件没有覆写这个方法,所以始终获取到-2,比当前level低,提示更新.

13
designer_chart/src/com/fr/design/chart/series/SeriesCondition/DataSeriesConditionPane.java

@ -27,13 +27,22 @@ import java.util.Iterator;
* Time : 上午9:16
*/
public class DataSeriesConditionPane extends ConditionAttributesPane<ConditionAttr> {
protected Plot plot;
public DataSeriesConditionPane() {
public DataSeriesConditionPane(Plot plot) {
this.plot = plot;
initAvailableActionList();
initComponents();
}
public void setPlot(Plot plot) {
this.plot = plot;
}
public DataSeriesConditionPane() {
this(null);
}
private void initAvailableActionList() {
addBasicAction();
addAxisPositionAction();

1
designer_chart/src/com/fr/design/mainframe/chart/gui/ChartDataPane.java

@ -114,5 +114,4 @@ public class ChartDataPane extends AbstractChartAttrPane {
public void refreshChartDataPane(ChartCollection collection){
this.populate(collection);
}
}

40
designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java

@ -61,22 +61,6 @@ public class ChartTypeButtonPane extends BasicBeanPane<ChartCollection> implemen
//所以:stopEditing--选中其他button则响应click之后relayout;普通失焦则直接relayout.
private boolean pressOtherButtonWhenEditing = false;
// private AWTEventListener awt = new AWTEventListener() {
// public void eventDispatched(AWTEvent event) {
// //没有进行鼠标点击,则返回
// if (event instanceof MouseEvent && ((MouseEvent) event).getClickCount() > 0) {
// if (currentEditingEditor != null && !ComparatorUtils.equals(event.getSource(), currentEditingEditor)) {
// stopEditing();
// if (event.getSource() instanceof ChartChangeButton) {
// ((ChartChangeButton) event.getSource()).mouseClick((MouseEvent) event);
// }
// populateBean(editingCollection);
// }
// }
// }
// };
public ChartTypeButtonPane(ChartTypePane chartTypePane){
this();
parent = chartTypePane;
@ -275,8 +259,9 @@ public class ChartTypeButtonPane extends BasicBeanPane<ChartCollection> implemen
break;
}
}
if (editChartType != null) {
editChartType.populateBean(editingCollection.getSelectedChart());
//切换时重新更新整个面板
if (parent != null) {
parent.populate(editingCollection);
}
}
}
@ -439,26 +424,23 @@ public class ChartTypeButtonPane extends BasicBeanPane<ChartCollection> implemen
}
private void deleteAButton() {
if (indexList.contains(this) && indexList.size() > 1) {
indexList.remove(this);
if (this.isSelected()) {
indexList.get(0).setSelected(true);
changeCollectionSelected(indexList.get(0).getButtonName());
}
//先重构属性,在重构面板,否则面板在重构过程中,会重新将属性中的切换图表加到indexList中,导致面板无法删除
if (editingCollection != null) {
int count = editingCollection.getChartCount();
for (int i = 0; i < count; i++) {
if (ComparatorUtils.equals(getButtonName(), editingCollection.getChartName(i))) {
editingCollection.removeNameObject(i);
if (i <= editingCollection.getSelectedIndex()){
editingCollection.setSelectedIndex(editingCollection.getSelectedIndex()-1);
}
break;
}
}
}
if (indexList.contains(this) && indexList.size() > 1) {
indexList.remove(this);
if (this.isSelected()) {
indexList.get(0).setSelected(true);
changeCollectionSelected(indexList.get(0).getButtonName());
}
}
//获取图表收集器的状态

11
designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypePane.java

@ -291,8 +291,10 @@ public class ChartTypePane extends AbstractChartAttrPane{
paneState.setPaneState(collection.getState());
}
// TODO: 2016/11/17 因为现在populate面板时会重新构造面板,所以每次都需要重构
private boolean needReactor(ChartCollection collection) {
return paneState.getChartID() != collection.getRepresentChartID() || paneState.getPaneState() != collection.getState();
/*return paneState.getChartID() != collection.getRepresentChartID() || paneState.getPaneState() != collection.getState();*/
return true;
}
/**
@ -300,8 +302,15 @@ public class ChartTypePane extends AbstractChartAttrPane{
*/
public void populate(ChartCollection collection) {
Chart chart = collection.getSelectedChart();
this.remove(leftContentPane);
initContentPane();
buttonPane.populateBean(collection);
chartTypePane.populateBean(chart);
//remove面板之后,就需要重构下拉框
reactorChartTypePane(collection);
this.initAllListeners();
}
/**

2
designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartDatapointLabelPane.java

@ -432,7 +432,7 @@ public class ChartDatapointLabelPane extends BasicPane{
this.percentFormatPane = new FormatPane();
}
if(this.percentFormat == null){
DecimalFormat defaultFormat = new CoreDecimalFormat(new DecimalFormat(), "#.##%");
DecimalFormat defaultFormat = new CoreDecimalFormat(new DecimalFormat("#.##%"), "#.##%");
percentFormatPane.populateBean(defaultFormat);
this.percentFormat = defaultFormat;
}

44
designer_form/.classpath

@ -1,15 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.6u35"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/lib"/>
<classpathentry combineaccessrules="false" kind="src" path="/base"/>
<classpathentry combineaccessrules="false" kind="src" path="/form"/>
<classpathentry combineaccessrules="false" kind="src" path="/designer_base"/>
<classpathentry combineaccessrules="false" kind="src" path="/base-stable"/>
<classpathentry combineaccessrules="false" kind="src" path="/base-basic"/>
<classpathentry kind="lib" path="/lib/3rd.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/base-calculate"/>
<classpathentry combineaccessrules="false" kind="src" path="/base-data"/>
<classpathentry kind="lib" path="D:/code/fr-chart-8.0.jar"/>
<classpathentry kind="lib" path="D:/code/fr-core-8.0.jar"/>
<classpathentry kind="lib" path="D:/code/fr-performance-8.0.jar"/>
<classpathentry kind="lib" path="D:/code/fr-platform-8.0.jar"/>
<classpathentry kind="lib" path="D:/code/fr-report-8.0.jar"/>
<classpathentry kind="lib" path="D:/code/fr-third-8.0.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/3rd.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/ant-junit.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/cglib-nodep-2.2.2.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/commons-codec-1.6.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/commons-logging-1.2.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/easymock-3.2.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/hamcrest-core-1.3.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jamm.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jna.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/jts-1.13.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/junit.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/junit-4.12.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/mysql-connector-java-5.1.6-bin.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/objenesis-2.1.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/ojdbc14.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/olap4j-1.1.0.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/olap4j-xmla-1.1.0.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/postgresql-8.0-311.jdbc3.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/quartz.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/sapjco.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/sapjco3.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/servlet-api.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/sqlite-jdbc.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/sqljdbc.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/swag.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/swexpl.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/swt.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/Sybelux.jar"/>
<classpathentry kind="lib" path="D:/code/finedesignlib/xercesImpl.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="bin"/>
</classpath>

10
designer_form/build.master.gradle

@ -47,6 +47,16 @@ def dataContent ={def dir ->
}
}
}
FileTree f1=fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/build/libs/*.jar")
f1.each{File file->
println "----------${file.path}"
}
FileTree f2=fileTree(dir:"../../../finereport-lib-stable/${branchName}",include:'**/*.jar')
f2.each{File file->
println "----------${file.path}"
}
//.java文件复制到classes文件夹下
task copyFile(type:Copy,dependsOn:compileJava){

93
designer_form/build.master.gradle.bak

@ -0,0 +1,93 @@
apply plugin: 'java'
tasks.withType(JavaCompile){
options.encoding = 'UTF-8'
}
//jdk版本
sourceCompatibility=1.7
//jar包版本
version='8.0'
def srcDir="."
//jar包的名字
jar{
baseName='fr-designer-report'
}
//
sourceSets{
main{
java{
srcDirs=["${srcDir}/src",
"${srcDir}/../designer/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'
}
}
}
FileTree f1=fileTree(dir:'../../../'include:"finereport-*-stable/${branchName}/build/libs/*.jar")
f1.each{File file->
println "----------${file.path}"
}
FileTree f2=fileTree(dir:"../../../finereport-lib-stable/${branchName}",include:'**/*.jar')
f2.each{File file->
println "----------${file.path}"
}
//.java文件复制到classes文件夹下
task copyFile(type:Copy,dependsOn:compileJava){
copy{
with dataContent.call("${srcDir}/src")
with dataContent.call("${srcDir}/../designer/src")
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')
}
fileset (dir:"${srcDir}/../designer/src"){
include (name:'**/*.js')
include (name:'**/*.css')
}
}
}
jar.dependsOn compressJS

13
designer_form/src/com/fr/design/designer/beans/adapters/layout/FRFitLayoutAdapter.java

@ -42,7 +42,16 @@ public class FRFitLayoutAdapter extends FRBodyLayoutAdapter {
public static final String WIDGETPANEICONPATH = "/com/fr/web/images/form/resources/layout_absolute.png";
private static final int DEPENDING_SCOPE = 3;
private HoverPainter painter;
//区分拖拽和编辑宽高
private boolean isEdit;
public boolean isEdit() {
return isEdit;
}
public void setEdit(boolean edit) {
isEdit = edit;
}
/**
* 构造函数
*
@ -411,6 +420,7 @@ public class FRFitLayoutAdapter extends FRBodyLayoutAdapter {
// 根据需要依附的位置调整拖拽的坐标值
private int adjustCoordinateByDependingLine(int coordinate, int[] coordinates) {
if(!isEdit) {
for (int i = 0; i < coordinates.length; i++) {
if (coordinate == coordinates[i]) {
continue;
@ -420,17 +430,20 @@ public class FRFitLayoutAdapter extends FRBodyLayoutAdapter {
break;
}
}
}
return coordinate;
}
// 根据需要依附的位置调整拖拽的距离
private int adjustDiffByDependingLine(int coordinate, int[] coordinates, int diff) {
if(!isEdit) {
for (int i = 0; i < coordinates.length; i++) {
if (coordinate + diff > coordinates[i] - DEPENDING_SCOPE && coordinate + diff < coordinates[i] + DEPENDING_SCOPE) {
diff = coordinates[i] - coordinate;
break;
}
}
}
return diff;
}

43
designer_form/src/com/fr/design/designer/properties/FRFitLayoutConstraints.java

@ -2,8 +2,6 @@ package com.fr.design.designer.properties;
import com.fr.design.designer.beans.AdapterBus;
import com.fr.design.designer.beans.adapters.layout.FRFitLayoutAdapter;
import com.fr.design.designer.creator.XCreatorUtils;
import com.fr.design.designer.creator.XLayoutContainer;
import com.fr.design.mainframe.FormDesigner;
import com.fr.design.mainframe.WidgetPropertyPane;
import com.fr.design.mainframe.widget.editors.IntegerPropertyEditor;
@ -12,8 +10,9 @@ import com.fr.design.designer.beans.ConstraintsGroupModel;
import com.fr.design.designer.creator.XCreator;
import com.fr.design.designer.creator.XWFitLayout;
import com.fr.design.utils.ComponentUtils;
import com.fr.form.ui.Widget;
import com.fr.form.ui.PaddingMargin;
import com.fr.form.ui.container.WFitLayout;
import com.fr.form.ui.container.WLayout;
import com.fr.general.Inter;
import javax.swing.*;
@ -30,8 +29,8 @@ import java.awt.*;
*/
//控件在自适应布局中宽度、高度属性,7.1.1不可编辑
public class FRFitLayoutConstraints implements ConstraintsGroupModel {
private static final int MINHEIGHT = XCreator.SMALL_PREFERRED_SIZE.height;
private static final int MINWIDTH = XCreator.SMALL_PREFERRED_SIZE.width;
private static final int MINHEIGHT = WLayout.MIN_HEIGHT;
private static final int MINWIDTH = WLayout.MIN_WIDTH;
private static final int ROWNUM = 2;
private DefaultTableCellRenderer renderer;
@ -48,7 +47,7 @@ public class FRFitLayoutConstraints implements ConstraintsGroupModel {
@Override
public String getGroupName() {
return Inter.getLocText("Widget-Size");
return Inter.getLocText("FR-Designer-Widget_Size");
}
@Override
@ -71,9 +70,9 @@ public class FRFitLayoutConstraints implements ConstraintsGroupModel {
if (column == 0) {
switch (row) {
case 0:
return Inter.getLocText("Tree-Width");
return Inter.getLocText("FR-Designer-Tree_Width");
default:
return Inter.getLocText("Tree-Height");
return Inter.getLocText("FR-Designer-Tree_Height");
}
} else {
switch (row) {
@ -91,36 +90,45 @@ public class FRFitLayoutConstraints implements ConstraintsGroupModel {
int v = value == null ? 0 : ((Number) value).intValue();
int difference = 0;
Rectangle bounds = getBounds();
Rectangle rec = ComponentUtils.getRelativeBounds(parent);
WFitLayout wFitLayout = parent.toData();
int minHeight = (int)(MINHEIGHT * wFitLayout.getResolutionScaling());
int minWidth = (int)(MINWIDTH * wFitLayout.getResolutionScaling());
PaddingMargin margin= wFitLayout.getMargin();
switch (row) {
case 0:
if(v < MINWIDTH){
JOptionPane.showMessageDialog(null, Inter.getLocText("Min-Width") + Integer.toString(MINWIDTH));
v = xCreator.getWidth();
}
if (bounds.width == v){
return false;
}
if(bounds.width == rec.width - margin.getLeft() - margin.getRight()){
JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Designer-Beyond_Bounds"));
}else if(v < minWidth){
JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Designer-Min_Width") + Integer.toString(minWidth));
v = xCreator.getWidth();
}
difference = bounds.width - v;
bounds.width = v;
break;
case 1:
if(v < MINHEIGHT){
JOptionPane.showMessageDialog(null, Inter.getLocText("Min-Height") + Integer.toString(MINHEIGHT));
v = xCreator.getHeight();
}
if (bounds.height == v){
return false;
}
if(bounds.height == rec.height - margin.getTop() - margin.getBottom()){
JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Designer-Beyond_Bounds"));
}else if(v < minHeight){
JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Designer-Min_Height") + Integer.toString(minHeight));
v = xCreator.getHeight();
}
difference = bounds.height - v;
bounds.height = v;
break;
}
WFitLayout wFitLayout = parent.toData();
wFitLayout.setBounds(xCreator.toData(),bounds);
FormDesigner formDesigner = WidgetPropertyPane.getInstance().getEditingFormDesigner();
Rectangle backupBounds = getBounds();
FRFitLayoutAdapter layoutAdapter = (FRFitLayoutAdapter) AdapterBus.searchLayoutAdapter(formDesigner, xCreator);
if (layoutAdapter != null) {
layoutAdapter.setEdit(true);
layoutAdapter.calculateBounds(backupBounds, bounds, xCreator, row, difference);
}
return true;
@ -131,7 +139,6 @@ public class FRFitLayoutConstraints implements ConstraintsGroupModel {
public Rectangle getBounds(){
Rectangle bounds = new Rectangle(xCreator.getBounds());
XLayoutContainer parent = XCreatorUtils.getParentXLayoutContainer(xCreator);
if (parent == null) {
return bounds;
}

1
designer_form/src/com/fr/design/mainframe/ComponentTree.java

@ -97,6 +97,7 @@ public class ComponentTree extends JTree {
scrollPathToVisible(treepath);
}
/**
* 刷新
*/

44
designer_form/src/com/fr/design/mainframe/WidgetPropertyPane.java

@ -10,18 +10,15 @@ import com.fr.design.designer.creator.XLayoutContainer;
import com.fr.design.designer.creator.XWParameterLayout;
import com.fr.design.designer.properties.EventPropertyTable;
import com.fr.design.designer.properties.WidgetPropertyTable;
import com.fr.design.designer.treeview.ComponentTreeModel;
import com.fr.design.fun.WidgetPropertyUIProvider;
import com.fr.design.gui.frpane.UITabbedPane;
import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itable.AbstractPropertyTable;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.parameter.ParameterPropertyPane;
import com.fr.general.Inter;
import com.fr.stable.ArrayUtils;
import javax.swing.*;
import javax.swing.border.LineBorder;
import java.awt.*;
@ -114,7 +111,6 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetProper
@Override
public void refreshDockingView() {
designer = this.getEditingFormDesigner();
removeAll();
if (designer == null) {
@ -132,7 +128,6 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetProper
eventTable.setBorder(null);
UIScrollPane esp = new UIScrollPane(eventTable);
esp.setBorder(null);
wsp = FRGUIPaneFactory.createBorderLayout_S_Pane();
wsp.setBorder(null);
mobileWidgetTable = new MobileWidgetTable(designer);
@ -144,7 +139,6 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetProper
centerPane.add(mobileBodyWidgetTable,BODY);
if(hasSelectParaPane(designer)){
cardLayout.show(centerPane,PARA);
} else {
cardLayout.show(centerPane,BODY);
}
@ -153,19 +147,23 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetProper
wsp.add(downPanel,BorderLayout.CENTER);
UITabbedPane tabbedPane = new UITabbedPane();
tabbedPane.setOpaque(true);
tabbedPane.setBorder(null);
tabbedPane.setTabPlacement(SwingConstants.BOTTOM);
tabbedPane.addTab(Inter.getLocText("Form-Properties"), psp);
tabbedPane.addTab(Inter.getLocText("Form-Events"), esp);
tabbedPane.addTab(Inter.getLocText("FR-Widget_Mobile_Terminal"), wsp);
initTabPane(psp, esp, tabbedPane);
WidgetPropertyUIProvider[] widgetAttrProviders = getExtraPropertyUIProviders();
addWidgetAttr(widgetAttrProviders);
add(tabbedPane, BorderLayout.CENTER);
propertyTable.initPropertyGroups(null);
eventTable.refresh();
for (AbstractPropertyTable propertyTable : widgetPropertyTables) {
propertyTable.initPropertyGroups(designer);
}
isrefresh = false;
}
private void addWidgetAttr(WidgetPropertyUIProvider[] widgetAttrProviders) {
if (widgetAttrProviders.length == 0) {
UILabel upLabel = new UILabel(Inter.getLocText("FR-Widget_Mobile_Table"),SwingConstants.CENTER);
UILabel upLabel = new UILabel(Inter.getLocText("FR-Widget_Mobile_Table"), SwingConstants.CENTER);
upLabel.setBorder(BorderFactory.createEmptyBorder(6,0,6,0));
wsp.add(upLabel,BorderLayout.NORTH);
wsp.add(upLabel, BorderLayout.NORTH);
} else {
for (WidgetPropertyUIProvider widgetAttrProvider : widgetAttrProviders) {
AbstractPropertyTable propertyTable = widgetAttrProvider.createWidgetAttrTable();
@ -177,13 +175,15 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetProper
}
}
add(tabbedPane, BorderLayout.CENTER);
propertyTable.initPropertyGroups(null);
eventTable.refresh();
for (AbstractPropertyTable propertyTable : widgetPropertyTables) {
propertyTable.initPropertyGroups(designer);
}
isrefresh = false;
private void initTabPane(UIScrollPane psp, UIScrollPane esp, UITabbedPane tabbedPane) {
tabbedPane.setOpaque(true);
tabbedPane.setBorder(null);
tabbedPane.setTabPlacement(SwingConstants.BOTTOM);
tabbedPane.addTab(Inter.getLocText("FR-Designer_Properties"), psp);
tabbedPane.addTab(Inter.getLocText("FR-Designer_Event"), esp);
tabbedPane.addTab(Inter.getLocText("FR-Widget_Mobile_Terminal"), wsp);
}
//

Loading…
Cancel
Save