Browse Source

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

* commit '2124e5f7abbe112aac4844b9b74ef15e9e940f07':
  CQ-9 没有装插件的设计打开带有插件控件的表单时,需要能正确的打开并提示
  【国际化修改】修改了一处翻译。。。。
  无JIRA任务, dev国际化->release
  【国际化修改】 根据代理商意见修改翻译 syoki
  超链悬浮窗图表,点击确定无效,报null错误
  【国际化修改】 修改几处翻译问题
  BI-5822 调整接口,使用标准的状态码返回给移动端
  更改lib依赖
  【国际化修改】 根据代理商的意见修改design部分的翻译 庄奇20170606
  去掉部分代码
  无JIRA任务, 论坛消息屏蔽
master
superman 7 years ago
parent
commit
1cb91330c9
  1. 34
      designer/src/com/fr/design/mainframe/bbs/UserInfoLabel.java
  2. 2
      designer_base/build.release.gradle
  3. 38
      designer_base/src/com/fr/design/extra/LoginWebBridge.java
  4. 1200
      designer_base/src/com/fr/design/locale/designer_ja_JP.properties
  5. 1
      designer_base/src/com/fr/design/module/DesignModuleFactory.java
  6. 2
      designer_chart/build.release.gradle
  7. 3
      designer_chart/src/com/fr/design/mainframe/MiddleChartPropertyPane.java
  8. 2
      designer_form/build.release.gradle
  9. 28
      designer_form/src/com/fr/design/designer/creator/ErrorCreator.java
  10. 6
      designer_form/src/com/fr/design/designer/creator/NullCreator.java
  11. 3
      designer_form/src/com/fr/design/designer/creator/XCreatorUtils.java

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

@ -30,7 +30,6 @@ import java.net.URI;
import java.net.URLEncoder;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
/**
* @author neil
@ -191,44 +190,11 @@ public class UserInfoLabel extends UILabel {
return;
}
if (StringUtils.isEmpty(this.userName)) {
updateMessageCount();
}
//往designerenvmanger里写一下
DesignerEnvManager.getEnvManager().setBBSName(userName);
this.userName = userName;
}
private void updateMessageCount() {
//启动获取消息更新的线程
//登陆状态, 根据存起来的用户名密码, 每1分钟发起一次请求, 更新消息条数.
Thread updateMessageThread = new Thread(new Runnable() {
@Override
public void run() {
sleep(CHECK_MESSAGE_TIME);
//从env中获取username, 因为如果注销的话, env的里username会被清空.
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()) {
try {
String res = getMessage.getResponseText();
if (StringUtils.isNotEmpty(res)) {
setMessageCount(Integer.parseInt(res));
}
} catch (Exception e) {
}
}
sleep(CHECK_MESSAGE_TIME);
}
}
});
updateMessageThread.start();
}
private String encode(String str) {
try {
return URLEncoder.encode(str, EncodeConstants.ENCODING_UTF_8);

2
designer_base/build.release.gradle

@ -53,7 +53,7 @@ def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1)
//
dependencies{
compile fileTree(dir:'../../../finereport-lib-stable/master',include:'**/*.jar')
compile fileTree(dir:"../../../finereport-lib-stable/${branchName}",include:'**/*.jar')
compile fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/**/build/libs/*.jar")
testCompile 'junit:junit:4.12'

38
designer_base/src/com/fr/design/extra/LoginWebBridge.java

@ -6,10 +6,8 @@ import com.fr.design.dialog.UIDialog;
import com.fr.design.extra.ucenter.Client;
import com.fr.design.extra.ucenter.XMLHelper;
import com.fr.design.gui.ilable.UILabel;
import com.fr.general.ComparatorUtils;
import com.fr.general.SiteCenter;
import com.fr.general.http.HttpClient;
import com.fr.json.JSONObject;
import com.fr.stable.EncodeConstants;
import com.fr.stable.StringUtils;
import javafx.scene.web.WebEngine;
@ -19,7 +17,6 @@ import java.awt.*;
import java.io.UnsupportedEncodingException;
import java.net.URI;
import java.net.URLEncoder;
import java.util.HashMap;
import java.util.LinkedList;
public class LoginWebBridge {
@ -122,41 +119,6 @@ public class LoginWebBridge {
return client.isServerAlive();
}
/**
* 定时取后台论坛消息
*/
public void updateMessageCount() {
//启动获取消息更新的线程
//登陆状态, 根据存起来的用户名密码, 每1分钟发起一次请求, 更新消息条数.
Thread updateMessageThread = new Thread(new Runnable() {
@Override
public void run() {
sleep(CHECK_MESSAGE_TIME);
while (StringUtils.isNotEmpty(DesignerEnvManager.getEnvManager().getBBSName())) {
HashMap<String, String> para = new HashMap<>();
int uid = DesignerEnvManager.getEnvManager().getBbsUid();
para.put("uid", String.valueOf(uid));
HttpClient getMessage = new HttpClient(SiteCenter.getInstance().acquireUrlByKind("bbs.message"), para);
getMessage.asGet();
if (getMessage.isServerAlive()) {
try {
String res = getMessage.getResponseText();
if (!ComparatorUtils.equals(res, FAILED_MESSAGE_STATUS)) {
JSONObject jo = new JSONObject(res);
if (SUCCESS_MESSAGE_STATUS.equals(jo.optString("status"))) {
setMessageCount(Integer.parseInt(jo.getString("message")));
}
}
} catch (Exception ignore) {
}
}
sleep(CHECK_MESSAGE_TIME);
}
}
});
updateMessageThread.start();
}
/**
* 设置获取的消息长度并设置显示
*

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

File diff suppressed because it is too large Load Diff

1
designer_base/src/com/fr/design/module/DesignModuleFactory.java

@ -2,7 +2,6 @@ package com.fr.design.module;
import com.fr.base.FRContext;
import com.fr.base.chart.BaseChartCollection;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.gui.chart.BaseChartPropertyPane;
import com.fr.design.gui.chart.MiddleChartComponent;
import com.fr.design.gui.chart.MiddleChartDialog;

2
designer_chart/build.release.gradle

@ -48,7 +48,7 @@ def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1)
//
dependencies{
compile fileTree(dir:'../../../finereport-lib-stable/master',include:'**/*.jar')
compile fileTree(dir:"../../../finereport-lib-stable/${branchName}",include:'**/*.jar')
compile fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/**/build/libs/*.jar")
testCompile 'junit:junit:4.12'

3
designer_chart/src/com/fr/design/mainframe/MiddleChartPropertyPane.java

@ -15,6 +15,7 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itabpane.TitleChangeListener;
import com.fr.design.mainframe.chart.ChartEditPane;
import com.fr.general.Inter;
import com.fr.stable.StableUtils;
import javax.swing.*;
import java.awt.*;
@ -36,6 +37,8 @@ public abstract class MiddleChartPropertyPane extends BaseChartPropertyPane{
createNameLabel();
this.add(createNorthComponent(), BorderLayout.NORTH);
chartEditPane = StableUtils.construct(ChartEditPane.class);
chartEditPane.setSupportCellData(true);
}
public void addChartEditPane(String plotID){

2
designer_form/build.release.gradle

@ -49,7 +49,7 @@ buildDir=buildDir.substring(0,buildDir.lastIndexOf ('\\'))
def branchName=buildDir.substring(buildDir.lastIndexOf ('\\')+1)
//
dependencies{
compile fileTree(dir:'../../../finereport-lib-stable/master',include:'**/*.jar')
compile fileTree(dir:"../../../finereport-lib-stable/${branchName}",include:'**/*.jar')
compile fileTree(dir:'../../../',include:"finereport-*-stable/${branchName}/**/build/libs/*.jar")
testCompile 'junit:junit:4.12'

