public class PlatformHookWindows extends PlatformHookUnixoid implements PlatformHook
PlatformHook implementation for Microsoft Windows systems.PlatformHookUnixoid.FontEntry, PlatformHookUnixoid.LinuxReleaseInfo| Modifier and Type | Field and Description |
|---|---|
private static byte[] |
INSECURE_PUBLIC_KEY |
private static java.lang.String |
WINDOWS_ROOT |
| Constructor and Description |
|---|
PlatformHookWindows() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPrefStartupHook()
The afterPrefStartupHook will be called early, but after
the preferences have been loaded and basic processing of
command line arguments is finished.
|
java.util.Collection<PlatformHookUnixoid.FontEntry> |
getAdditionalFonts()
Get default list of additional fonts to add to the configuration.
|
java.io.File |
getDefaultCacheDirectory()
Returns the platform-dependent default cache directory.
|
java.io.File |
getDefaultPrefDirectory()
Returns the platform-dependent default preferences directory.
|
java.lang.String |
getDefaultStyle()
Returns the default LAF to be used on this platform to look almost as a native application.
|
java.util.Collection<java.lang.String> |
getInstalledFonts()
Get a list of fonts that are installed on the system.
|
java.lang.String |
getOSDescription()
Returns a detailed OS description (at least family + version).
|
static java.security.KeyStore |
getRootKeystore()
Loads Windows-ROOT keystore.
|
void |
initSystemShortcuts()
The initSystemShortcuts hook will be called by the
Shortcut class after the modifier groups have been read
from the config, but before any shortcuts are read from
it or registered from within the application.
|
void |
openUrl(java.lang.String url)
The openURL hook will be used to open an URL in the
default web browser.
|
static void |
removeInsecureCertificates()
Removes potential insecure certificates installed with previous versions of JOSM on Windows.
|
boolean |
rename(java.io.File from,
java.io.File to)
Renames a file.
|
boolean |
setupHttpsCertificate(java.lang.String entryAlias,
java.security.KeyStore.TrustedCertificateEntry trustedCert)
Setup system keystore to add JOSM HTTPS certificate (for remote control).
|
askUpdateJava, askUpdateJava, buildOSDescription, canFullscreen, extendFontconfig, getDefaultUserDataDirectory, getJavaPackageDetails, getPackageDetails, getWebStartPackageDetails, isOpenJDK, makeTooltip, preStartupHook, startupHookclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcanFullscreen, getDefaultUserDataDirectory, makeTooltip, preStartupHook, startupHookprivate static final byte[] INSECURE_PUBLIC_KEY
private static final java.lang.String WINDOWS_ROOT
public PlatformHookWindows()
public void afterPrefStartupHook()
PlatformHookafterPrefStartupHook in interface PlatformHookafterPrefStartupHook in class PlatformHookUnixoidpublic void openUrl(java.lang.String url) throws java.io.IOException
PlatformHookopenUrl in interface PlatformHookopenUrl in class PlatformHookUnixoidurl - The URL to openjava.io.IOException - if any I/O error occurspublic void initSystemShortcuts()
PlatformHookinitSystemShortcuts in interface PlatformHookinitSystemShortcuts in class PlatformHookUnixoidpublic java.lang.String getDefaultStyle()
PlatformHookgetDefaultStyle in interface PlatformHookgetDefaultStyle in class PlatformHookUnixoidpublic boolean rename(java.io.File from, java.io.File to)
PlatformHookrename in interface PlatformHookrename in class PlatformHookUnixoidfrom - Source fileto - Target filetrue if the file has been renamed, false otherwisepublic java.lang.String getOSDescription()
PlatformHookgetOSDescription in interface PlatformHookgetOSDescription in class PlatformHookUnixoidpublic static java.security.KeyStore getRootKeystore() throws java.security.NoSuchAlgorithmException, java.security.cert.CertificateException, java.io.IOException, java.security.KeyStoreException
java.security.NoSuchAlgorithmException - if the algorithm used to check the integrity of the keystore cannot be foundjava.security.cert.CertificateException - if any of the certificates in the keystore could not be loadedjava.io.IOException - if there is an I/O or format problem with the keystore data, if a password is required but not givenjava.security.KeyStoreException - if no Provider supports a KeyStore implementation for the type "Windows-ROOT"public static void removeInsecureCertificates() throws java.security.NoSuchAlgorithmException, java.security.cert.CertificateException, java.security.KeyStoreException, java.io.IOException
java.security.NoSuchAlgorithmException - on unsupported signature algorithmsjava.security.cert.CertificateException - if any of the certificates in the Windows keystore could not be loadedjava.security.KeyStoreException - if no Provider supports a KeyStoreSpi implementation for the type "Windows-ROOT"java.io.IOException - if there is an I/O or format problem with the keystore data, if a password is required but not givenpublic boolean setupHttpsCertificate(java.lang.String entryAlias, java.security.KeyStore.TrustedCertificateEntry trustedCert) throws java.security.KeyStoreException, java.security.NoSuchAlgorithmException, java.security.cert.CertificateException, java.io.IOException
PlatformHooksetupHttpsCertificate in interface PlatformHooksetupHttpsCertificate in class PlatformHookUnixoidentryAlias - The entry alias to usetrustedCert - the JOSM certificate for localhosttrue if something has changed as a result of the call (certificate installation, etc.)java.security.KeyStoreException - in case of errorjava.security.NoSuchAlgorithmException - in case of errorjava.security.cert.CertificateException - in case of errorjava.io.IOException - in case of errorpublic java.io.File getDefaultCacheDirectory()
PlatformHookgetDefaultCacheDirectory in interface PlatformHookgetDefaultCacheDirectory in class PlatformHookUnixoidpublic java.io.File getDefaultPrefDirectory()
PlatformHookgetDefaultPrefDirectory in interface PlatformHookgetDefaultPrefDirectory in class PlatformHookUnixoidpublic java.util.Collection<java.lang.String> getInstalledFonts()
PlatformHookUnixoidPlatformHookUnixoid.extendFontconfig(java.lang.String), have to set system
property first, which is then read by sun.awt.FontConfiguration upon
initialization.)getInstalledFonts in class PlatformHookUnixoidpublic java.util.Collection<PlatformHookUnixoid.FontEntry> getAdditionalFonts()
PlatformHookUnixoidgetAdditionalFonts in class PlatformHookUnixoid