All Packages Class Hierarchy This Package Previous Next Index
Class Calculator.ClearButtonObj
java.lang.Object
|
+----Calculator.ButtonObj
|
+----Calculator.ClearButtonObj
- public class ClearButtonObj
- extends ButtonObj
This class is a smart button object that clears the Calculator. Every
ButtonHandler should have one.
- See Also:
- Calculator
-
ClearButtonObj(CalcTextGUI,
CalculatorState)
- How to make one: Make a ButtonObj (i.e., my superclass).
-
handleButton()
- This method is called by the ButtonHandler whenever the decimal point
button is pressed.
ClearButtonObj
public ClearButtonObj(CalcTextGUI gui,
CalculatorState stateObj)
- How to make one: Make a ButtonObj (i.e., my superclass). This
constructor exists only to call super w/the appropriate arguments.
- Parameters:
- gui - The CalcTextGUI to keep track of.
- stateObj - The CalculatorState to keep track of.
handleButton
public void handleButton()
- This method is called by the ButtonHandler whenever the decimal point
button is pressed.
How to handle (my button) being pressed? Clear the calculator by
asking its state to reset.
This should really call this.gui.clearScreen(), now, shouldn't
it?
- Overrides:
- handleButton
in class ButtonObj
All Packages Class Hierarchy This Package Previous Next Index