From e5cc29c08bc5769163dccc07b230fb33e5a749cd Mon Sep 17 00:00:00 2001 From: RichieJi Date: Tue, 28 Nov 2017 10:56:04 +0800 Subject: [PATCH 01/10] =?UTF-8?q?=E5=88=A0=E9=99=A4=E4=B9=B1import?= =?UTF-8?q?=E7=9A=84=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/widget/component/BackgroundCompPane.java | 1 - 1 file changed, 1 deletion(-) diff --git a/designer_base/src/com/fr/design/widget/component/BackgroundCompPane.java b/designer_base/src/com/fr/design/widget/component/BackgroundCompPane.java index e534521706..fa0f4a6f9b 100644 --- a/designer_base/src/com/fr/design/widget/component/BackgroundCompPane.java +++ b/designer_base/src/com/fr/design/widget/component/BackgroundCompPane.java @@ -10,7 +10,6 @@ import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.widget.accessibles.AccessibleImgBackgroundEditor; import com.fr.form.ui.Widget; import com.fr.general.Inter; -import com.vividsolutions.jts.index.bintree.Interval; import javax.swing.*; import java.awt.*; From 12ea9878003437dce76d655f4671eb8564746928 Mon Sep 17 00:00:00 2001 From: RichieJi Date: Tue, 28 Nov 2017 11:00:51 +0800 Subject: [PATCH 02/10] =?UTF-8?q?=E5=88=A0=E9=99=A4=E7=94=A8=E7=9A=84?= =?UTF-8?q?=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/bbs/BBSBrowserDialog.java | 93 ------------------- 1 file changed, 93 deletions(-) delete mode 100644 designer/src/com/fr/design/mainframe/bbs/BBSBrowserDialog.java diff --git a/designer/src/com/fr/design/mainframe/bbs/BBSBrowserDialog.java b/designer/src/com/fr/design/mainframe/bbs/BBSBrowserDialog.java deleted file mode 100644 index 718e4d24d0..0000000000 --- a/designer/src/com/fr/design/mainframe/bbs/BBSBrowserDialog.java +++ /dev/null @@ -1,93 +0,0 @@ -package com.fr.design.mainframe.bbs; - -import java.awt.BorderLayout; -import java.awt.Canvas; -import java.awt.Frame; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.awt.SWT_AWT; -import org.eclipse.swt.browser.Browser; -import org.eclipse.swt.layout.FillLayout; -import org.eclipse.swt.widgets.Display; -import org.eclipse.swt.widgets.Shell; - -import com.fr.design.dialog.UIDialog; -import com.fr.design.utils.gui.GUICoreUtils; -import com.fr.general.Inter; - -/** - * 封装浏览器的dialog - * - */ -public class BBSBrowserDialog extends UIDialog { - - private static final int WIDTH = 600; - private static final int HEIGHT = 400; - - private DisplayThread displayThread; - private Canvas canvas; - private String url; - - public BBSBrowserDialog(Frame parent) { - super(parent); - - this.displayThread = new DisplayThread(); - this.displayThread.start(); - this.canvas = new Canvas(); - setLayout(new BorderLayout()); - add(canvas, BorderLayout.CENTER); - - this.setSize(WIDTH, HEIGHT); - GUICoreUtils.centerWindow(this); - } - - @Override - public String getTitle() { - return Inter.getLocText("FR-Designer_Forum"); - } - - /** - * 通知组件可以显示了 - * - */ - public void addNotify() { - super.addNotify(); - Display dis = displayThread.getDisplay(); - dis.syncExec(new Runnable() { - - public void run() { - Shell shell = SWT_AWT.new_Shell(displayThread.getDisplay(), canvas); - shell.setLayout(new FillLayout()); - final Browser browser = new Browser(shell, SWT.NONE); - browser.setLayoutData(BorderLayout.CENTER); - browser.setUrl(url); - } - }); - } - - public String getUrl() { - return url; - } - - public void setUrl(String url) { - this.url = url; - } - - /** - * 检测面板中内容合法性 - * - */ - public void checkValid() throws Exception { - } - - /** - * 在窗口中显示指定的url - * - * @param url 指定的url - * - */ - public void showWindow(String url){ - this.setUrl(url); - this.setVisible(true); - } -} \ No newline at end of file From 7077d7b2f7e2ef427ac9e6c4419f9c907dacd055 Mon Sep 17 00:00:00 2001 From: RichieJi Date: Tue, 28 Nov 2017 11:41:06 +0800 Subject: [PATCH 03/10] =?UTF-8?q?=E5=88=A0=E9=99=A4=E7=94=A8=E7=9A=84?= =?UTF-8?q?=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/mainframe/bbs/DisplayThread.java | 46 ------------------- 1 file changed, 46 deletions(-) delete mode 100644 designer/src/com/fr/design/mainframe/bbs/DisplayThread.java diff --git a/designer/src/com/fr/design/mainframe/bbs/DisplayThread.java b/designer/src/com/fr/design/mainframe/bbs/DisplayThread.java deleted file mode 100644 index c3b3ce6551..0000000000 --- a/designer/src/com/fr/design/mainframe/bbs/DisplayThread.java +++ /dev/null @@ -1,46 +0,0 @@ -package com.fr.design.mainframe.bbs; - -import org.eclipse.swt.widgets.Display; - -public class DisplayThread extends Thread { - - private Display display; - Object sem = new Object(); - - /** - * 运行 - * - */ - public void run() { - synchronized (sem) { - display = Display.getDefault(); - sem.notifyAll(); - } - swtEventLoop(); - } - - private void swtEventLoop() { - while (true) { - try{ - if (!display.readAndDispatch()) { - display.sleep(); - } - }catch (Exception e) { - continue; - } - } - } - - public Display getDisplay() { - try { - synchronized (sem) { - while (display == null) { - sem.wait(); - } - return display; - } - } catch (Exception e) { - return null; - } - } -} \ No newline at end of file From 7f83fa4a01329d396eb43459fe9e2b7a40b65f2c Mon Sep 17 00:00:00 2001 From: MoMeak Date: Tue, 5 Dec 2017 14:37:49 +0800 Subject: [PATCH 04/10] =?UTF-8?q?REPORT-5955=20[Report]=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E6=82=AC=E6=B5=AE=E5=85=83=E7=B4=A0=E5=90=8E=EF=BC=8C=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E5=99=A8=E5=8D=A1=E6=AD=BB=20=E4=B9=8B=E5=89=8Dwu?= =?UTF-8?q?=E5=81=9A=E4=BA=86=E9=87=8A=E6=94=BE=E5=86=85=E5=AD=98=EF=BC=8C?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=82=AC=E6=B5=AE=E5=85=83=E7=B4=A0=E4=BC=9A?= =?UTF-8?q?=E6=8A=A5nep=EF=BC=9B=E5=88=A0=E9=99=A4=E6=82=AC=E6=B5=AE?= =?UTF-8?q?=E5=85=83=E7=B4=A0=E9=80=BB=E8=BE=91=E6=94=B9=E4=B8=BA=E5=85=88?= =?UTF-8?q?setSelection=20=E5=86=8D=20remove?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer/src/com/fr/grid/selection/FloatSelection.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer/src/com/fr/grid/selection/FloatSelection.java b/designer/src/com/fr/grid/selection/FloatSelection.java index 534312a0a3..60fe54b7cb 100644 --- a/designer/src/com/fr/grid/selection/FloatSelection.java +++ b/designer/src/com/fr/grid/selection/FloatSelection.java @@ -148,8 +148,8 @@ public class FloatSelection extends Selection { TemplateElementCase ec = ePane.getEditingElementCase(); FloatElement fe = ec.getFloatElement(selectedFloatName); if (fe != null) { - ec.removeFloatElement(fe); ePane.setSelection(new CellSelection(0, 0, 1, 1)); + ec.removeFloatElement(fe); return true; } From 1ab541f0a62735f5f531b17f6c85f6095166ee4b Mon Sep 17 00:00:00 2001 From: RichieJi Date: Wed, 13 Dec 2017 14:26:08 +0800 Subject: [PATCH 05/10] =?UTF-8?q?=20=E5=88=87=E6=8D=A2=E7=9A=84=E4=B8=80?= =?UTF-8?q?=E4=B8=AAbUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/quickeditor/cellquick/CellFormulaQuickEditor.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/designer/src/com/fr/quickeditor/cellquick/CellFormulaQuickEditor.java b/designer/src/com/fr/quickeditor/cellquick/CellFormulaQuickEditor.java index 96f92d58b5..246f7599c0 100644 --- a/designer/src/com/fr/quickeditor/cellquick/CellFormulaQuickEditor.java +++ b/designer/src/com/fr/quickeditor/cellquick/CellFormulaQuickEditor.java @@ -46,6 +46,7 @@ import java.awt.event.KeyEvent; public class CellFormulaQuickEditor extends CellQuickEditor { //文本域 private UITextField formulaTextField; + private BaseFormula formula; //编辑状态 private boolean isEditing = false; @@ -104,11 +105,15 @@ public class CellFormulaQuickEditor extends CellQuickEditor { public void actionPerformed(ActionEvent evt) { String text = formulaTextField.getText(); final UIFormula formulaPane = FormulaFactory.createFormulaPane(); - formulaPane.populate(BaseFormula.createFormulaBuilder().build(text)); + if (formula != null) { + formula.setContent(text); + } + formulaPane.populate(formula); formulaPane.showLargeWindow(DesignerContext.getDesignerFrame(), new DialogActionAdapter() { @Override public void doOk() { BaseFormula fm = formulaPane.update(); + formula = fm; if (fm.getContent().length() <= 1) { formulaTextField.setText(DEFAULT_FORMULA); } else { @@ -181,7 +186,7 @@ public class CellFormulaQuickEditor extends CellQuickEditor { if (value == null) { str = StringUtils.EMPTY; } else if (value instanceof BaseFormula) { - BaseFormula formula = (BaseFormula) value; + formula = (BaseFormula) value; str = formula.getContent(); reserveInResult = formula.isReserveInResult(); reserveOnWriteOrAnaly = formula.isReserveOnWriteOrAnaly(); From e4451a865a930cec2e9e034e5c3a3a43dc92d02b Mon Sep 17 00:00:00 2001 From: RichieJi Date: Thu, 14 Dec 2017 09:54:02 +0800 Subject: [PATCH 06/10] =?UTF-8?q?=E4=B8=80=E7=82=B9=E5=B0=8F=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer/src/com/fr/grid/GridUI.java | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/designer/src/com/fr/grid/GridUI.java b/designer/src/com/fr/grid/GridUI.java index 2215fc2b79..9a972db7b1 100644 --- a/designer/src/com/fr/grid/GridUI.java +++ b/designer/src/com/fr/grid/GridUI.java @@ -779,17 +779,10 @@ public class GridUI extends ComponentUI { private void paintGridSelectionForFormula(Graphics2D g2d, ElementCase report, CellSelection cs) { // denny: 标记公式用到的单元格 - if (report.getCellValue(cs.getColumn(), cs.getRow()) instanceof BaseFormula) { - BaseFormula tmpFormula = (BaseFormula) report - .getCellValue(cs.getColumn(), cs.getRow()); - String statement = tmpFormula.getContent(); - // denny: 获得公式中包含的所有单元格 - ColumnRow[] columnRowArray = new ColumnRow[0]; - try { - columnRowArray = CalculatorUtils.relatedColumnRowArray(statement.substring(1)); - } catch (ANTLRException ae) { - // do nothing. - } + Object cellValue = report.getCellValue(cs.getColumn(), cs.getRow()); + if (cellValue instanceof BaseFormula) { + BaseFormula tmpFormula = (BaseFormula) cellValue; + ColumnRow[] columnRowArray = tmpFormula.getRelatedColumnRows(); Area formulaCellArea = null; for (int i = 0; i < columnRowArray.length; i++) { ColumnRow columnRow = columnRowArray[i]; From 897835c92dde79cc7eb1bd57e608db2466043f78 Mon Sep 17 00:00:00 2001 From: mengao <283296419@qq.com> Date: Tue, 19 Dec 2017 09:26:46 +0800 Subject: [PATCH 07/10] =?UTF-8?q?CHART-1882=20=20=20=E5=A0=86=E7=A7=AF?= =?UTF-8?q?=E5=92=8C=E5=9D=90=E6=A0=87=E8=BD=B4=E7=95=8C=E9=9D=A2bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../column/VanChartCustomStackAndAxisConditionPane.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/designer_chart/src/com/fr/plugin/chart/column/VanChartCustomStackAndAxisConditionPane.java b/designer_chart/src/com/fr/plugin/chart/column/VanChartCustomStackAndAxisConditionPane.java index 708d4f4a33..3824cc2473 100644 --- a/designer_chart/src/com/fr/plugin/chart/column/VanChartCustomStackAndAxisConditionPane.java +++ b/designer_chart/src/com/fr/plugin/chart/column/VanChartCustomStackAndAxisConditionPane.java @@ -95,8 +95,10 @@ public class VanChartCustomStackAndAxisConditionPane extends BasicBeanPane(seriesStackAndAxis.getXAxisNamesArray()); - YAxis = new UIButtonGroup(seriesStackAndAxis.getYAxisNameArray()); + if (XAxis == null || YAxis == null) { + XAxis = new UIButtonGroup(seriesStackAndAxis.getXAxisNamesArray()); + YAxis = new UIButtonGroup(seriesStackAndAxis.getYAxisNameArray()); + } doLayoutPane(); XAxis.setSelectedIndex(seriesStackAndAxis.getXAxisIndex()); From 485143457fef871b8d73d43ae5b030e205de5377 Mon Sep 17 00:00:00 2001 From: mengao <283296419@qq.com> Date: Tue, 19 Dec 2017 17:10:13 +0800 Subject: [PATCH 08/10] =?UTF-8?q?CHART-1882=20=20=20=E5=A0=86=E7=A7=AF?= =?UTF-8?q?=E5=92=8C=E5=9D=90=E6=A0=87=E8=BD=B4=E7=95=8C=E9=9D=A2bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../VanChartCustomStackAndAxisConditionPane.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/designer_chart/src/com/fr/plugin/chart/column/VanChartCustomStackAndAxisConditionPane.java b/designer_chart/src/com/fr/plugin/chart/column/VanChartCustomStackAndAxisConditionPane.java index 3824cc2473..5bdd0829d8 100644 --- a/designer_chart/src/com/fr/plugin/chart/column/VanChartCustomStackAndAxisConditionPane.java +++ b/designer_chart/src/com/fr/plugin/chart/column/VanChartCustomStackAndAxisConditionPane.java @@ -31,6 +31,8 @@ public class VanChartCustomStackAndAxisConditionPane extends BasicBeanPane isStacked; protected UIButtonGroup isPercentStacked; + private ConditionAttr conditionAttr; + private LiteConditionPane liteConditionPane; public VanChartCustomStackAndAxisConditionPane() { @@ -94,11 +96,10 @@ public class VanChartCustomStackAndAxisConditionPane extends BasicBeanPane(seriesStackAndAxis.getXAxisNamesArray()); - YAxis = new UIButtonGroup(seriesStackAndAxis.getYAxisNameArray()); - } + XAxis = new UIButtonGroup(seriesStackAndAxis.getXAxisNamesArray()); + YAxis = new UIButtonGroup(seriesStackAndAxis.getYAxisNameArray()); doLayoutPane(); XAxis.setSelectedIndex(seriesStackAndAxis.getXAxisIndex()); @@ -125,7 +126,6 @@ public class VanChartCustomStackAndAxisConditionPane extends BasicBeanPane Date: Tue, 19 Dec 2017 18:25:59 +0800 Subject: [PATCH 09/10] =?UTF-8?q?CHART-1882=20=20=20=E5=A0=86=E7=A7=AF?= =?UTF-8?q?=E5=92=8C=E5=9D=90=E6=A0=87=E8=BD=B4=E7=95=8C=E9=9D=A2bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chart/column/VanChartCustomStackAndAxisConditionPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_chart/src/com/fr/plugin/chart/column/VanChartCustomStackAndAxisConditionPane.java b/designer_chart/src/com/fr/plugin/chart/column/VanChartCustomStackAndAxisConditionPane.java index 5bdd0829d8..7f5429294e 100644 --- a/designer_chart/src/com/fr/plugin/chart/column/VanChartCustomStackAndAxisConditionPane.java +++ b/designer_chart/src/com/fr/plugin/chart/column/VanChartCustomStackAndAxisConditionPane.java @@ -126,7 +126,7 @@ public class VanChartCustomStackAndAxisConditionPane extends BasicBeanPane Date: Mon, 8 Jan 2018 15:17:52 +0800 Subject: [PATCH 10/10] =?UTF-8?q?REPORT-6474=20bbs=E7=99=BB=E9=99=86?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/bbs/BBSLoginUtils.java | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/designer_base/src/com/fr/design/bbs/BBSLoginUtils.java b/designer_base/src/com/fr/design/bbs/BBSLoginUtils.java index 51d236e9c7..e57f8494fc 100644 --- a/designer_base/src/com/fr/design/bbs/BBSLoginUtils.java +++ b/designer_base/src/com/fr/design/bbs/BBSLoginUtils.java @@ -2,6 +2,8 @@ package com.fr.design.bbs; import com.fr.base.ConfigManager; import com.fr.base.FRContext; +import com.fr.base.entity.BBSAttr; +import com.fr.base.entity.LoginTypeKey; import com.fr.stable.StringUtils; import java.util.List; @@ -13,8 +15,10 @@ public class BBSLoginUtils { public static void bbsLogin(String username, String password){ try{ - ConfigManager.getProviderInstance().setBbsUsername(username); - ConfigManager.getProviderInstance().setBbsPassword(password); + BBSAttr bbsAttr = new BBSAttr(); + bbsAttr.setBbsUsername(username); + bbsAttr.setBbsPassword(password); + ConfigManager.getProviderInstance().setAttribute(LoginTypeKey.LOGIN_TYPE_BBS, bbsAttr); FRContext.getCurrentEnv().writeResource(ConfigManager.getProviderInstance()); }catch (Exception e){ FRContext.getLogger().error(e.getMessage()); @@ -22,16 +26,14 @@ public class BBSLoginUtils { } public static void bbsLogin(List list){ - try{ + try { String uid = list.get(0); String username = list.get(1); String password = list.get(2); - ConfigManager.getProviderInstance().setBbsUsername(username); - ConfigManager.getProviderInstance().setBbsPassword(password); - ConfigManager.getProviderInstance().setBbsUid(Integer.parseInt(uid)); - ConfigManager.getProviderInstance().setInShowBBsName(username); + BBSAttr bbsAttr = new BBSAttr(username, password, Integer.parseInt(uid), username); + ConfigManager.getProviderInstance().setAttribute(LoginTypeKey.LOGIN_TYPE_BBS, bbsAttr); FRContext.getCurrentEnv().writeResource(ConfigManager.getProviderInstance()); - }catch (Exception e){ + } catch (Exception e) { FRContext.getLogger().error(e.getMessage()); } }