com.isti.jplotresp
Class PlotRun

java.lang.Object
  extended by com.isti.jevalresp.Run
      extended by com.isti.jevalresp.RunExt
          extended by com.isti.jplotresp.PlotRun

public class PlotRun
extends RunExt

Class PlotRun is the entry point and managing module for 'JPlotResp'.


Field Summary
protected  ConfigManager cfgObj
           
protected static java.lang.String CONFIG_FNAME
           
protected static java.io.File currentDirectory
           
protected static int DEF_FRAME_HEIGHT
           
protected static int DEF_FRAME_WIDTH
           
static boolean defaultAllowSystemExitFlag
          Default allow system exit flag is true to allow system exit.
static boolean defaultExitFrameDisposeFlag
          Default exit frame dispose flag is true to dispose frame on exit.
protected  RespEntryPanel entryPanel
           
static java.lang.String javaVersionString
           
protected  com.isti.util.logging.IstiLogger logger
           
protected  javax.swing.JPanel mainContentPanel
           
protected  javax.swing.JTabbedPane mainTabbedPane
           
static java.lang.String MIN_JAVA_VERSION
          Minimum version of Java required.
static java.lang.String PROGRAM_NAME
          Displayed program name.
 javax.swing.JFrame programFrameObj
           
protected  javax.swing.JButton quitButton
           
static java.lang.String REVISION_STR
          Program revision string.
static java.lang.String SPLASH_GRAPHIC_FNAME
          Filename for splash screen graphic.
protected static SplashWindow splashWindowObj
           
static java.lang.String VERSION_NUM_STR
          Program version string.
 
Fields inherited from class com.isti.jevalresp.Run
b62XValue, b62XValueProp, beginCalObj, chaNamesArray, debugFlag, debugFlagProp, endCalObj, endDayProp, endTimeProp, endYearProp, errorMessage, exitStatusValue, fileNameProp, fileNameString, frequenciesArray, HDR_CMT_STR, headerFlag, headerFlagProp, INTERP_TENSION_DEFVAL, interpInputFlagProp, interpListFlagProp, interpTensionProp, listInterpInFlag, listInterpOutFlag, listInterpTension, locationIdProp, logSpacingFlag, maxFreqValue, minFreqValue, minimumFrequencyFlag, multiOutFlag, multiOutFlagProp, multiSvrFlag, multiSvrFlagProp, netNamesArray, networkIdProp, numberFreqs, outputDirectory, outputDirectoryProp, outUnitsConvIdx, outUnitsConvProp, paramProps, propsFileProp, propsFileString, RESP_AP_TYPEIDX, RESP_AP2_TYPEIDX, RESP_CS_TYPEIDX, RESP_FAP_TYPEIDX, RESP_TYPE_LONGSTRS, RESP_TYPE_STRS, responseTypeProp, respTypeIndex, showInputFlag, showInputFlagProp, siteNamesArray, stageNumbersProp, staNamesArray, startStageNum, stdioFlag, stdioFlagProp, stopStageNum, timeFmtObj, timeOfDayProp, totalSensitFlag, totalSensitFlagProp, TYPE_SPACE_LONGSTRS, TYPE_SPACE_STRS, typeOfSpacingProp, UNIT_CONV_DEFIDX, UNIT_CONV_LONGSTRS, UNIT_CONV_STRS, unwrapPhaseFlag, unwrapPhaseFlagProp, useDelayFlag, useDelayFlagProp, VER1_STR, VER2_STR, verboseFlag, verboseFlagProp
 
Constructor Summary
  PlotRun()
          Constructs and executes the application.
protected PlotRun(javax.swing.JFrame programFrameObj, ConfigManager cfgObj, com.isti.util.logging.IstiLogger logger)
          Constructs and executes the application.
 
Method Summary
protected  void closeAllPlots()
          Close all plots.
 javax.swing.JFileChooser createFileChooser(int frameWidth, int frameHeight, boolean appendButtonFlag)
          Creates a file chooser object.
protected static IstiFocusManager createFocusManager()
          Create the focus manager.
protected static void disposeSplashWindow()
          Dispose the splash window.
protected  void execute(java.lang.Runnable command, java.lang.String name)
          Executes the given command at some time in the future.
protected  void exitCleanup()
          Perform cleanup operations before program termination.
protected  void exitProgram()
          Processing to be done when the program terminates
 java.io.PrintStream getConsoleOut()
          Get the console output.
static ConfigManager getDefaultConfigManager()
          Get the default config manager.
static javax.swing.JFrame getDefaultFrame()
          Get the default frame.
static com.isti.util.logging.IstiLogger getDefaultLogger()
          Get the default message logger.
 boolean isFrameChanged()
          Returns true if the program frame position or size has changed, compared to the position loaded from the configuration file.
protected  boolean isSetupStreams()
          Determines if the streams should be setup for the console panel.
static void main(java.lang.String[] args)
          Program entry point.
protected  void processAndOutput(boolean plotFlag)
          Process parameters and generate output.
 boolean processAndPlot(PlotDisplayOptionPanel plotDisplayOptionPanelObj)
          Processes parameters, performs requested operations and generates the output plots.
protected  void removeConsolePanel()
          Remove the Console Panel from the tabbed pane.
static void runJPlotResp(javax.swing.JFrame programFrameObj, ConfigManager cfgObj, com.isti.util.logging.IstiLogger logger, boolean allowSystemExitFlag, boolean exitFrameDisposeFlag)
          Run 'JPlotResp'.
 void saveConfig()
          Saves the configuration.
protected  void selectEntryPanel()
          Select the entry panel on the tabbed pane.
protected  void setAllowSystemExit(boolean b)
          Set if system exit is allowed or not.
protected  void setExitProgramFrameDispose(boolean b)
          Set if frame is disposed on exit or not.
protected  void setupFocusManager(IstiFocusManager fm)
          Setup the focus manager.
protected static void setupLookAndFeel()
          Set the current default look and feel.
protected static void setupLookAndFeel(java.lang.String className)
          Set the current default look and feel.
protected  void showFrame()
          Show the frame.
protected static void showSplashWindow()
          Show the splash window.
protected  void storeFrameSettings()
          Saves the position and size of the program window frame.
 
Methods inherited from class com.isti.jevalresp.RunExt
checkGenerateFreqArray, doGenerateOutput, generateResponseOutputs, processAndOutput, processAndOutput, processAndOutput, processAndOutput, processAndOutput, processAndOutput, processAndOutput, processAndOutput, processAndOutput, processAndOutput, processAndOutput, processAndOutput, processAndOutput, processAndOutput
 
Methods inherited from class com.isti.jevalresp.Run
addTimeToCalendar, checkWebServicesServer, clearErrorMessage, enterStartStopStageNums, generateNetResponses, generateResponses, generateWebResponses, getErrorFlag, getErrorMessage, getExitStatusValue, listToStringArray, optionsArrToString, preprocessParameters, processAndOutput, processNonSwitchParams, processSwitchParams, setErr, setErrorMessage, unitInfoStr
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROGRAM_NAME

public static final java.lang.String PROGRAM_NAME
Displayed program name.

See Also:
Constant Field Values

VERSION_NUM_STR

public static final java.lang.String VERSION_NUM_STR
Program version string.

See Also:
Constant Field Values

REVISION_STR

public static final java.lang.String REVISION_STR
Program revision string.

See Also:
Constant Field Values

SPLASH_GRAPHIC_FNAME

public static final java.lang.String SPLASH_GRAPHIC_FNAME
Filename for splash screen graphic.

See Also:
Constant Field Values

MIN_JAVA_VERSION

public static final java.lang.String MIN_JAVA_VERSION
Minimum version of Java required.

See Also:
Constant Field Values

programFrameObj

public final javax.swing.JFrame programFrameObj

splashWindowObj

protected static SplashWindow splashWindowObj

DEF_FRAME_WIDTH

protected static final int DEF_FRAME_WIDTH
See Also:
Constant Field Values

DEF_FRAME_HEIGHT

protected static final int DEF_FRAME_HEIGHT
See Also:
Constant Field Values

mainContentPanel

protected final javax.swing.JPanel mainContentPanel

mainTabbedPane

protected final javax.swing.JTabbedPane mainTabbedPane

entryPanel

protected RespEntryPanel entryPanel

quitButton

protected final javax.swing.JButton quitButton

currentDirectory

protected static final java.io.File currentDirectory

CONFIG_FNAME

protected static final java.lang.String CONFIG_FNAME
See Also:
Constant Field Values

cfgObj

protected final ConfigManager cfgObj

logger

protected final com.isti.util.logging.IstiLogger logger

defaultExitFrameDisposeFlag

public static final boolean defaultExitFrameDisposeFlag
Default exit frame dispose flag is true to dispose frame on exit.

See Also:
Constant Field Values

defaultAllowSystemExitFlag

public static final boolean defaultAllowSystemExitFlag
Default allow system exit flag is true to allow system exit.

See Also:
Constant Field Values

javaVersionString

public static final java.lang.String javaVersionString
Constructor Detail

PlotRun

public PlotRun()
Constructs and executes the application.


PlotRun

protected PlotRun(javax.swing.JFrame programFrameObj,
                  ConfigManager cfgObj,
                  com.isti.util.logging.IstiLogger logger)
Constructs and executes the application.

Parameters:
programFrameObj - the frame.
cfgObj - the config manager.
logger - the logger.
Method Detail

createFileChooser

public javax.swing.JFileChooser createFileChooser(int frameWidth,
                                                  int frameHeight,
                                                  boolean appendButtonFlag)
Creates a file chooser object.

Parameters:
frameWidth - the width of the file chooser window frame.
frameHeight - the height of the file chooser window frame.
appendButtonFlag - specifies that an "Append" button will be added to the panel (that will append selections to those chosen previously).
Returns:
a file chooser object.

isSetupStreams

protected boolean isSetupStreams()
Determines if the streams should be setup for the console panel.

Returns:
true if the streams should be setup, false otherwise.

processAndOutput

protected void processAndOutput(boolean plotFlag)
Process parameters and generate output.

Parameters:
plotFlag - a boolean where true indicates output should be plotted.

removeConsolePanel

protected void removeConsolePanel()
Remove the Console Panel from the tabbed pane.


closeAllPlots

protected void closeAllPlots()
Close all plots.


selectEntryPanel

protected void selectEntryPanel()
Select the entry panel on the tabbed pane.


getConsoleOut

public java.io.PrintStream getConsoleOut()
Get the console output.

Overrides:
getConsoleOut in class Run
Returns:
the console output printstream.

execute

protected void execute(java.lang.Runnable command,
                       java.lang.String name)
Executes the given command at some time in the future.

Parameters:
command - the runnable task
name - the task name

saveConfig

public void saveConfig()
Saves the configuration.


isFrameChanged

public boolean isFrameChanged()
Returns true if the program frame position or size has changed, compared to the position loaded from the configuration file.

Returns:
true if the program frame position or size has changed.

storeFrameSettings

protected void storeFrameSettings()
Saves the position and size of the program window frame.


processAndPlot

public boolean processAndPlot(PlotDisplayOptionPanel plotDisplayOptionPanelObj)
Processes parameters, performs requested operations and generates the output plots.

Parameters:
plotDisplayOptionPanelObj - plot display option panel.
Returns:
true if successful, false if a parameter error was detected (in which case the 'getErrorMessage()' and 'getExitStatusValue()' methods may be used to fetch information about the error.)

setExitProgramFrameDispose

protected void setExitProgramFrameDispose(boolean b)
Set if frame is disposed on exit or not.

Parameters:
b - true to dispose frame on exit, false otherwise.

setAllowSystemExit

protected void setAllowSystemExit(boolean b)
Set if system exit is allowed or not.

Parameters:
b - true to allow system exit, false otherwise.

showSplashWindow

protected static void showSplashWindow()
Show the splash window.


createFocusManager

protected static IstiFocusManager createFocusManager()
Create the focus manager.

Returns:
the focus manager.

setupFocusManager

protected void setupFocusManager(IstiFocusManager fm)
Setup the focus manager.

Parameters:
fm - IstiFocusManager

disposeSplashWindow

protected static void disposeSplashWindow()
Dispose the splash window.


showFrame

protected void showFrame()
Show the frame.


getDefaultFrame

public static javax.swing.JFrame getDefaultFrame()
Get the default frame.

Returns:
the default frame.

getDefaultConfigManager

public static ConfigManager getDefaultConfigManager()
Get the default config manager.

Returns:
the default config manager.

getDefaultLogger

public static com.isti.util.logging.IstiLogger getDefaultLogger()
Get the default message logger.

Returns:
the default message logger.

main

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

Parameters:
args - program arguments

runJPlotResp

public static void runJPlotResp(javax.swing.JFrame programFrameObj,
                                ConfigManager cfgObj,
                                com.isti.util.logging.IstiLogger logger,
                                boolean allowSystemExitFlag,
                                boolean exitFrameDisposeFlag)
Run 'JPlotResp'.

Parameters:
programFrameObj - the frame.
cfgObj - the config manager.
logger - the logger.
allowSystemExitFlag - true to allow system exit, false otherwise.
exitFrameDisposeFlag - true to dispose frame on exit, false otherwise.

exitCleanup

protected void exitCleanup()
Perform cleanup operations before program termination.


exitProgram

protected void exitProgram()
Processing to be done when the program terminates


setupLookAndFeel

protected static void setupLookAndFeel()
Set the current default look and feel.


setupLookAndFeel

protected static void setupLookAndFeel(java.lang.String className)
Set the current default look and feel.

Parameters:
className - a string specifying the name of the class that implements the look and feel