|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Observable
org.openstreetmap.josm.gui.preferences.plugin.PluginPreferencesModel
public class PluginPreferencesModel
Field Summary | |
---|---|
private java.util.ArrayList<PluginInformation> |
availablePlugins
|
private java.util.Set<java.lang.String> |
currentActivePlugins
|
private java.util.ArrayList<PluginInformation> |
displayedPlugins
|
private java.lang.String |
filterExpression
|
private java.util.Set<java.lang.String> |
pendingDownloads
|
private java.util.HashMap<PluginInformation,java.lang.Boolean> |
selectedPluginsMap
|
Constructor Summary | |
---|---|
PluginPreferencesModel()
|
Method Summary | |
---|---|
void |
clearPendingPlugins(java.util.Collection<PluginInformation> plugins)
Removes all the plugin in plugins from the list of plugins
with a pending download |
void |
filterDisplayedPlugins(java.lang.String filter)
|
java.util.List<PluginInformation> |
getAvailablePlugins()
Replies the set of all available plugins. |
java.util.List<PluginInformation> |
getDisplayedPlugins()
Replies the list of plugin informations to display |
java.util.Set<java.lang.String> |
getNewlyActivatedPluginNames()
Replies the set of plugin names which have been added by the user to the set of activated plugins. |
java.util.List<PluginInformation> |
getNewlyActivatedPlugins()
Replies the set of plugins which have been added by the user to the set of activated plugins. |
java.util.List<PluginInformation> |
getNewlyDeactivatedPlugins()
Replies the set of plugins which have been removed by the user from the set of activated plugins. |
PluginInformation |
getPluginInformation(java.lang.String name)
Replies the plugin info with the name name . |
java.util.List<PluginInformation> |
getPluginsScheduledForUpdateOrDownload()
Replies the list of plugins waiting for update or download |
java.util.Set<java.lang.String> |
getSelectedPluginNames()
Replies the list of selected plugin information objects |
java.util.List<PluginInformation> |
getSelectedPlugins()
Replies the list of selected plugin information objects |
void |
initFromPreferences()
Initializes the model from preferences |
boolean |
isActivePluginsChanged()
Replies true if the set of active plugins has been changed by the user in this preference model. |
boolean |
isSelectedPlugin(java.lang.String name)
Replies true if the plugin with name name is currently
selected in the plugin model |
void |
refreshLocalPluginVersion(java.util.Collection<PluginInformation> plugins)
Refreshes the local version field on the plugins in plugins with
the version in the manifest of the downloaded "jar.new"-file for this plugin. |
void |
setAvailablePlugins(java.util.Collection<PluginInformation> available)
|
void |
setPluginSelected(java.lang.String name,
boolean selected)
Sets whether the plugin is selected or not. |
protected void |
sort()
Sorts the list of available plugins |
protected void |
updateAvailablePlugin(PluginInformation other)
|
void |
updateAvailablePlugins(java.util.Collection<PluginInformation> fromPluginSite)
Updates the list of plugin information objects with new information from plugin update sites. |
Methods inherited from class java.util.Observable |
---|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final java.util.ArrayList<PluginInformation> availablePlugins
private final java.util.ArrayList<PluginInformation> displayedPlugins
private final java.util.HashMap<PluginInformation,java.lang.Boolean> selectedPluginsMap
private java.util.Set<java.lang.String> pendingDownloads
private java.lang.String filterExpression
private java.util.Set<java.lang.String> currentActivePlugins
Constructor Detail |
---|
public PluginPreferencesModel()
Method Detail |
---|
public void filterDisplayedPlugins(java.lang.String filter)
public void setAvailablePlugins(java.util.Collection<PluginInformation> available)
protected void updateAvailablePlugin(PluginInformation other)
public void updateAvailablePlugins(java.util.Collection<PluginInformation> fromPluginSite)
fromPluginSite
- plugin information read from plugin update sitespublic java.util.List<PluginInformation> getSelectedPlugins()
public java.util.Set<java.lang.String> getSelectedPluginNames()
protected void sort()
public java.util.List<PluginInformation> getDisplayedPlugins()
public java.util.List<PluginInformation> getPluginsScheduledForUpdateOrDownload()
public void setPluginSelected(java.lang.String name, boolean selected)
name
- the name of the pluginselected
- true, if selected; false, otherwisepublic void clearPendingPlugins(java.util.Collection<PluginInformation> plugins)
plugins
from the list of plugins
with a pending download
plugins
- the list of plugins to clear for a pending downloadpublic PluginInformation getPluginInformation(java.lang.String name)
name
. null, if no
such plugin info exists.
name
- the name. If null, replies null.
public void initFromPreferences()
public boolean isSelectedPlugin(java.lang.String name)
name
is currently
selected in the plugin model
name
- the plugin name
public java.util.List<PluginInformation> getNewlyActivatedPlugins()
public java.util.List<PluginInformation> getNewlyDeactivatedPlugins()
public java.util.List<PluginInformation> getAvailablePlugins()
public java.util.Set<java.lang.String> getNewlyActivatedPluginNames()
public boolean isActivePluginsChanged()
public void refreshLocalPluginVersion(java.util.Collection<PluginInformation> plugins)
plugins
with
the version in the manifest of the downloaded "jar.new"-file for this plugin.
plugins
- the collections of plugins to refresh
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |