mhframework
Class MHAppLauncher

java.lang.Object
  extended by mhframework.MHAppLauncher

public class MHAppLauncher
extends java.lang.Object

Requests initial configuration settings from the user. Future versions will also save settings to a configuration file.

Here is some sample code showing how to use this class in collaboration with MHVideoSettings to give users the option to select a video resolution.

    MHVideoSettings settings = new MHVideoSettings();
    settings.fullScreen = MHAppLauncher.showDialog(null, true); // true = show resolution options
    settings.displayWidth = MHAppLauncher.getResolution().width;
    settings.displayHeight = MHAppLauncher.getResolution().height;
 

Author:
Michael Henson

Field Summary
static boolean FULL_SCREEN
          Constant indicating that full screen mode was chosen.
static boolean WINDOWED
          Constant indicating that windowed mode was chosen.
 
Constructor Summary
MHAppLauncher()
           
 
Method Summary
static java.awt.Dimension getResolution()
           
static void main(java.lang.String[] args)
           
static void setResolution(java.awt.Dimension res)
           
static boolean showDialog(javax.swing.JFrame optionalParent)
          Displays a pre-launch dialog to ask for relevant startup parameters.
static boolean showDialog(javax.swing.JFrame optionalParent, boolean showResolutions)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FULL_SCREEN

public static final boolean FULL_SCREEN
Constant indicating that full screen mode was chosen.

See Also:
Constant Field Values

WINDOWED

public static final boolean WINDOWED
Constant indicating that windowed mode was chosen.

See Also:
Constant Field Values
Constructor Detail

MHAppLauncher

public MHAppLauncher()
Method Detail

getResolution

public static java.awt.Dimension getResolution()

showDialog

public static boolean showDialog(javax.swing.JFrame optionalParent)
Displays a pre-launch dialog to ask for relevant startup parameters.

Parameters:
optionalParent - (Optional) The window frame of the application.
Returns:
FULL_SCREEN (true) if full-screen mode was chosen, WINDOWED (false) otherwise. (See constants defined in this class.)

showDialog

public static boolean showDialog(javax.swing.JFrame optionalParent,
                                 boolean showResolutions)

main

public static void main(java.lang.String[] args)

setResolution

public static void setResolution(java.awt.Dimension res)