Package VASSAL
Class Info
java.lang.Object
VASSAL.Info
public final class Info extends Object
Class for storing release-related information
-
Field Summary
Fields Modifier and Type Field Description static StringjavaBinPathDeprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and Type Method Description static intcompareVersions(String v0, String v1)Deprecated, for removal: This API element is subject to removal in a future version.static FilegetBaseDir()Returns the directory where VASSAL is installed.static FilegetBinDir()Deprecated, for removal: This API element is subject to removal in a future version.UsegetBaseDir()instead.static FilegetConfDir()static FilegetDocDir()static FilegetDocsDir()Deprecated, for removal: This API element is subject to removal in a future version.UsegetDocDir()instead.static FilegetErrorLogPath()static FilegetHomeDir()Deprecated, for removal: This API element is subject to removal in a future version.UsegetConfDir()instead.static intgetInstanceID()Returns the instance id for this process.static FilegetJavaBinPath()static StringgetMinorVersion()Deprecated, for removal: This API element is subject to removal in a future version.If you need the minor version number, get it from aVersionTokenizer.static FilegetPrefsDir()static StringgetReportableVersion()Bugzilla (and other potential external reporting tools) require only the primary numeric portion of the version number: e.g., 3.3.3-SNAPSHOT return 3.3.3.static RectanglegetScreenBounds(Component c)Deprecated, for removal: This API element is subject to removal in a future version.static FilegetTempDir()static StringgetVersion()A valid version format is "w.x.y[-z]", where 'w','x', and 'y' are integers and z is a string.static booleanhasOldFormat(String version)static booleanis2dEnabled()Deprecated, for removal: This API element is subject to removal in a future version.since Java 1.4 is now requiredstatic booleanisDndEnabled()Deprecated, for removal: This API element is subject to removal in a future version.Check is no longer necessary since Java 1.4+ is required.static booleanisMacOsX()Deprecated, for removal: This API element is subject to removal in a future version.UseSystemUtils.IS_OS_MAC_OSXinstead.static booleanisMacOSX()Deprecated, for removal: This API element is subject to removal in a future version.UseSystemUtils.IS_OS_MAC_OSXinsteadstatic booleanisModuleTooNew(String version)static booleanisWindows()Deprecated, for removal: This API element is subject to removal in a future version.UseSystemUtils.IS_OS_WINDOWSinsteadstatic voidsetConfig(Config c)
-
Field Details
-
javaBinPath
Deprecated, for removal: This API element is subject to removal in a future version.UsegetJavaBinPath()instead.The path to the JVM binary.
-
-
Method Details
-
setConfig
-
getVersion
A valid version format is "w.x.y[-z]", where 'w','x', and 'y' are integers and z is a string. In the version number, w.x are the major/minor release number, y is the bug-fix release number, and the 'z' identifies an intermediate build: e.g., 3.3.3-alpha1 or 3.3.3-SNAPSHOT- Returns:
- the full version of the VASSAL engine.
-
getMinorVersion
Deprecated, for removal: This API element is subject to removal in a future version.If you need the minor version number, get it from aVersionTokenizer.- Returns:
- The major/minor portion of the release version. If the version is a beta-release number, a 'beta' is appended. For example, the minor version of 3.0.2 is 3.0, and the minor version of 3.0b3 is 3.0beta.
-
getReportableVersion
Bugzilla (and other potential external reporting tools) require only the primary numeric portion of the version number: e.g., 3.3.3-SNAPSHOT return 3.3.3.- Returns:
- The reportable version number
-
getErrorLogPath
- Returns:
- a version-specific errorLog path
-
getJavaBinPath
-
getInstanceID
public static int getInstanceID()Returns the instance id for this process. The instance id will be be unique across the Module Manager and its children. -
getBaseDir
Returns the directory where VASSAL is installed.- Returns:
- a
Filerepresenting the directory
-
getDocDir
-
getConfDir
-
getTempDir
-
getPrefsDir
-
getScreenBounds
@Deprecated(since="2020-10-03", forRemoval=true) public static Rectangle getScreenBounds(Component c)Deprecated, for removal: This API element is subject to removal in a future version.- Returns:
- size of screen accounting for the screen insets (e.g., Windows taskbar)
-
isMacOSX
Deprecated, for removal: This API element is subject to removal in a future version.UseSystemUtils.IS_OS_MAC_OSXinstead -
isMacOsX
Deprecated, for removal: This API element is subject to removal in a future version.UseSystemUtils.IS_OS_MAC_OSXinstead. -
isWindows
Deprecated, for removal: This API element is subject to removal in a future version.UseSystemUtils.IS_OS_WINDOWSinstead -
isModuleTooNew
-
hasOldFormat
-
compareVersions
@Deprecated(since="2020-08-06", forRemoval=true) public static int compareVersions(String v0, String v1)Deprecated, for removal: This API element is subject to removal in a future version.Compares VASSAL version strings. This method is guaranteed to correctly compare the current version string with any other version string. It is not guaranteed to correctly compare two arbitrary version strings.- Returns:
- negative if
v0 < v1, positive ifv0 > v1, and zero ifv0 == v1or if the ordering cannot be determined from the parsable parts of the twoStrings.
-
getDocsDir
Deprecated, for removal: This API element is subject to removal in a future version.UsegetDocDir()instead.Returns the directory where the VASSAL documentation is installed.- Returns:
- a
Filerepresenting the directory
-
getBinDir
Deprecated, for removal: This API element is subject to removal in a future version.UsegetBaseDir()instead. -
getHomeDir
Deprecated, for removal: This API element is subject to removal in a future version.UsegetConfDir()instead. -
isDndEnabled
Deprecated, for removal: This API element is subject to removal in a future version.Check is no longer necessary since Java 1.4+ is required.- Returns:
- true if this platform supports Swing Drag and Drop
-
is2dEnabled
Deprecated, for removal: This API element is subject to removal in a future version.since Java 1.4 is now required- Returns:
- true if this platform supports Java2D
-
getJavaBinPath()instead.