Class ImageryPreference
- java.lang.Object
-
- org.openstreetmap.josm.gui.preferences.DefaultPreferenceSetting
-
- org.openstreetmap.josm.gui.preferences.DefaultTabPreferenceSetting
-
- org.openstreetmap.josm.gui.preferences.ExtensibleTabPreferenceSetting
-
- org.openstreetmap.josm.gui.preferences.imagery.ImageryPreference
-
- All Implemented Interfaces:
PreferenceSetting
,TabPreferenceSetting
public final class ImageryPreference extends ExtensibleTabPreferenceSetting
Imagery preferences, including imagery providers, settings and offsets.- Since:
- 3715
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ImageryPreference.Factory
Factory used to create a newImageryPreference
.(package private) static class
ImageryPreference.OffsetBookmarksPanel
-
Field Summary
Fields Modifier and Type Field Description private CacheSettingsPanel
cacheSettingsPanel
private CommonSettingsPanel
commonSettings
private ImageryProvidersPanel
imageryProviders
private ImageryLayerInfo
layerInfo
private TMSSettingsPanel
tmsSettings
private WMSSettingsPanel
wmsSettings
-
Constructor Summary
Constructors Modifier Constructor Description private
ImageryPreference()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addGui(PreferenceTabbedPane gui)
Add the GUI elements to the dialog.private static void
addSettingsSection(javax.swing.JPanel p, java.lang.String name, javax.swing.JPanel section)
private static void
addSettingsSection(javax.swing.JPanel p, java.lang.String name, javax.swing.JPanel section, GBC gbc)
private java.awt.Component
buildSettingsPanel()
java.lang.String
getHelpContext()
Returns the help context for this preferences settings tab.ImageryProvidersPanel
getProvidersPanel()
Returns the imagery providers panel.java.lang.String
getServerUrl(java.lang.String server)
Gets a server URL in the preferences dialog.static void
initialize()
Initializes imagery preferences.private void
loadSettings()
boolean
ok()
Called when OK is pressed to save the setting in the preferences file.void
setServerUrl(java.lang.String server, java.lang.String url)
Updates a server URL in the preferences dialog.-
Methods inherited from class org.openstreetmap.josm.gui.preferences.DefaultTabPreferenceSetting
addSubTab, addSubTab, canBeHidden, createPreferenceTabWithScrollPane, getDescription, getIconName, getSelectedSubTab, getSubTab, getTabPane, getTitle, getTooltip, registerSubTab, selectSubTab
-
Methods inherited from class org.openstreetmap.josm.gui.preferences.DefaultPreferenceSetting
isExpert, saveBoolean, saveDouble, saveInt
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.openstreetmap.josm.gui.preferences.PreferenceSetting
isExpert
-
Methods inherited from interface org.openstreetmap.josm.gui.preferences.TabPreferenceSetting
getIcon
-
-
-
-
Field Detail
-
imageryProviders
private ImageryProvidersPanel imageryProviders
-
layerInfo
private ImageryLayerInfo layerInfo
-
commonSettings
private final CommonSettingsPanel commonSettings
-
wmsSettings
private final WMSSettingsPanel wmsSettings
-
tmsSettings
private final TMSSettingsPanel tmsSettings
-
cacheSettingsPanel
private final CacheSettingsPanel cacheSettingsPanel
-
-
Constructor Detail
-
ImageryPreference
private ImageryPreference()
-
-
Method Detail
-
addSettingsSection
private static void addSettingsSection(javax.swing.JPanel p, java.lang.String name, javax.swing.JPanel section)
-
addSettingsSection
private static void addSettingsSection(javax.swing.JPanel p, java.lang.String name, javax.swing.JPanel section, GBC gbc)
-
buildSettingsPanel
private java.awt.Component buildSettingsPanel()
-
addGui
public void addGui(PreferenceTabbedPane gui)
Description copied from interface:PreferenceSetting
Add the GUI elements to the dialog. The elements should be initialized after the current preferences.- Specified by:
addGui
in interfacePreferenceSetting
- Overrides:
addGui
in classExtensibleTabPreferenceSetting
- Parameters:
gui
- the preferences tab pane
-
getProvidersPanel
public ImageryProvidersPanel getProvidersPanel()
Returns the imagery providers panel.- Returns:
- The imagery providers panel.
-
loadSettings
private void loadSettings()
-
ok
public boolean ok()
Description copied from interface:PreferenceSetting
Called when OK is pressed to save the setting in the preferences file. Return true when restart is required.- Returns:
true
if restart is required
-
setServerUrl
public void setServerUrl(java.lang.String server, java.lang.String url)
Updates a server URL in the preferences dialog. Used by plugins.- Parameters:
server
- The server nameurl
- The server URL
-
getServerUrl
public java.lang.String getServerUrl(java.lang.String server)
Gets a server URL in the preferences dialog. Used by plugins.- Parameters:
server
- The server name- Returns:
- The server URL
-
initialize
public static void initialize()
Initializes imagery preferences.
-
getHelpContext
public java.lang.String getHelpContext()
Description copied from interface:TabPreferenceSetting
Returns the help context for this preferences settings tab.- Specified by:
getHelpContext
in interfaceTabPreferenceSetting
- Overrides:
getHelpContext
in classDefaultTabPreferenceSetting
- Returns:
- the help context for this preferences settings tab
-
-