org.freehep.application.studio.pluginmanager
Class PluginPreferences

java.lang.Object
  extended by org.freehep.application.studio.pluginmanager.PluginPreferences

public class PluginPreferences
extends Object

Plugin manager preferences panel.

Version:
$Id: PluginPreferences.java 14095 2013-01-29 20:57:42Z tonyj $
Author:
tonyj

Constructor Summary
PluginPreferences(PluginManager manager, boolean restore)
          Constructs PluginPreferences object and optionally initializes property values from saved user preferences.
 
Method Summary
 boolean apply(JComponent gui)
          Reads GUI and updates current settings, calls PluginManager setters.
 PluginMap.Orphan getOrphanAction()
          Getter for property orphanAction.
 JComponent getPreferencesPanel()
          Returns GUI panel to be used for setting preferences.
 URL getUrl()
          Getter for property url.
 boolean isCheckAtStart()
          Getter for property checkAtStart.
 boolean isDownloadMissing()
          Getter for property downloadMissingLibs.
 boolean isNotifyPluginUpdates()
          Getter for property notifyPluginUpdates.
 boolean isOrphanPrompt()
          Getter for property orphanPrompt.
 boolean isSnapshots()
          Getter for property snapshots.
 void setCheckAtStart(boolean checkAtStart, boolean save)
           
 void setDownloadMissing(boolean downloadMissing, boolean save)
           
 void setNotifyPluginUpdates(boolean notifyPluginUpdates, boolean save)
           
 void setOrphanAction(PluginMap.Orphan orphanAction, boolean save)
           
 void setOrphanPrompt(boolean orphanPrompt, boolean save)
           
 void setSnapshots(boolean snapshots, boolean save)
           
 void setUrl(URL url, boolean save)
           
 PluginMap.Orphan verifyOrphanAction(EnumMap<PluginDir,ArrayList<LibInfo>> unclaimedLibraries)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PluginPreferences

public PluginPreferences(PluginManager manager,
                         boolean restore)
Constructs PluginPreferences object and optionally initializes property values from saved user preferences.

Method Detail

getUrl

public URL getUrl()
Getter for property url. URL from which the list of available and updatable plugins should be downloaded.


isSnapshots

public boolean isSnapshots()
Getter for property snapshots. If false, the plugin manager will ignore snapshot versions of plugins found in the downloaded list. If true and the plugin list download URL is set to default, "?snapshots=true" will be appended to the URL.


isCheckAtStart

public boolean isCheckAtStart()
Getter for property checkAtStart. If true, the plugin manager will start downloading a list of available and updatable plugins when the application is started.


getOrphanAction

public PluginMap.Orphan getOrphanAction()
Getter for property orphanAction. Options for dealing with unclaimed libraries.


isOrphanPrompt

public boolean isOrphanPrompt()
Getter for property orphanPrompt. If true, the user will be prompted on what to do with unclaimed libraries every time such libraries are discovered.


isNotifyPluginUpdates

public boolean isNotifyPluginUpdates()
Getter for property notifyPluginUpdates. If true, the user should be prompted to download updates to installed plugins if updates are available.


isDownloadMissing

public boolean isDownloadMissing()
Getter for property downloadMissingLibs. If true, the application will try to download missing libraries required by active plugins.


setUrl

public void setUrl(URL url,
                   boolean save)

setSnapshots

public void setSnapshots(boolean snapshots,
                         boolean save)

setCheckAtStart

public void setCheckAtStart(boolean checkAtStart,
                            boolean save)

setOrphanAction

public void setOrphanAction(PluginMap.Orphan orphanAction,
                            boolean save)

setOrphanPrompt

public void setOrphanPrompt(boolean orphanPrompt,
                            boolean save)

setNotifyPluginUpdates

public void setNotifyPluginUpdates(boolean notifyPluginUpdates,
                                   boolean save)

setDownloadMissing

public void setDownloadMissing(boolean downloadMissing,
                               boolean save)

getPreferencesPanel

public JComponent getPreferencesPanel()
Returns GUI panel to be used for setting preferences.


apply

public boolean apply(JComponent gui)
Reads GUI and updates current settings, calls PluginManager setters. The JComponent instance passed to this method must be created by calling getPreferencesPanel().

Returns:
true if valid values were read from GUI.

verifyOrphanAction

public PluginMap.Orphan verifyOrphanAction(EnumMap<PluginDir,ArrayList<LibInfo>> unclaimedLibraries)


Copyright © 2000-2014 FreeHEP. All Rights Reserved.