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
-
NumDisplay01()
- Constructs a new display.
-
NumDisplay01(PrinterPanel01)
- Constructs a new display, driver for a printer.
-
assign(double)
- Displays the parameter with output to calculator printer if exists.
-
assignWithDecimals(double, int)
- Displays the parameter with output to calculator printer.
-
isAlive()
-
-
isError()
-
-
isNotZero(double)
-
-
maxDigitsFactor()
-
-
minimumSize()
-
-
paint(Graphics)
-
-
preferredSize()
-
-
resume()
-
-
run()
-
-
setNumber(String)
- Sends a string to be displayed.
-
show(double)
- Displays the parameter.
-
showM(double)
- Shows the letter M if the parameter is not represented as a zero value.
-
showNumber(double, int)
-
-
showOp(String)
- Oputputs the operator to the calculator printer.
-
showWithDecimals(double, int)
- Displays the parameter.
-
start()
- Start the thread for blinking.
-
stop()
- Stops the thread for blinking.
-
suspend()
-
-
toFloatString(double, int)
-
Converts a double to a string format suitable for a NumDisplay
-
toggleRunnable()
- Resume or suspends the thread for blinking.
-
update(Graphics)
-
NumDisplay01
public NumDisplay01()
- Constructs a new display.
NumDisplay01
public NumDisplay01(PrinterPanel01 aPrinter)
- Constructs a new display, driver for a printer.
- Parameters:
- aPrinter - the calculator printer attached.
- See Also:
- PrinterPanel01
maxDigitsFactor
public long maxDigitsFactor()
- Returns:
- the factor for a 12 digits display is 10e11
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.
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.
showOp
public void showOp(String oper)
- Oputputs the operator to the calculator printer.
- Parameters:
- oper - the representation of the operator to be printed.
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.
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.
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.
showNumber
protected double showNumber(double dReg1,
int iDecimals)
isError
public boolean isError()
- Returns:
- the last operation generated an error (overflow).
isNotZero
public boolean isNotZero(double dReg)
- Parameters:
- a - number
- Returns:
- the parameter has a zero value representation on display.
showM
public double showM(double dRegM)
- Shows the letter M if the parameter is not represented as a zero value.
setNumber
public void setNumber(String aString)
- Sends a string to be displayed.
preferredSize
public Dimension preferredSize()
- Overrides:
- preferredSize in class Component
minimumSize
public Dimension minimumSize()
- Overrides:
- minimumSize in class Component
start
public synchronized void start()
- Start the thread for blinking.
stop
public void stop()
- Stops the thread for blinking.
toggleRunnable
public void toggleRunnable()
- Resume or suspends the thread for blinking.
suspend
public void suspend()
isAlive
public boolean isAlive()
resume
public void resume()
run
public void run()
paint
public void paint(Graphics aGraphics)
- Overrides:
- paint in class Canvas
update
public synchronized void update(Graphics aGraphics)
- Overrides:
- update in class Component
All Packages Class Hierarchy This Package Previous Next Index