|
JTablet 1.2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cello.jtablet.installer.JTabletExtension
public class JTabletExtension
This class provides a system for JTablet version compatibility for Applets and Applications. Even if you are bundling JTablet in your product, an older version of JTablet installed as an extension will override and potentially conflict with your program. This class provides three mechanisms for dynamically understanding the situation:
checkCompatibility(Component, String)
to ensure any installed JTablet is compatible.
This will display a simple (English) GUI asking the user to upgrade if they have an older version installed.getInstallStatus(String)
to determine the installation status (such as if an upgrade is required) and
call install(Component, String)
to perform the install itself.getInstalledVersion()
to determine the exact versio of JTablet installed.For the best user experience, choose the earliest version of JTablet that makes sense for your application.
Nested Class Summary | |
---|---|
static class |
JTabletExtension.InstallStatus
Describes the current install state as returned by getInstallStatus(String) . |
Constructor Summary | |
---|---|
JTabletExtension()
|
Method Summary | |
---|---|
static boolean |
checkCompatibility(Component parentComponent,
String desiredMinimumVersion)
Checks the installed version of JTablet, and displays a message to the user if an incompatible version is found. |
static String |
getInstalledVersion()
Returns the currently installed version of JTablet. |
static JTabletExtension.InstallStatus |
getInstallStatus(String desiredMinimumVersion)
Checks the installed version of JTablet and determines if an upgrade is required. |
static boolean |
install(Component parentComponent,
String desiredMinimumVersion)
Opens up a web-page to install (or upgrade) JTablet (if necessary). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JTabletExtension()
Method Detail |
---|
public static String getInstalledVersion()
public static JTabletExtension.InstallStatus getInstallStatus(String desiredMinimumVersion)
desiredMinimumVersion
- the version of JTablet to compare to
public static boolean install(Component parentComponent, String desiredMinimumVersion) throws IOException
In the future, this method may do a silent/in-place install if called prior to loading any JTablet classes.
parentComponent
- the parent component for showing UI messagesdesiredMinimumVersion
- the minimum version of JTablet to install, or null to install regardless
IOException
- if there was a problem attempting to do an upgradepublic static boolean checkCompatibility(Component parentComponent, String desiredMinimumVersion)
Note: This method will still return true if JTablet is not installed. If you want to require JTablet be installed, you should use JTablet as an extension.
parentComponent
- the component to launch the UI from (this is used to detect Applets)desiredMinimumVersion
- the minimum version of JTablet required for the upgrade
(you may get a later version)
|
JTablet 1.2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |