org.gwtwidgets.client.util
Class CalcEngine

java.lang.Object
  extended by org.gwtwidgets.client.util.CalcEngine

public abstract class CalcEngine
extends java.lang.Object


Field Summary
static int OP_CLEAR
           
static int OP_DEC
           
static int OP_DIV
           
static int OP_EQUALS
           
static int OP_ERASE
           
static int OP_MINUS
           
static int OP_MULT
           
static int OP_NEGATE
           
static int OP_NONE
           
static int OP_PLUS
           
 
Constructor Summary
protected CalcEngine(CalcDisplayListener cdl)
           
 
Method Summary
 com.google.gwt.user.client.ui.Button createNumberButton(java.lang.String styleName, java.lang.String symbol, int num)
           
 com.google.gwt.user.client.ui.Button createOpButton(java.lang.String styleName, java.lang.String symbol, int op)
           
 double getTotal()
           
 void pressDigit(int num)
           
 void pressOperator(int op)
           
 void refreshDisplay()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OP_NONE

public static final int OP_NONE
See Also:
Constant Field Values

OP_PLUS

public static final int OP_PLUS
See Also:
Constant Field Values

OP_MINUS

public static final int OP_MINUS
See Also:
Constant Field Values

OP_EQUALS

public static final int OP_EQUALS
See Also:
Constant Field Values

OP_CLEAR

public static final int OP_CLEAR
See Also:
Constant Field Values

OP_ERASE

public static final int OP_ERASE
See Also:
Constant Field Values

OP_MULT

public static final int OP_MULT
See Also:
Constant Field Values

OP_DIV

public static final int OP_DIV
See Also:
Constant Field Values

OP_DEC

public static final int OP_DEC
See Also:
Constant Field Values

OP_NEGATE

public static final int OP_NEGATE
See Also:
Constant Field Values
Constructor Detail

CalcEngine

protected CalcEngine(CalcDisplayListener cdl)
Method Detail

createNumberButton

public com.google.gwt.user.client.ui.Button createNumberButton(java.lang.String styleName,
                                                               java.lang.String symbol,
                                                               int num)

createOpButton

public com.google.gwt.user.client.ui.Button createOpButton(java.lang.String styleName,
                                                           java.lang.String symbol,
                                                           int op)

pressOperator

public void pressOperator(int op)

refreshDisplay

public void refreshDisplay()

pressDigit

public void pressDigit(int num)

getTotal

public double getTotal()


Copyright © 2006 Robert Hanson. All Rights Reserved.