Package net.sourceforge.uiq3.fx602p
Class Main
- java.lang.Object
-
- net.sourceforge.uiq3.calculator.Main
-
- net.sourceforge.uiq3.fx602p.Main
-
- All Implemented Interfaces:
Runnable
,net.sourceforge.uiq3.calculator.IMain
public final class Main extends net.sourceforge.uiq3.calculator.Main
Main class for an FX-602p calculator.- Author:
- "Martin Krischik" «krischik@users.sourceforge.net»
-
-
Field Summary
Fields Modifier and Type Field Description private @Nullable Desktop_Calculator
calculator
The calculator engine with debug capability.private @Nullable Calculator_Canvas
canvas
Calculator_Canvas displaying the calculatorprivate @Nullable Calculator_Frame
frame
Main window frameprivate static int
Half_A_Second
private static AtomicBoolean
LAF_Initialized
private static Logger
logger
class logger instanceprivate static @Nullable Main
self
reference to protect instance from garbage collector.private static @NotNull String
TAG
class 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 void
about()
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.ICalculator
Create_Calculator()
protected net.sourceforge.uiq3.ui.ICalculatorCanvas
createCanvas()
(package private) @Nullable Desktop_Calculator
getCalculator()
(package private) @Nullable Calculator_Canvas
getCanvas()
(package private) @Nullable Calculator_Frame
getFrame()
static void
initializeLAF()
To make widget classes compatible with GUI designer they must be instantiatable from there default constructor.boolean
isRunning()
void
loadFile(File Filename)
load a filestatic void
main(String[] args)
main method.void
pauseApp()
Signals the MIDlet to enter the Paused state.void
preferences()
General preferences dialog; fed to the OSXAdapter as the method to call when "About OSXAdapter" is selected from the application menuboolean
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@NotNull String
toString()
-
-
-
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 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 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.
-
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:
about
in classnet.sourceforge.uiq3.calculator.Main
- See Also:
Main.about()
-
Create_Calculator
protected net.sourceforge.uiq3.calculator.ICalculator Create_Calculator() throws IOException
- Specified by:
Create_Calculator
in 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:
createCanvas
in 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:
loadFile
in classnet.sourceforge.uiq3.calculator.Main
- Parameters:
Filename
- filename to load
-
pauseApp
public void pauseApp()
Signals the MIDlet to enter the Paused state.- Specified by:
pauseApp
in interfacenet.sourceforge.uiq3.calculator.IMain
- Overrides:
pauseApp
in 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:
preferences
in 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:
toString
in classnet.sourceforge.uiq3.calculator.Main
-
-