Class InstallPear

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants

public class InstallPear extends JFrame
This GUI is used to install a pear file locally in a directory chosen by the user and then run the installed AE in CVD.
The required field is : The pear file must be specified. The User may or may not specify the installation directory. If the installation directory is not specified, the current working directory is used by default.
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      The Constant serialVersionUID.
      See Also:
    • pearFileTextField

      private JTextField pearFileTextField
      The pear file text field.
    • browseButton

      private JButton browseButton
      The browse button.
    • installDirTextField

      private static JTextField installDirTextField
      The install dir text field.
    • browseDirButton

      private JButton browseDirButton
      The browse dir button.
    • installButton

      private JButton installButton
      The install button.
    • fileMenuItem

      private JMenuItem fileMenuItem
      The file menu item.
    • helpMenuItem

      private JMenuItem helpMenuItem
      The help menu item.
    • aboutMenuItem

      private JMenuItem aboutMenuItem
      The about menu item.
    • fileMenu

      private JMenu fileMenu
      The file menu.
    • helpMenu

      private JMenu helpMenu
      The help menu.
    • runButton

      private static JButton runButton
      The run button.
    • helpButton

      private JButton helpButton
      The help button.
    • pearConsole

      private static JTextArea pearConsole
      The pear console.
    • jScrollPane

      private static JScrollPane jScrollPane
      The j scroll pane.
    • localTearFile

      private static File localTearFile
      The local tear file.
    • installationDir

      private static File installationDir
      The installation dir.
    • mainComponentId

      private static String mainComponentId
      The main component id.
    • insdObject

      private static InstallationDescriptor insdObject
      The insd object.
    • mainComponentRootPath

      private static String mainComponentRootPath
      The main component root path.
    • helpExists

      private static boolean helpExists
      The help exists.
    • message

      private static String message
      The message.
    • errorFlag

      private static boolean errorFlag
      The error flag.
    • userPrefs

      private static Preferences userPrefs
      The user prefs.
    • LAST_FILE_NAME_CHOOSEN_KEY

      private static final String LAST_FILE_NAME_CHOOSEN_KEY
      The Constant LAST_FILE_NAME_CHOOSEN_KEY.
      See Also:
    • LAST_DIRECTORY_CHOOSEN_KEY

      private static final String LAST_DIRECTORY_CHOOSEN_KEY
      The Constant LAST_DIRECTORY_CHOOSEN_KEY.
      See Also:
    • SET_ENV_FILE

      private static final String SET_ENV_FILE
      The Constant SET_ENV_FILE.
      See Also:
  • Constructor Details

    • InstallPear

      public InstallPear()
      This is the default constructor.
  • Method Details

    • selectPear

      private String selectPear()
      Opens a dialog to select a PEAR file from the local file system.
      Returns:
      Selected PEAR file path, or null, if nothing was selected.
    • selectDir

      private String selectDir()
      Opens a dialog to select a directory for PEAR file installation.
      Returns:
      Selected installation directory path, or current directory path, if nothing was selected.
    • installPear

      private static void installPear(File localPearFile, File installationDir)
      Method that installs the given PEAR file to the given installation directory.
      Parameters:
      localPearFile - The given PEAR file path.
      installationDir - The given installation directory.
    • runCVD

      private void runCVD()
      This method runs the installed AE in CVD (Gladis).
    • getPearFileTextField

      private JTextField getPearFileTextField()
      This method initializes the pearFile TextField.
      Returns:
      The initialized pearFile TextField.
    • getbrowseButton

      private JButton getbrowseButton()
      This method initializes the Browse Button.
      Returns:
      The initialized Browse Button.
    • getInstallDirTextField

      private JTextField getInstallDirTextField()
      This method initializes installDirTextField.
      Returns:
      The initialized installDirTextField.
    • getBrowseDirButton

      private JButton getBrowseDirButton()
      This method initializes the browseDir Button.
      Returns:
      The initialized browseDir Button.
    • getInstallButton

      private JButton getInstallButton()
      This method initializes the Install Button.
      Returns:
      The initialized Install Button.
    • getRunButton

      private JButton getRunButton()
      This method initializes 'Run your AE in CVD' Button.
      Returns:
      The initialized 'Run your AE in CVD' Button.
    • getPearConsole

      private JTextArea getPearConsole()
      This method initializes pearConsole.
      Returns:
      The initialized pearConsole.
    • printInConsole

      private static void printInConsole(boolean errorFlag, String message)
      Prints messages and set foreground color in the console according to a given errorFlag.
      Parameters:
      errorFlag - The given error flag.
      message - The given message to print.
    • getJScrollPane

      private JScrollPane getJScrollPane()
      This method initializes the Scroll Pane.
      Returns:
      The initialized Scroll Pane.
    • getHelpButton

      private JButton getHelpButton()
      This method initializes the help Button.
      Returns:
      The initialized help Button.
    • createAndShowGUI

      private static void createAndShowGUI()
      Method to create and display the frame.
    • main

      public static void main(String[] args)
      Starts the GUI application.
      Parameters:
      args - None.
    • initialize

      private void initialize()
      This method initializes the frame.