public interface PlatformHook
Modifier and Type | Method and Description |
---|---|
boolean |
canFullscreen()
Determines if the platform allows full-screen.
|
java.lang.String |
getDefaultStyle()
Returns the default LAF to be used on this platform to look almost as a native application.
|
java.lang.String |
getOSDescription()
Returns a detailed OS description (at least family + version).
|
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.
|
java.lang.String |
makeTooltip(java.lang.String name,
Shortcut sc)
The makeTooltip hook will be called whenever a tooltip for
a menu or button is created.
|
void |
openUrl(java.lang.String url)
The openURL hook will be used to open an URL in the
default web browser.
|
void |
preStartupHook()
The preStartupHook will be called extremly early.
|
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).
|
void |
startupHook()
The startupHook will be called early, but after the GUI
setup has started.
|
void preStartupHook()
void startupHook()
void openUrl(java.lang.String url) throws java.io.IOException
url
- The URL to openjava.io.IOException
- if any I/O error occursvoid initSystemShortcuts()
java.lang.String makeTooltip(java.lang.String name, Shortcut sc)
name
- Tooltip text to displaysc
- Shortcut associated (to display accelerator between parenthesis)java.lang.String getDefaultStyle()
boolean canFullscreen()
true
if full screen is allowed, false
otherwiseboolean rename(java.io.File from, java.io.File to)
from
- Source fileto
- Target filetrue
if the file has been renamed, false
otherwisejava.lang.String getOSDescription()
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
entryAlias
- 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.io.IOException
- in case of errorjava.security.cert.CertificateException
- in case of errorjava.security.NoSuchAlgorithmException
- in case of error