@@ -64,6 +64,8 @@ public interface Calculator extends CalculatorEventContainer, HistoryControl<Cal
|
||||
@Nonnull String expression,
|
||||
@Nonnull Long sequenceId);
|
||||
|
||||
void setCalculateOnFly(boolean calculateOnFly);
|
||||
|
||||
boolean isCalculateOnFly();
|
||||
|
||||
/*
|
||||
|
@@ -207,8 +207,14 @@ public class CalculatorImpl implements Calculator, CalculatorEventListener {
|
||||
Locator.getInstance().getHistory().load();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCalculateOnFly(boolean calculateOnFly) {
|
||||
this.calculateOnFly = calculateOnFly;
|
||||
if (this.calculateOnFly != calculateOnFly) {
|
||||
this.calculateOnFly = calculateOnFly;
|
||||
if (this.calculateOnFly) {
|
||||
evaluate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -169,7 +169,7 @@ public enum CalculatorSpecialButton {
|
||||
};
|
||||
|
||||
@Nonnull
|
||||
private static Map<String, CalculatorSpecialButton> buttonsByActionCodes = new HashMap<String, CalculatorSpecialButton>();
|
||||
private static Map<String, CalculatorSpecialButton> buttonsByActionCodes = new HashMap<>();
|
||||
|
||||
@Nonnull
|
||||
private final String actionCode;
|
||||
|
Reference in New Issue
Block a user