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
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<String> 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() {

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
protected boolean dealEmpty() {
return false;
protected void populateTextField(Formula fm) {
formulaTextField.setText(fm.getContent());
}
};
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;
import com.fr.base.Formula;
import com.fr.base.chart.chartdata.TopDefinitionProvider;
import com.fr.chart.chartattr.Bar2DPlot;
import com.fr.chart.chartattr.ChartCollection;
@ -57,8 +58,8 @@ public class CategoryPlotReportDataContentPane extends AbstractReportDataContent
}
@Override
protected boolean dealEmpty() {
return false;
protected void populateTextField(Formula fm) {
formulaTextField.setText(fm.getContent());
}
public void okEvent() {

Loading…
Cancel
Save