Class JaxoInfo
java.lang.Object
net.sf.jaxodraw.util.JaxoInfo
Collects system data and practical infos about JaxoDraw.
- Since:
- 2.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringExtension of JaxoDraw data files, with a preceding dot.static final StringExtension of JaxoDraw data files.static final StringThe current Java class path.static final StringThe directory where Java is installed on the current machine.static final StringThe current Java runtime version.static final StringThe current Java version.static final StringThe absolute path of the directory where log records are stored.static final StringThe architecture of the current operating system.static final StringThe name of the current operating system.static final StringThe version of the current operating system.static final StringThe absolute path of the directory where plugins are stored.static final DimensionThe screen size.static final StringThe absolute path of the directory where user settings are stored.static final StringThe current user's home directory.static final StringThe current user.static final StringThe current version of JaxoDraw.static final StringThe version number of this release of JaxoDraw.static final StringThe JaxoDraw web site. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringReturns a string with some 'About' infos.static intcompareVersion(String version) Compares the given version String to the current version of JaxoDraw.static intcompareVersions(String v1, String v2) Compares two version Strings.static Stringhelp()Returns a help message.static Stringinfo()Returns an info message.static StringsysInfo()Returns a string with some system infos.
-
Field Details
-
USER_NAME
The current user. -
USER_HOME
The current user's home directory. -
OS_NAME
The name of the current operating system. -
OS_ARCH
The architecture of the current operating system. -
OS_VERSION
The version of the current operating system. -
JAVA_VERSION
The current Java version. -
JAVA_RUNTIME_VERSION
The current Java runtime version. -
JAVA_HOME
The directory where Java is installed on the current machine. -
JAVA_CLASSPATH
The current Java class path. -
SCREEN_SIZE
The screen size. -
VERSION_NUMBER
The version number of this release of JaxoDraw. -
VERSION
The current version of JaxoDraw. -
WEB_SITE
-
EXTENSION
-
DOT_EXTENSION
Extension of JaxoDraw data files, with a preceding dot.- See Also:
-
SETTINGS_DIR
The absolute path of the directory where user settings are stored. -
PLUGIN_DIR
The absolute path of the directory where plugins are stored. -
LOG_DIR
The absolute path of the directory where log records are stored.
-
-
Method Details
-
help
-
info
-
sysInfo
Returns a string with some system infos.- Returns:
- a translated string.
-
about
-
compareVersion
Compares the given version String to the current version of JaxoDraw. SeecompareVersionsfor a specification of a valid version String.- Parameters:
version- the version to compare to. If this is null, +1 is returned, ie the current version is assumed greater.- Returns:
- 0 if the two versions are equal, a value less than 0 if the current version is smaller than the given one, a value greater than 0 if the current version is greater than the given one,
-
compareVersions
Compares two version Strings.A valid version String must be of the form
major.minor[.bugfix][-qualifier]
where the quantities in square brackets are optional. The major, minor and bugfix parts have to be non-negative integers.For the comparison, the major, minor and bugfix arguments are compared as integers in this order. The first ocurring inequality is returned. A missing bugfix counts as 0.
If all integers are equal, the qualifiers are compared lexigraphically as Strings. If one version has a qualifier while the other has none, the version with the qualifier is considered smaller.
Examples:
3.0.1 > 2.10.221
3.0-SNAPSHOT < 3.0
2.1.0 == 2.1
1.2.3-abc < 1.2.3-xyz
- Parameters:
v1- the first version to compare. Cannot be null.v2- the second version to compare. Cannot be null.- Returns:
- 0 if the two versions are equal, a value less than 0 if v1 is smaller than v2, a value greater than 0 if v1 is greater than v2.
-