Documentation of 'jas2.util.pluginmanager.AppVersionCheck' Java class
AppVersionCheck
jas2.util.pluginmanager

Class AppVersionCheck

  • All Implemented Interfaces:
    java.awt.event.ActionListener, java.util.EventListener
    Direct Known Subclasses:
    JASVersion


    public class AppVersionCheck
    extends java.lang.Object
    implements java.awt.event.ActionListener
    This class works with the VersionNumberComparison class to check if current version of an application is the latest version. A JPane is created which when added to a JFrame prompts the user to select if they would like to check the application version now, or every time the application starts, or both. If they wish to check the version then they need to decide if they are looking for new developement or production releases. The latest developement and production version numbers are read from the web page referenced by the constructor argument url and is compared to constructor argument current version. Appropriate output messages are generated.
    • Constructor Summary

      Constructors 
      Constructor and Description
      AppVersionCheck(java.lang.String appname, java.lang.String versionURL, java.lang.String currentversion, java.util.Properties userprops)
      The Constructor takes two arguments:
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void actionPerformed(java.awt.event.ActionEvent e) 
      javax.swing.JPanel getVersionCheckOptionPane()
      Returns a JPane which contains three check boxes that allow the user to chose when to check for a new version of the application and if they are looking for develpement or production releases.
      void setUserProperties() 
      void showUpdateDialog(java.awt.Container c, boolean ignoreErrors, boolean ignoreRunningCurrentVersion)
      Call this method to compare versions and generate the resulting dialog panes
      int testCurrentVersion() 
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AppVersionCheck

        public AppVersionCheck(java.lang.String appname,
                               java.lang.String versionURL,
                               java.lang.String currentversion,
                               java.util.Properties userprops)
        The Constructor takes two arguments:
        Parameters:
        c - The container argument is of special interest because it is the container that the JOptionPanes generated in this class are attatched to. If the VersionOptionPane is created then its container should be passed in, other wise the application container should be used.
        versionprops - The Properties object is used to set the current application properties. It should include the following keys:
        appname - is the name of the application
        url - should refer to the location of a web page which contains the version number of the latest developers release on the first line and the latest production release on the second line.
        currentversion - should be the current running version of the application.
        versionselection - sets the current selection for the 'which version' check boxes.
        updateonstartselection - sets whether the user wants to automatically look for updates on start up.
        versioncheckoptionpane - controls whether the JOptionPane which notifies the user that they are currnetly running the latest version should be displayed, if the container used is the one which contains the VersionCheckOptionPane then the message will be displayed, otherwise not.
    • Method Detail

      • getVersionCheckOptionPane

        public javax.swing.JPanel getVersionCheckOptionPane()
        Returns a JPane which contains three check boxes that allow the user to chose when to check for a new version of the application and if they are looking for develpement or production releases.
      • testCurrentVersion

        public int testCurrentVersion()
      • showUpdateDialog

        public void showUpdateDialog(java.awt.Container c,
                                     boolean ignoreErrors,
                                     boolean ignoreRunningCurrentVersion)
        Call this method to compare versions and generate the resulting dialog panes
      • setUserProperties

        public void setUserProperties()
      • actionPerformed

        public void actionPerformed(java.awt.event.ActionEvent e)
        Specified by:
        actionPerformed in interface java.awt.event.ActionListener

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.