Class polarDust.calculator.NumDisplay01
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class polarDust.calculator.NumDisplay01

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Canvas
                   |
                   +----polarDust.calculator.NumDisplay01

public class NumDisplay01
extends Canvas
implements CalcDisplay, Runnable, CalcConstants
NumDisplay01 is a component capable of displaying a 12 digit decimal number in a floating point calculator specific format. If the number overflows the limit of 10e13 - 1, a flashing error message is displayed. On the left side it has letter M as a memory content flag.

The source code.
Version:
0.9, 1996.06.04
Author:
Sorin Lazareanu

Constructor Index

 o NumDisplay01()
Constructs a new display.
 o NumDisplay01(PrinterPanel01)
Constructs a new display, driver for a printer.

Method Index

 o assign(double)
Displays the parameter with output to calculator printer if exists.
 o assignWithDecimals(double, int)
Displays the parameter with output to calculator printer.
 o isAlive()
 o isError()
 o isNotZero(double)
 o maxDigitsFactor()
 o minimumSize()
 o paint(Graphics)
 o preferredSize()
 o resume()
 o run()
 o setNumber(String)
Sends a string to be displayed.
 o show(double)
Displays the parameter.
 o showM(double)
Shows the letter M if the parameter is not represented as a zero value.
 o showNumber(double, int)
 o showOp(String)
Oputputs the operator to the calculator printer.
 o showWithDecimals(double, int)
Displays the parameter.
 o start()
Start the thread for blinking.
 o stop()
Stops the thread for blinking.
 o suspend()
 o toFloatString(double, int)
Converts a double to a string format suitable for a NumDisplay
 o toggleRunnable()
Resume or suspends the thread for blinking.
 o update(Graphics)

Constructors

 o NumDisplay01
  public NumDisplay01()
Constructs a new display.
 o NumDisplay01
  public NumDisplay01(PrinterPanel01 aPrinter)
Constructs a new display, driver for a printer.
Parameters:
aPrinter - the calculator printer attached.
See Also:
PrinterPanel01

Methods

 o maxDigitsFactor
  public long maxDigitsFactor()
Returns:
the factor for a 12 digits display is 10e11
 o show
  public double show(double dReg1)
Displays the parameter. No output to calculator printer.
Parameters:
dReg1 - the number to be displayed.
Returns:
the number as represented on the display component.
 o assign
  public double assign(double dReg1)
Displays the parameter with output to calculator printer if exists.
Parameters:
dReg1 - the number to be displayed.
Returns:
the number as represented on the display component.
 o showOp
  public void showOp(String oper)
Oputputs the operator to the calculator printer.
Parameters:
oper - the representation of the operator to be printed.
 o showWithDecimals
  public double showWithDecimals(double dReg1,
                                 int iDecimals)
Displays the parameter. No output to calculator printer.
Parameters:
dReg1 - the number to be displayed.
iDecimals - the number of digits after the decimal point.
Returns:
the number as represented on the display component.
 o assignWithDecimals
  public double assignWithDecimals(double dReg1,
                                   int iDecimals)
Displays the parameter with output to calculator printer.
Parameters:
dReg1 - the number to be displayed.
iDecimals - the number of digits after the decimal point.
Returns:
the number as represented on the display component.
 o toFloatString
  protected synchronized String toFloatString(double dReg1,
                                              int iDecimals)
Converts a double to a string format suitable for a NumDisplay
Parameters:
dReg1 - the number to be displayed.
iDecimals - the number of digits after the decimal point.
Returns:
the representation.
 o showNumber
  protected double showNumber(double dReg1,
                              int iDecimals)
 o isError
  public boolean isError()
Returns:
the last operation generated an error (overflow).
 o isNotZero
  public boolean isNotZero(double dReg)
Parameters:
a - number
Returns:
the parameter has a zero value representation on display.
 o showM
  public double showM(double dRegM)
Shows the letter M if the parameter is not represented as a zero value.
 o setNumber
  public void setNumber(String aString)
Sends a string to be displayed.
 o preferredSize
  public Dimension preferredSize()
Overrides:
preferredSize in class Component
 o minimumSize
  public Dimension minimumSize()
Overrides:
minimumSize in class Component
 o start
  public synchronized void start()
Start the thread for blinking.
 o stop
  public void stop()
Stops the thread for blinking.
 o toggleRunnable
  public void toggleRunnable()
Resume or suspends the thread for blinking.
 o suspend
  public void suspend()
 o isAlive
  public boolean isAlive()
 o resume
  public void resume()
 o run
  public void run()
 o paint
  public void paint(Graphics aGraphics)
Overrides:
paint in class Canvas
 o update
  public synchronized void update(Graphics aGraphics)
Overrides:
update in class Component

All Packages  Class Hierarchy  This Package  Previous  Next  Index