28
designer_form/src/com/fr/design/designer/creator/ErrorCreator.java

@ -0,0 +1,28 @@
package com.fr.design.designer.creator;
import com.fr.form.ui.ErrorMarker;
import com.fr.form.ui.Widget;
import com.fr.stable.StringUtils;
import java.awt.*;
/**
* Created by richie on 2017/6/28.
*/
public class ErrorCreator extends NullCreator {
public ErrorCreator(Widget widget, Dimension initSize) {
super(widget, initSize);
}
@Override
protected String showText() {
ErrorMarker marker = (ErrorMarker)toData();
String text = marker.getWidgetValue().getDisplayValue();
if (StringUtils.isEmpty(text)) {
return super.showText();
}
return text;
}
}

6
designer_form/src/com/fr/design/designer/creator/NullCreator.java

@ -23,11 +23,15 @@ public class NullCreator extends XWidgetCreator {
@Override
protected JComponent initEditor() {
UILabel l = new UILabel("UNEXPECTED WIDGET");
UILabel l = new UILabel(showText());
l.setForeground(Color.red);
l.setVerticalAlignment(SwingConstants.CENTER);
l.setHorizontalAlignment(SwingConstants.CENTER);
setBorder(DEFALUTBORDER);
return editor = l;
}
protected String showText() {
return "UNEXPECTED WIDGET";
}
}

3
designer_form/src/com/fr/design/designer/creator/XCreatorUtils.java

@ -73,6 +73,9 @@ public class XCreatorUtils {
objectMap.put(NameWidget.class, XNameWidget.class);
objectMap.put(CardSwitchButton.class, XCardSwitchButton.class);
objectMap.put(CardAddButton.class, XCardAddButton.class);
objectMap.put(ErrorMarker.class, ErrorCreator.class);
putExtraEditor();
xLayoutMap.put(WAbsoluteLayout.class, XWAbsoluteLayout.class);

Loading…
Cancel
Save