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