Package net.sourceforge.uiq3.hp45
Class Main
- java.lang.Object
-
- net.sourceforge.uiq3.calculator.Main
-
- net.sourceforge.uiq3.hp45.Main
-
- All Implemented Interfaces:
Runnable,net.sourceforge.uiq3.calculator.IMain
public final class Main extends net.sourceforge.uiq3.calculator.MainMain class for an HP45 calculator.- Author:
- "Martin Krischik" «krischik@users.sourceforge.net»
-
-
Field Summary
Fields Modifier and Type Field Description private @Nullable net.sourceforge.uiq3.hp45.Desktop_CalculatorcalculatorThe calculator engine with debug capability.private @Nullable Calculator_CanvascanvasCalculator_Canvas displaying the calculatorprivate @Nullable Calculator_FrameframeMain window frameprivate static intHalf_A_Secondprivate static AtomicBooleanLAF_Initializedprivate static Loggerloggerclass logger instanceprivate static @Nullable Mainselfreference to protect instance from garbage collector.private static @NotNull StringTAGclass logger tag.
-
Constructor Summary
Constructors Constructor Description Main()init main
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidabout()General info dialog; fed to the OSXAdapter as the method to call when "About OSXAdapter" is selected from the application menuprotected net.sourceforge.uiq3.calculator.ICalculatorCreate_Calculator()protected net.sourceforge.uiq3.ui.ICalculatorCanvascreateCanvas()(package private) @Nullable net.sourceforge.uiq3.hp45.Desktop_CalculatorgetCalculator()(package private) @Nullable Calculator_CanvasgetCanvas()(package private) @Nullable Calculator_FramegetFrame()static voidinitializeLAF()To make widget classes compatible with GUI designer they must be instantiatable from there default constructor.booleanisRunning()voidloadFile(File Filename)load a filestatic voidmain(String[] args)main method.voidpauseApp()Signals the MIDlet to enter the Paused state.voidpreferences()General preferences dialog; fed to the OSXAdapter as the method to call when "About OSXAdapter" is selected from the application menubooleanquit()General quit handler; fed to the OSXAdapter as the method to call when a system quit event occurs A quit event is triggered by Cmd-Q, selecting Quit from the application or Dock menu, or logging outstatic voidregisterFonts()@NotNull StringtoString()
-
-
-
Field Detail
-
Half_A_Second
private static final int Half_A_Second
- See Also:
- Constant Field Values
-
logger
@NotNull private static final Logger logger
class logger instance
-
self
@Nullable private static @Nullable Main self
reference to protect instance from garbage collector.
-
TAG
@NotNull private static final @NotNull String TAG
class logger tag.
-
LAF_Initialized
private static final AtomicBoolean LAF_Initialized
-
canvas
@Nullable private @Nullable Calculator_Canvas canvas
Calculator_Canvas displaying the calculator
-
frame
@Nullable private @Nullable Calculator_Frame frame
Main window frame
-
calculator
@Nullable private @Nullable net.sourceforge.uiq3.hp45.Desktop_Calculator calculator
The calculator engine with debug capability.
-
-
Method Detail
-
main
public static void main(String[] args)
main method.- Parameters:
args- not used
-
getCalculator
@TestOnly @Nullable @Nullable net.sourceforge.uiq3.hp45.Desktop_Calculator getCalculator()
-
getCanvas
@TestOnly @Nullable @Nullable Calculator_Canvas getCanvas()
-
getFrame
@TestOnly @Nullable @Nullable Calculator_Frame getFrame()
-
initializeLAF
public static void initializeLAF()
To make widget classes compatible with GUI designer they must be instantiatable from there default constructor. This means that each widget must initialize the LAF in there default constructor.
-
registerFonts
public static void registerFonts()
-
about
public void about()
General info dialog; fed to the OSXAdapter as the method to call when "About OSXAdapter" is selected from the application menu- Specified by:
aboutin classnet.sourceforge.uiq3.calculator.Main- See Also:
Main.about()
-
Create_Calculator
protected net.sourceforge.uiq3.calculator.ICalculator Create_Calculator() throws IOException- Specified by:
Create_Calculatorin classnet.sourceforge.uiq3.calculator.Main- Returns:
- A new calculator engine
- Throws:
IOException- See Also:
Main.Create_Calculator()
-
createCanvas
protected net.sourceforge.uiq3.ui.ICalculatorCanvas createCanvas() throws IOException- Specified by:
createCanvasin classnet.sourceforge.uiq3.calculator.Main- Returns:
- A new Calculator Swing_Canvas.
- Throws:
IOException- See Also:
Main.createCanvas()
-
isRunning
public boolean isRunning()
- Returns:
- true when paused
-
loadFile
public void loadFile(File Filename)
load a file- Specified by:
loadFilein classnet.sourceforge.uiq3.calculator.Main- Parameters:
Filename- filename to load
-
pauseApp
public void pauseApp()
Signals the MIDlet to enter the Paused state.- Specified by:
pauseAppin interfacenet.sourceforge.uiq3.calculator.IMain- Overrides:
pauseAppin classnet.sourceforge.uiq3.calculator.Main
-
preferences
public void preferences()
General preferences dialog; fed to the OSXAdapter as the method to call when "About OSXAdapter" is selected from the application menu- Specified by:
preferencesin classnet.sourceforge.uiq3.calculator.Main- See Also:
Main.preferences()
-
quit
public boolean quit()
General quit handler; fed to the OSXAdapter as the method to call when a system quit event occurs A quit event is triggered by Cmd-Q, selecting Quit from the application or Dock menu, or logging out- Returns:
- true for quit
-
toString
@TestOnly @NotNull public @NotNull String toString()
- Overrides:
toStringin classnet.sourceforge.uiq3.calculator.Main
-
-