Class PluginPreference
- 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.plugin.PluginPreference
-
- All Implemented Interfaces:
PreferenceSetting,TabPreferenceSetting
public final class PluginPreference extends ExtensibleTabPreferenceSetting
Preference settings for plugins.- Since:
- 168
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) classPluginPreference.ConfigureSitesActionThe action for configuring the plugin download sites(package private) classPluginPreference.DownloadAvailablePluginsActionThe action for downloading the list of available pluginsstatic classPluginPreference.FactoryFactory used to create a newPluginPreference.private static classPluginPreference.PluginConfigurationSitesPanel(package private) classPluginPreference.SelectByListActionThe action for selecting the plugins given by a text file compatible to JOSM bug report.(package private) classPluginPreference.UpdateSelectedPluginsActionThe action for updating the list of selected plugins
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.StringHTML_ENDprivate static java.lang.StringHTML_STARTprivate PluginPreferencesModelmodelprivate booleanpluginPreferencesActivatedis set to true if this preference pane has been selected by the userprivate PluginListPanelpnlPluginPreferencesprivate PluginUpdatePolicyPanelpnlPluginUpdatePolicyprivate javax.swing.JScrollPanespPluginPreferencesprivate static java.lang.StringUPDATE_PLUGINS
-
Constructor Summary
Constructors Modifier Constructor Description privatePluginPreference()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static java.awt.ComponentaddButton(javax.swing.JPanel pnl, javax.swing.JButton button, java.lang.String buttonName)voidaddGui(PreferenceTabbedPane gui)Add the GUI elements to the dialog.private voidaddRadioButton(javax.swing.ButtonGroup bg, javax.swing.JPanel pnl, javax.swing.JRadioButton rb, PluginInstallation value)private javax.swing.JPanelbuildActionPanel()static java.lang.StringbuildDownloadSummary(PluginDownloadTask task)Returns the download summary string to be shown.private javax.swing.JPanelbuildPluginListPanel()private javax.swing.JPanelbuildSearchFieldPanel()private voidconfigureSites()java.lang.StringgetHelpContext()Returns the help context for this preferences settings tab.java.util.List<PluginInformation>getNewlyActivatedPlugins()Replies the list of plugins which have been added by the user to the set of activated pluginsjava.util.Set<PluginInformation>getPluginsScheduledForUpdateOrDownload()Replies the set of plugins waiting for update or downloadstatic voidnotifyDownloadResults(java.awt.Component parent, PluginDownloadTask task, boolean restartRequired)Notifies user about result of a finished plugin download task.booleanok()Called when OK is pressed to save the setting in the preferences file.voidreadLocalPluginInformation()Reads locally available information about plugins from the local file system.-
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
-
HTML_START
private static final java.lang.String HTML_START
- See Also:
- Constant Field Values
-
HTML_END
private static final java.lang.String HTML_END
- See Also:
- Constant Field Values
-
UPDATE_PLUGINS
private static final java.lang.String UPDATE_PLUGINS
-
pnlPluginPreferences
private PluginListPanel pnlPluginPreferences
-
model
private PluginPreferencesModel model
-
spPluginPreferences
private javax.swing.JScrollPane spPluginPreferences
-
pnlPluginUpdatePolicy
private PluginUpdatePolicyPanel pnlPluginUpdatePolicy
-
pluginPreferencesActivated
private boolean pluginPreferencesActivated
is set to true if this preference pane has been selected by the user
-
-
Constructor Detail
-
PluginPreference
private PluginPreference()
-
-
Method Detail
-
buildDownloadSummary
public static java.lang.String buildDownloadSummary(PluginDownloadTask task)
Returns the download summary string to be shown.- Parameters:
task- The plugin download task that has completed- Returns:
- the download summary string to be shown. Contains summary of success/failed plugins.
-
notifyDownloadResults
public static void notifyDownloadResults(java.awt.Component parent, PluginDownloadTask task, boolean restartRequired)
Notifies user about result of a finished plugin download task.- Parameters:
parent- The parent componenttask- The finished plugin download taskrestartRequired- true if a restart is required- Since:
- 6797
-
buildSearchFieldPanel
private javax.swing.JPanel buildSearchFieldPanel()
-
addRadioButton
private void addRadioButton(javax.swing.ButtonGroup bg, javax.swing.JPanel pnl, javax.swing.JRadioButton rb, PluginInstallation value)
-
addButton
private static java.awt.Component addButton(javax.swing.JPanel pnl, javax.swing.JButton button, java.lang.String buttonName)
-
buildActionPanel
private javax.swing.JPanel buildActionPanel()
-
buildPluginListPanel
private javax.swing.JPanel buildPluginListPanel()
-
addGui
public void addGui(PreferenceTabbedPane gui)
Description copied from interface:PreferenceSettingAdd the GUI elements to the dialog. The elements should be initialized after the current preferences.- Specified by:
addGuiin interfacePreferenceSetting- Overrides:
addGuiin classExtensibleTabPreferenceSetting- Parameters:
gui- the preferences tab pane
-
configureSites
private void configureSites()
-
getPluginsScheduledForUpdateOrDownload
public java.util.Set<PluginInformation> getPluginsScheduledForUpdateOrDownload()
Replies the set of plugins waiting for update or download- Returns:
- the set of plugins waiting for update or download
-
getNewlyActivatedPlugins
public java.util.List<PluginInformation> getNewlyActivatedPlugins()
Replies the list of plugins which have been added by the user to the set of activated plugins- Returns:
- the list of newly activated plugins
-
ok
public boolean ok()
Description copied from interface:PreferenceSettingCalled when OK is pressed to save the setting in the preferences file. Return true when restart is required.- Returns:
trueif restart is required
-
readLocalPluginInformation
public void readLocalPluginInformation()
Reads locally available information about plugins from the local file system. Scans cached plugin lists from plugin download sites and locally available plugin jar files.
-
getHelpContext
public java.lang.String getHelpContext()
Description copied from interface:TabPreferenceSettingReturns the help context for this preferences settings tab.- Specified by:
getHelpContextin interfaceTabPreferenceSetting- Overrides:
getHelpContextin classDefaultTabPreferenceSetting- Returns:
- the help context for this preferences settings tab
-
-