Browse Source

Merging in latest from upstream (BA/design:refs/heads/dev)

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

8
designer/src/com/fr/design/mainframe/templateinfo/JWorkBookProcessInfo.java

@ -2,6 +2,7 @@ package com.fr.design.mainframe.templateinfo;
import com.fr.base.parameter.ParameterUI;
import com.fr.main.impl.WorkBook;
import com.fr.main.parameter.ReportParameterAttr;
import com.fr.report.cellcase.CellCase;
import com.fr.report.poly.PolyWorkSheet;
import com.fr.report.worksheet.WorkSheet;
@ -68,7 +69,12 @@ public class JWorkBookProcessInfo extends TemplateProcessInfo<WorkBook> {
}
// 获取模板控件数
public int getWidgetCount() {
ParameterUI pui = template.getReportParameterAttr().getParameterUI();
ReportParameterAttr attr = template.getReportParameterAttr();
if (attr == null) {
return 0;
}
ParameterUI pui = attr.getParameterUI();
return pui == null ? 0 : (pui.getAllWidgets().length - 1);
}
}

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();
}
/**
* 设置获取的消息长度并设置显示
*

3
designer_base/src/com/fr/design/fun/impl/AbstractDsinFrameUpButtonProvider.java

@ -2,6 +2,7 @@ package com.fr.design.fun.impl;
import com.fr.design.fun.DesignerFrameUpButtonProvider;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.stable.fun.impl.AbstractProvider;
import com.fr.stable.fun.mark.API;
/**
@ -10,7 +11,7 @@ import com.fr.stable.fun.mark.API;
* Time: 15:50
*/
@API(level = DesignerFrameUpButtonProvider.CURRENT_LEVEL)
public abstract class AbstractDsinFrameUpButtonProvider implements DesignerFrameUpButtonProvider {
public abstract class AbstractDsinFrameUpButtonProvider extends AbstractProvider implements DesignerFrameUpButtonProvider {
@Override
public UIButton[] getUpButtons(int menuState) {
return new UIButton[0];

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

File diff suppressed because it is too large Load Diff

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);

7
designer_form/src/com/fr/design/mainframe/JForm.java

@ -468,18 +468,21 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm {
@Override
protected void applyUndoState(FormUndoState u) {
try {
if (this.index == FORM_TAB) {
//JForm的target重置
this.setTarget((Form) u.getForm().clone());
if (this.index == FORM_TAB) {
JForm.this.refreshRoot();
this.formDesign.getArea().setAreaSize(u.getAreaSize(), u.getHorizontalValue(), u.getVerticalValue(), u.getWidthValue(), u.getHeightValue(), u.getSlideValue());
//撤销的时候要重新选择的body布局
this.formDesign.getSelectionModel().setSelectedCreators(FormSelectionUtils.rebuildSelection(formDesign.getRootComponent(),
formDesign.getRootComponent() == selectedBodyLayout() ? u.getSelectWidgets() : new Widget[]{selectedBodyLayout().toData()}));
} else {
// 只在报表块里撤销是不需要修改外部form对象的, 因为编辑的是当前报表块.
// 修改了JForm的Target需要同步修改formDesign的Target.
Form undoForm = (Form) u.getForm().clone();
String widgetName = this.formDesign.getElementCaseContainerName();
//这儿太坑了,u.getForm() 与 getTarget内容不一样
FormElementCaseProvider dataTable = getTarget().getElementCaseByName(widgetName);
FormElementCaseProvider dataTable = undoForm.getElementCaseByName(widgetName);
this.reportComposite.setSelectedWidget(dataTable);
//下面这句话是防止撤销之后直接退出编辑再编辑撤销的东西会回来,因为撤销不会保存EC
formDesign.setElementCase(dataTable);

Loading…
Cancel
Save