Class JDialogInstallPlugin

All Implemented Interfaces:
DialogDefaultsInterface, ActionListener, FocusListener, ItemListener, WindowListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, RootPaneContainer, WindowConstants

public class JDialogInstallPlugin extends JDialogBase implements ActionListener
Simple dialog to install a plugin. The user selects which .class file to install using a file chooser. The file is copied into MIPAV's class directory and the mipav.preferences file is updated accordingly. The menubars are also updated.
Version:
1.0 July 19, 2000
Author:
Harman Singh, senseneyj
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      Use serialVersionUID for interoperability.
      See Also:
    • fileSystem

      private static FileSystemView fileSystem
      File system view.
    • initTreeLoc

      private static String initTreeLoc
    • files

      private Vector<File> files
      The class, zip, jar etc files that were selected before they were unzipped
    • filesColor

      private Vector<Color> filesColor
      The results of working with the files in a temporary class environment
    • ui

      private ViewUserInterface ui
      The default user interface
    • selectorPanel

      The sub-gui *
    • checkShow

      private JCheckBox checkShow
      Check box for whether to display files that are not likely sources of MIPAV plugins.*
    • checkUnpack

      private JCheckBox checkUnpack
      Check box for unpacking container files
  • Constructor Details

    • JDialogInstallPlugin

      public JDialogInstallPlugin(JFrame theParentFrame)
      Creates new dialog.
      Parameters:
      theParentFrame - Parent frame
  • Method Details

    • getInputStream

      public static InputStream getInputStream(String tarFileName) throws IOException
      DOCUMENT ME!
      Parameters:
      tarFileName - DOCUMENT ME!
      Returns:
      DOCUMENT ME!
      Throws:
      IOException - DOCUMENT ME!
    • readTar

      public static ArrayList<File> readTar(InputStream in, String untarDir) throws IOException
      DOCUMENT ME!
      Parameters:
      in - DOCUMENT ME!
      untarDir - DOCUMENT ME!
      Throws:
      IOException - DOCUMENT ME!
    • actionPerformed

      public void actionPerformed(ActionEvent event)
      Calls various methods depending on the action.
      Specified by:
      actionPerformed in interface ActionListener
      Overrides:
      actionPerformed in class JDialogBase
      Parameters:
      event - event that triggered function
    • installPlugins

      private void installPlugins()
    • gatherDependents

      private Class[] gatherDependents(Class c)
      Gets the dependents of a given class, defined as those classes which exist solely in the pluginDir path and should be uninstalled.
      Parameters:
      c -
      Returns:
    • gatherSubClassDependents

      private ArrayList<Class> gatherSubClassDependents(Class c, int level)
      Attempts to go no further than third level.
      Parameters:
      c -
      level -
      Returns:
    • init

      private void init()
      Sets up GUI dialog.
    • moveFiles

      private ArrayList<File> moveFiles()
    • removeFiles

      private void removeFiles(ArrayList<File> allFiles)
    • removeEmptyDirs

      private void removeEmptyDirs()
    • isInPluginFolder

      @Deprecated private boolean isInPluginFolder(String className)
      Deprecated.
      Use PluginUtil method.
      Determines whether the className is in the plugin folder.
      Parameters:
      className -
      Returns:
    • isInPluginFolder

      @Deprecated private boolean isInPluginFolder(Class c)
      Deprecated.
      Use PluginUtil method.
      Determines whether c is in the current plugin folder.
      Parameters:
      c -
      Returns:
    • isPluginClass

      @Deprecated public static final boolean isPluginClass(Class c)
      Deprecated.
      Use PluginUtil methods.
      Returns whether the given class is a MIPAV/ImageJ plugin.
      Parameters:
      c - A class.
      Returns:
      True, if the given class is a MIPAV/ImageJ plugin.
    • isMipavPluginClass

      @Deprecated public static final boolean isMipavPluginClass(Class c)
      Deprecated.
      Use PluginUtil methods.
      Returns whether the given class is a MIPAV plugin.
      Parameters:
      c - A class.
      Returns:
      True, if the given class is a MIPAV plugin.
    • isImageJPluginClass

      @Deprecated public static final boolean isImageJPluginClass(Class c)
      Deprecated.
      Use PluginUtil methods.
      Returns whether the given class is an ImageJ plugin.
      Parameters:
      c - A class.
      Returns:
      True, if the given class is an ImageJ plugin.
    • examineClass

      private boolean examineClass(Class c)
    • buildColorTable

      private Vector<Color> buildColorTable(Vector<File> allFiles)
      Attempted to find dependencies of used files after they were temporarily added to the class path (included unpacking jars)
      Parameters:
      allFiles -
      Returns:
      See Also: