From c931aec0386fab64d572eb9b805e6352f3702b95 Mon Sep 17 00:00:00 2001 From: fr_shine Date: Mon, 21 Nov 2016 16:36:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B4=A8=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/formula/TinyFormulaPane.java | 14 +++++++------- .../data/report/AbstractReportDataContentPane.java | 4 ++-- .../report/CategoryPlotReportDataContentPane.java | 5 +++-- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/designer_base/src/com/fr/design/formula/TinyFormulaPane.java b/designer_base/src/com/fr/design/formula/TinyFormulaPane.java index da60d4f23..649d5face 100644 --- a/designer_base/src/com/fr/design/formula/TinyFormulaPane.java +++ b/designer_base/src/com/fr/design/formula/TinyFormulaPane.java @@ -56,11 +56,7 @@ public class TinyFormulaPane extends BasicBeanPane implements UIObserver @Override public void doOk() { Formula fm = formulaPane.update(); - if (dealEmpty() && fm.getContent().length() <= 1) { - formulaTextField.setText("$$$"); - } else { - formulaTextField.setText(fm.getContent()); - } + populateTextField(fm); okEvent(); } }).setVisible(true); @@ -69,8 +65,12 @@ public class TinyFormulaPane extends BasicBeanPane implements UIObserver initLayout(); } - protected boolean dealEmpty() { - return true; + protected void populateTextField(Formula fm) { + if (fm.getContent().length() <= 1) { + formulaTextField.setText("$$$"); + } else { + formulaTextField.setText(fm.getContent()); + } } protected void initLayout() { diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/AbstractReportDataContentPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/AbstractReportDataContentPane.java index dd24b450c..4ff643522 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/AbstractReportDataContentPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/AbstractReportDataContentPane.java @@ -157,8 +157,8 @@ public abstract class AbstractReportDataContentPane extends BasicBeanPane