Browse Source

代码质量

master
fr_shine 8 years ago
parent
commit
c931aec038
  1. 14
      designer_base/src/com/fr/design/formula/TinyFormulaPane.java
  2. 4
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/AbstractReportDataContentPane.java
  3. 5
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/CategoryPlotReportDataContentPane.java

14
designer_base/src/com/fr/design/formula/TinyFormulaPane.java

@ -56,11 +56,7 @@ public class TinyFormulaPane extends BasicBeanPane<String> implements UIObserver
@Override @Override
public void doOk() { public void doOk() {
Formula fm = formulaPane.update(); Formula fm = formulaPane.update();
if (dealEmpty() && fm.getContent().length() <= 1) { populateTextField(fm);
formulaTextField.setText("$$$");
} else {
formulaTextField.setText(fm.getContent());
}
okEvent(); okEvent();
} }
}).setVisible(true); }).setVisible(true);
@ -69,8 +65,12 @@ public class TinyFormulaPane extends BasicBeanPane<String> implements UIObserver
initLayout(); initLayout();
} }
protected boolean dealEmpty() { protected void populateTextField(Formula fm) {
return true; if (fm.getContent().length() <= 1) {
formulaTextField.setText("$$$");
} else {
formulaTextField.setText(fm.getContent());
}
} }
protected void initLayout() { protected void initLayout() {

4
designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/AbstractReportDataContentPane.java

@ -157,8 +157,8 @@ public abstract class AbstractReportDataContentPane extends BasicBeanPane<ChartC
} }
@Override @Override
protected boolean dealEmpty() { protected void populateTextField(Formula fm) {
return false; formulaTextField.setText(fm.getContent());
} }
}; };
editorComponent.setBackground(UIConstants.FLESH_BLUE); editorComponent.setBackground(UIConstants.FLESH_BLUE);

5
designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/CategoryPlotReportDataContentPane.java

@ -1,5 +1,6 @@
package com.fr.design.mainframe.chart.gui.data.report; package com.fr.design.mainframe.chart.gui.data.report;
import com.fr.base.Formula;
import com.fr.base.chart.chartdata.TopDefinitionProvider; import com.fr.base.chart.chartdata.TopDefinitionProvider;
import com.fr.chart.chartattr.Bar2DPlot; import com.fr.chart.chartattr.Bar2DPlot;
import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.ChartCollection;
@ -57,8 +58,8 @@ public class CategoryPlotReportDataContentPane extends AbstractReportDataContent
} }
@Override @Override
protected boolean dealEmpty() { protected void populateTextField(Formula fm) {
return false; formulaTextField.setText(fm.getContent());
} }
public void okEvent() { public void okEvent() {

Loading…
Cancel
Save