|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<StartupManager>
edu.wisc.ssec.mcidasv.startupmanager.StartupManager
public enum StartupManager
Nested Class Summary | |
---|---|
private static class |
StartupManager.ApplyButton
|
private static class |
StartupManager.CancelButton
|
private static class |
StartupManager.CommandButton
|
private static class |
StartupManager.HelpButton
|
static class |
StartupManager.IconCellRenderer
|
private static class |
StartupManager.OkButton
|
static class |
StartupManager.Platform
|
static class |
StartupManager.TreeCellRenderer
|
Enum Constant Summary | |
---|---|
INSTANCE
Lone instance of the startup manager. |
Field Summary | |
---|---|
private JPanel |
ADVANCED_PANEL
Panel containing the startup options. |
private JPanel |
BAD_CHOICE_PANEL
Panel to use for all other preference panels while running startup manager. |
private JPanel |
COMMAND_ROW_PANEL
Contains the various buttons (Apply, Ok, Help, Cancel). |
private static String |
HELP_PATH
Path to the McIDAS-V help set within mcv_userguide.jar. |
private static String |
HELP_TARGET
ID of the startup prefs help page. |
static RenderingHints |
HINTS
Cached copy of the application rendering hints. |
private JList |
panelList
Contains the list of the different preference panels. |
private StartupManager.Platform |
platform
The type of platform as reported by determinePlatform() . |
static String[][] |
PREF_PANELS
|
static Object[][] |
RENDER_HINTS
|
static String |
USAGE_MESSAGE
usage message |
Method Summary | |
---|---|
static void |
applyArgs(boolean ignoreUnknown,
boolean fromStartupManager,
String[] args)
Applies the command line arguments to the startup preferences. |
private JPanel |
buildAdvancedPanel()
Creates and returns the advanced preferences panel. |
private JPanel |
buildCommandRow()
Builds and returns a JPanel containing the various buttons that
control the startup manager. |
private JPanel |
buildUnavailablePanel()
Creates and returns a dummy panel. |
void |
copy(File src,
File dst)
Copies a file. |
protected void |
createDisplay()
Build and display the startup manager window. |
private StartupManager.Platform |
determinePlatform()
Figures out the type of platform. |
JPanel |
getAdvancedPanel(boolean forceBuild)
Returns the advanced preferences panel. |
static Properties |
getArgs(boolean ignoreUnknown,
boolean fromStartupManager,
String[] args,
Properties defaults)
|
JPanel |
getCommandRow()
Returns a panel containing the Apply/Ok/Help/Cancel buttons. |
static Properties |
getDefaultProperties()
|
static int |
getMaximumHeapSize()
|
StartupManager.Platform |
getPlatform()
Returns either StartupManager.Platform.UNIXLIKE or
StartupManager.Platform.WINDOWS . |
static RenderingHints |
getRenderingHints()
Creates and returns the rendering hints for the GUI. |
private Container |
getSelectedPanel()
|
JPanel |
getUnavailablePanel()
|
protected static String |
getUsageMessage()
Return the command line usage message. |
void |
handleApply()
Saves the changes to the preferences and quits. |
protected void |
handleCancel()
Simply quits the program. |
protected void |
handleHelp()
Shows the startup preferences help page. |
protected void |
handleOk()
Saves the preference changes. |
static void |
main(String[] args)
|
private static void |
usage(String err)
Print out the command line usage message and exit. |
static StartupManager |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static StartupManager[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final StartupManager INSTANCE
Field Detail |
---|
public static final String[][] PREF_PANELS
public static final Object[][] RENDER_HINTS
public static final String USAGE_MESSAGE
private static final String HELP_PATH
private static final String HELP_TARGET
private final StartupManager.Platform platform
determinePlatform()
.
public static final RenderingHints HINTS
private final JList panelList
private JPanel ADVANCED_PANEL
private JPanel BAD_CHOICE_PANEL
private JPanel COMMAND_ROW_PANEL
Method Detail |
---|
public static StartupManager[] values()
for (StartupManager c : StartupManager.values()) System.out.println(c);
public static StartupManager valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified name
NullPointerException
- if the argument is nullpublic static RenderingHints getRenderingHints()
RENDER_HINTS
private StartupManager.Platform determinePlatform()
StartupManager.Platform.UNIXLIKE
or StartupManager.Platform.WINDOWS
.public StartupManager.Platform getPlatform()
StartupManager.Platform.UNIXLIKE
or
StartupManager.Platform.WINDOWS
.
determinePlatform()
.public void handleApply()
protected void handleOk()
protected void handleHelp()
protected void handleCancel()
private Container getSelectedPanel()
private JPanel buildUnavailablePanel()
private JPanel buildAdvancedPanel()
private JPanel buildCommandRow()
JPanel
containing the various buttons that
control the startup manager. These buttons offer identical
functionality to those built by the IDV's preference manager code.
JPanel
containing the following types of buttons:
StartupManager.ApplyButton
, StartupManager.OkButton
, StartupManager.HelpButton
,
and StartupManager.CancelButton
.GuiUtils.makeApplyOkHelpCancelButtons(ActionListener)
public JPanel getAdvancedPanel(boolean forceBuild)
buildAdvancedPanel()
in that a panel isn't created, unless
forceBuild
is true
.
forceBuild
- Always rebuilds the advanced panel if true
.
public JPanel getUnavailablePanel()
public JPanel getCommandRow()
protected void createDisplay()
public void copy(File src, File dst) throws IOException
src
- The file to copy.dst
- The path to the copy of src
.
IOException
- If there was a problem while attempting to copy.public static Properties getDefaultProperties()
public static Properties getArgs(boolean ignoreUnknown, boolean fromStartupManager, String[] args, Properties defaults)
public static int getMaximumHeapSize()
private static void usage(String err)
ArgsManager
.
err
- The usage messageprotected static String getUsageMessage()
public static void applyArgs(boolean ignoreUnknown, boolean fromStartupManager, String[] args)
args
array,
link in McIDASV.main(String[])
.
ignoreUnknown
- If true
ignore any parameters that do not
apply to the startup manager. If false
the non-applicable
parameters should signify an error.fromStartupManager
- Whether or not this call originated from the
startup manager (rather than preferences).args
- Incoming command line arguments. Cannot be null
.
NullPointerException
- if args
is null.#getArgs(boolean, String[], Properties)
public static void main(String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |