Package net.sourceforge.uiq3.fx602p
Class Key_M
- java.lang.Object
-
- net.sourceforge.uiq3.fx602p.Owned_Operation
-
- net.sourceforge.uiq3.fx602p.Keyboard
-
- net.sourceforge.uiq3.fx602p.Key_Simple
-
- net.sourceforge.uiq3.fx602p.Key_M
-
- All Implemented Interfaces:
IClear
,IOperation
,IOwned_Operation
final class Key_M extends Key_Simple
The Mode key was clicked- Author:
- "Martin Krischik" «krischik@users.sourceforge.net»
-
-
Field Summary
Fields Modifier and Type Field Description private net.sourceforge.uiq3.calculator.ICalculator.AlphaRegisterType
Backup_A_Active
Active A register.private net.sourceforge.uiq3.calculator.ICalculator.DisplayType
Backup_Display_Mode
Current display mode Display_Alpha Displays the content of the Alpha register. Display_L Displays the content of the L0 aka X register. Display_Formated Displays the content of the L0 aka X register inside an alphaprivate static Logger
Logger
Class logger instance.private int
Memory_Register
current dot valueprivate short[]
Memory_Text
Text to be displayed when Mode. was selected.private int
Status
We start with status none.private static int
Status_Digit_1
memory operations selected first char expectedprivate static int
Status_Digit_2
memory operations selected and second char expectedprivate static int
Status_None
no mode selected yetprivate static String
TAG
Class logger tag.private short
Text
The character which make the difference between Min, MR, M+ M--
Fields inherited from class net.sourceforge.uiq3.fx602p.Key_Simple
Inv_Alpha, Inv_Normal, Normal, Normal_Alpha
-
Fields inherited from class net.sourceforge.uiq3.fx602p.Keyboard
AC, Alpha_Text, BST, Button_Memory_F, Button_Memory_n, Button_Memory_sn, Button_Memory_sn1, Button_Memory_SX, Button_Memory_SX2, Button_Memory_xmean, Button_Mode_DEG, Button_Mode_GRA, Button_Mode_PCL, Button_Mode_RAD, Button_Mode_RUN, Button_Mode_WRT, Button_RND_FIX, C, cos, degree, Divide, Dot, eng, Equal, EXE, EXP, FST, GOTO, GSB, HLT, hyp, INV, LBL, ln, log, M_Minus, M_Plus, Min, Minus, MODE, MR, Multiply, No_Text, Normal_Text, Num_0, Num_1, Num_2, Num_3, Num_4, Num_5, Num_6, Num_7, Num_8, Num_9, P_Close, P_Open, P0, P1, P2, P3, P4, Plus, Plus_Minus, Shift_Alpha_Text, Shift_Text, sin, tan, X_M, Xd
-
Fields inherited from class net.sourceforge.uiq3.fx602p.Owned_Operation
Owner
-
-
Constructor Summary
Constructors Constructor Description Key_M(Calculator Owner, short Normal, short Text, short Inv_Normal, short Alpha, short Inv_Alpha)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
Clear(boolean All_Clear)
Clean Key state.void
Execute(short Key_Code)
Execute virtual CPU command or key strokeprivate void
Execute_Digit_1(short Key_Code)
private void
Execute_Digit_2(short Key_Code)
private void
Execute_None()
private void
Store_Operation(boolean F_Register)
@NotNull String
toString()
Operation as java string-
Methods inherited from class net.sourceforge.uiq3.fx602p.Owned_Operation
µReset
-
-
-
-
Field Detail
-
Logger
private static final Logger Logger
Class logger instance.
-
Status_Digit_1
private static final int Status_Digit_1
memory operations selected first char expected- See Also:
- Constant Field Values
-
Status_Digit_2
private static final int Status_Digit_2
memory operations selected and second char expected- See Also:
- Constant Field Values
-
Status_None
private static final int Status_None
no mode selected yet- See Also:
- Constant Field Values
-
TAG
private static final String TAG
Class logger tag.
-
Memory_Text
private final short[] Memory_Text
Text to be displayed when Mode. was selected.
-
Text
private final short Text
The character which make the difference between Min, MR, M+ M-
-
Backup_A_Active
private net.sourceforge.uiq3.calculator.ICalculator.AlphaRegisterType Backup_A_Active
Active A register.- A_Numeric
- Alpha register to enter and display numeric results.
- A_Text
- Alpha register to enter and display textual results.
- A_Message
- Alpha register to display messages.
- A_Key
- Alpha register to merge key operations.
-
Backup_Display_Mode
private net.sourceforge.uiq3.calculator.ICalculator.DisplayType Backup_Display_Mode
Current display mode- Display_Alpha
- Displays the content of the Alpha register.
- Display_L
- Displays the content of the L0 aka X register.
- Display_Formated
- Displays the content of the L0 aka X register inside an alpha
-
Memory_Register
private int Memory_Register
current dot value
-
Status
private int Status
We start with status none.
-
-
Constructor Detail
-
Key_M
Key_M(Calculator Owner, short Normal, short Text, short Inv_Normal, short Alpha, short Inv_Alpha)
- Parameters:
Owner
- Calculator owning the keyNormal
- Normal operationsInv_Normal
- Inverse operationAlpha
- Normal_Alpha charactersInv_Alpha
- Invers Normal_Alpha charactersText
- indicating the memory operation
-
-
Method Detail
-
Clear
public void Clear(boolean All_Clear)
Clean Key state.- Specified by:
Clear
in interfaceIClear
- Overrides:
Clear
in classKeyboard
- Parameters:
All_Clear
- true when AC (all clear) is requested.- See Also:
IClear.Clear(boolean)
-
Execute
public void Execute(short Key_Code) throws Error
Description copied from interface:IOperation
Execute virtual CPU command or key stroke
- Specified by:
Execute
in interfaceIOperation
- Overrides:
Execute
in classKey_Simple
- Parameters:
Key_Code
- Virtual CPU Operation to be executed- Throws:
Error
- some error in the calculator- See Also:
IOperation.Execute(short)
-
Execute_None
private void Execute_None()
-
Store_Operation
private void Store_Operation(boolean F_Register) throws M_Error
- Parameters:
F_Register
- M or MF register?- Throws:
M_Error
- Calculator memory exhausted
-
toString
@NotNull @TestOnly public @NotNull String toString()
Operation as java string- Overrides:
toString
in classKey_Simple
- Returns:
- String respresentation
-
-