Package org.nuiton.jaxx.demo.fun
Class CalculatorEngine
- java.lang.Object
-
- org.nuiton.jaxx.demo.fun.CalculatorEngine
-
public class CalculatorEngine extends Object
-
-
Constructor Summary
Constructors Constructor Description CalculatorEngine()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd()voidaddPropertyChangeListener(PropertyChangeListener listener)voidaddPropertyChangeListener(String property, PropertyChangeListener listener)voidclear()voidclearEntry()voiddigit(int digit)voiddivide()voiddot()voidequal()protected voidfirePropertyChange(String property, Object oldValue, Object newValue)StringgetDisplayText()voidmultiply()voidoperation(int operation)voidremovePropertyChangeListener(PropertyChangeListener listener)voidremovePropertyChangeListener(String property, PropertyChangeListener listener)voidsetDisplayText(String displayText)voidsubtract()voidtoggleSign()static StringtoString(BigDecimal decimal)
-
-
-
Field Detail
-
DISPLAY_TEXT_PROPERTY
public static final String DISPLAY_TEXT_PROPERTY
- See Also:
- Constant Field Values
-
ADD
public static final int ADD
- See Also:
- Constant Field Values
-
SUBTRACT
public static final int SUBTRACT
- See Also:
- Constant Field Values
-
MULTIPLY
public static final int MULTIPLY
- See Also:
- Constant Field Values
-
DIVIDE
public static final int DIVIDE
- See Also:
- Constant Field Values
-
RESULT
public static final int RESULT
- See Also:
- Constant Field Values
-
-
Method Detail
-
getDisplayText
public String getDisplayText()
-
setDisplayText
public void setDisplayText(String displayText)
-
clear
public void clear()
-
clearEntry
public void clearEntry()
-
digit
public void digit(int digit)
-
dot
public void dot()
-
toggleSign
public void toggleSign()
-
equal
public void equal()
-
toString
public static String toString(BigDecimal decimal)
-
operation
public void operation(int operation)
-
add
public void add()
-
subtract
public void subtract()
-
multiply
public void multiply()
-
divide
public void divide()
-
addPropertyChangeListener
public void addPropertyChangeListener(PropertyChangeListener listener)
-
addPropertyChangeListener
public void addPropertyChangeListener(String property, PropertyChangeListener listener)
-
removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener listener)
-
removePropertyChangeListener
public void removePropertyChangeListener(String property, PropertyChangeListener listener)
-
-