This class works like an enumerated type and an object of it stores the states of the calculator for handling display output. More...
Public Member Functions | |
| Notation () | |
| Constructor. | |
| boolean | scientific () |
| Should we use scientific notation? | |
| boolean | standard () |
| Should we use standard notation? | |
| void | setScientific () |
| Sets scientific notation. | |
| void | setStandard () |
| Sets standard notation. | |
| boolean | polar () |
| Should we use scientific notation? | |
| boolean | rectangular () |
| Should we use scientific notation? | |
| void | setPolar () |
| Sets standard notation. | |
| void | setRectangular () |
| Sets standard notation. | |
| boolean | complex () |
| Should we use scientific notation? | |
| boolean | nonComplex () |
| Should we use scientific notation? | |
| void | setComplex () |
| Sets standard notation. | |
| void | setNonComplex () |
| Sets standard notation. | |
| void | toggle (int v) |
| Toggles notation. | |
Static Public Member Functions | |
| static void | main (String args[]) |
| Standard test function. | |
Static Public Attributes | |
| static final int | SCIENTIFIC = 1 |
| Enumerated value for scientific notation. | |
| static final int | POLAR = 2 |
| Enumerated value for polar notation. | |
| static final int | COMPLEX = 4 |
| Enumerated value for complex notation. | |
Private Attributes | |
| int | value |
| Used to store the enumerated type. | |
This class works like an enumerated type and an object of it stores the states of the calculator for handling display output.
| jscicalc.Notation.Notation | ( | ) |
Constructor.
Sets the notation its default of standard, rectangular, not complex
References jscicalc.Notation.value.
Referenced by jscicalc.Notation.main().
| boolean jscicalc.Notation.complex | ( | ) |
Should we use scientific notation?
References jscicalc.Notation.nonComplex().
Referenced by jscicalc.complex.Test.checkNumber(), jscicalc.complex.Complex.toHTMLParenString(), jscicalc.complex.Complex.toHTMLSubString(), and jscicalc.complex.Complex.tryHTMLString().
| static void jscicalc.Notation.main | ( | String | args[] | ) | [static] |
Standard test function.
References jscicalc.Notation.Notation(), jscicalc.Notation.scientific(), jscicalc.Notation.setScientific(), jscicalc.Notation.setStandard(), jscicalc.Notation.standard(), and jscicalc.Notation.toggle().
| boolean jscicalc.Notation.nonComplex | ( | ) |
Should we use scientific notation?
References jscicalc.Notation.COMPLEX, and jscicalc.Notation.value.
Referenced by jscicalc.complex.Test.checkNumber(), jscicalc.Notation.complex(), and jscicalc.ExtraPanel.paintComponent().
| boolean jscicalc.Notation.polar | ( | ) |
Should we use scientific notation?
References jscicalc.Notation.rectangular().
Referenced by jscicalc.complex.Test.checkNumber(), and jscicalc.complex.Complex.tryHTMLString().
| boolean jscicalc.Notation.rectangular | ( | ) |
Should we use scientific notation?
References jscicalc.Notation.POLAR, and jscicalc.Notation.value.
Referenced by jscicalc.complex.Test.checkNumber(), jscicalc.Notation.polar(), jscicalc.complex.Complex.toHTMLParenString(), jscicalc.complex.Complex.toHTMLSubString(), and jscicalc.complex.Complex.tryHTMLString().
| boolean jscicalc.Notation.scientific | ( | ) |
Should we use scientific notation?
References jscicalc.Notation.standard().
Referenced by jscicalc.Notation.main(), jscicalc.ExtraPanel.paintComponent(), and jscicalc.complex.Complex.tryHTMLString().
| void jscicalc.Notation.setComplex | ( | ) |
Sets standard notation.
References jscicalc.Notation.COMPLEX, and jscicalc.Notation.value.
Referenced by jscicalc.complex.Test.main(), jscicalc.complex.Complex.toHTMLParenString(), and jscicalc.complex.Complex.toHTMLSubString().
| void jscicalc.Notation.setNonComplex | ( | ) |
Sets standard notation.
References jscicalc.Notation.COMPLEX, and jscicalc.Notation.value.
Referenced by jscicalc.complex.Test.main(), jscicalc.complex.Complex.toHTMLParenString(), and jscicalc.complex.Complex.toHTMLSubString().
| void jscicalc.Notation.setPolar | ( | ) |
Sets standard notation.
References jscicalc.Notation.POLAR, and jscicalc.Notation.value.
Referenced by jscicalc.complex.Test.main(), jscicalc.complex.Complex.toHTMLParenString(), and jscicalc.complex.Complex.toHTMLSubString().
| void jscicalc.Notation.setRectangular | ( | ) |
Sets standard notation.
References jscicalc.Notation.POLAR, and jscicalc.Notation.value.
Referenced by jscicalc.complex.Test.main(), jscicalc.complex.Complex.toHTMLParenString(), and jscicalc.complex.Complex.toHTMLSubString().
| void jscicalc.Notation.setScientific | ( | ) |
Sets scientific notation.
References jscicalc.Notation.SCIENTIFIC, and jscicalc.Notation.value.
Referenced by jscicalc.complex.Test.main(), jscicalc.Notation.main(), jscicalc.complex.DoubleFormat.main(), jscicalc.complex.Complex.toHTMLParenString(), jscicalc.complex.Complex.toHTMLSubString(), and jscicalc.complex.Complex.tryHTMLString().
| void jscicalc.Notation.setStandard | ( | ) |
Sets standard notation.
References jscicalc.Notation.SCIENTIFIC, and jscicalc.Notation.value.
Referenced by jscicalc.complex.Test.main(), jscicalc.Notation.main(), jscicalc.complex.Complex.toHTMLParenString(), and jscicalc.complex.Complex.toHTMLSubString().
| boolean jscicalc.Notation.standard | ( | ) |
Should we use standard notation?
References jscicalc.Notation.SCIENTIFIC, and jscicalc.Notation.value.
Referenced by jscicalc.complex.Test.checkNumber(), jscicalc.complex.DoubleFormat.HTMLStringRepresentation.HTMLStringRepresentation(), jscicalc.Notation.main(), jscicalc.Notation.scientific(), jscicalc.complex.Complex.toHTMLParenString(), and jscicalc.complex.Complex.toHTMLSubString().
| void jscicalc.Notation.toggle | ( | int | v | ) |
Toggles notation.
Useful, for example, for switching between one notation and another without explicitly identifying the starting notation first
| v | The type: Notation.SCIENTIFIC, Notation.POLAR or Notation.COMPLEX |
References jscicalc.Notation.COMPLEX, jscicalc.Notation.POLAR, jscicalc.Notation.SCIENTIFIC, and jscicalc.Notation.value.
Referenced by jscicalc.button.SciButton.actionPerformed(), jscicalc.button.PolButton.actionPerformed(), jscicalc.button.CplxButton.actionPerformed(), and jscicalc.Notation.main().
final int jscicalc.Notation.COMPLEX = 4 [static] |
Enumerated value for complex notation.
Referenced by jscicalc.Notation.nonComplex(), jscicalc.Notation.setComplex(), jscicalc.Notation.setNonComplex(), and jscicalc.Notation.toggle().
final int jscicalc.Notation.POLAR = 2 [static] |
Enumerated value for polar notation.
Referenced by jscicalc.Notation.rectangular(), jscicalc.Notation.setPolar(), jscicalc.Notation.setRectangular(), and jscicalc.Notation.toggle().
final int jscicalc.Notation.SCIENTIFIC = 1 [static] |
Enumerated value for scientific notation.
Referenced by jscicalc.Notation.setScientific(), jscicalc.Notation.setStandard(), jscicalc.Notation.standard(), and jscicalc.Notation.toggle().
int jscicalc.Notation.value [private] |
Used to store the enumerated type.
Referenced by jscicalc.Notation.nonComplex(), jscicalc.Notation.Notation(), jscicalc.Notation.rectangular(), jscicalc.Notation.setComplex(), jscicalc.Notation.setNonComplex(), jscicalc.Notation.setPolar(), jscicalc.Notation.setRectangular(), jscicalc.Notation.setScientific(), jscicalc.Notation.setStandard(), jscicalc.Notation.standard(), and jscicalc.Notation.toggle().
1.7.1