Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Attributes

jscicalc.Notation Class Reference

This class works like an enumerated type and an object of it stores the states of the calculator for handling display output. More...

List of all members.

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.

Detailed Description

This class works like an enumerated type and an object of it stores the states of the calculator for handling display output.

Author:
J. D. Lamb
Version:
Revision:
1.3

Constructor & Destructor Documentation

jscicalc.Notation.Notation (  ) 

Constructor.

Sets the notation its default of standard, rectangular, not complex

References jscicalc.Notation.value.

Referenced by jscicalc.Notation.main().


Member Function Documentation

boolean jscicalc.Notation.complex (  ) 

Should we use scientific notation?

Returns:
true for scientific notation, false otherwise

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]
boolean jscicalc.Notation.nonComplex (  ) 

Should we use scientific notation?

Returns:
true for scientific notation, false otherwise

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?

Returns:
true for scientific notation, false otherwise

References jscicalc.Notation.rectangular().

Referenced by jscicalc.complex.Test.checkNumber(), and jscicalc.complex.Complex.tryHTMLString().

boolean jscicalc.Notation.rectangular (  ) 
boolean jscicalc.Notation.scientific (  ) 

Should we use scientific notation?

Returns:
true for scientific notation, false otherwise

References jscicalc.Notation.standard().

Referenced by jscicalc.Notation.main(), jscicalc.ExtraPanel.paintComponent(), and jscicalc.complex.Complex.tryHTMLString().

void jscicalc.Notation.setComplex (  ) 
void jscicalc.Notation.setNonComplex (  ) 
void jscicalc.Notation.setPolar (  ) 
void jscicalc.Notation.setRectangular (  ) 
void jscicalc.Notation.setScientific (  ) 
void jscicalc.Notation.setStandard (  ) 
boolean jscicalc.Notation.standard (  ) 
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

Parameters:
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().


Member Data Documentation

final int jscicalc.Notation.COMPLEX = 4 [static]
final int jscicalc.Notation.POLAR = 2 [static]
final int jscicalc.Notation.SCIENTIFIC = 1 [static]
int jscicalc.Notation.value [private]

The documentation for this class was generated from the following file: