org.jSyncManager.Client
Class AbstractSettingsPanel
JPanelorg.jSyncManager.Client.AbstractSettingsPanel
- ActionListener
public abstract class AbstractSettingsPanel
extends JPanel
implements ActionListener
The Abstract Settings Panel.
This class is the abstract parent of all settings panels.
pluginDescription
protected JEditorPane pluginDescription
An editor pane to hold the plug-ins description.
pluginDescriptionComponent
protected JComponent pluginDescriptionComponent
A handle to the plug-in descriptions component.
pluginSelectionPanel
protected JPanel pluginSelectionPanel
The plug-in selection panel.
pluginSettingsHashMap
protected HashMap pluginSettingsHashMap
A hash map for storing plug-in settings.
pluginSettingsPanel
protected JPanel pluginSettingsPanel
The plug-in settings panel.
preferences
protected RegistrationData preferences
A handle to the application preferences object.
previousSelectedPlugin
protected Object previousSelectedPlugin
A handle to the previously selected plug-in.
AbstractSettingsPanel
public AbstractSettingsPanel(RegistrationData preferences)
Creates a new Abstract Settings Panel.
preferences - a handle to the active application settings object.
actionPerformed
public final void actionPerformed(ActionEvent e)
A method to process action events.
e - the Action Event that triggered this method.
addPluginSettings
protected abstract void addPluginSettings(PluginSettings settings)
Add the specified plug-in settings object to this panel.
settings - the PluginSettings object to add to this panel.
buildPluginDescriptionComponent
protected JComponent buildPluginDescriptionComponent()
Creates a JEditorPane to hold
- the created component containing the description.
buildPluginSelectionPanel
protected abstract JPanel buildPluginSelectionPanel()
Builds the plug-in selection panel.
- the constructed plug-in selection panel.
buildPluginSettingsPanel
protected JPanel buildPluginSettingsPanel()
Build a JPanel to hold information about an installed plugin.
- the constructed JPanel object.
getPreferredSize
public Dimension getPreferredSize()
This is overriden so that the preferred size is the largest preferred size
of any PluginSettings objects that have been added. This ensures that the
JPanel is large enough to accomodate all plugins without resizing.
- the preferred size for this component as a Dimension object.
getSelectedPlugin
protected abstract Object getSelectedPlugin()
Retreives a handle to the selected plug-in.
- a handle to the selected plug-in.
handleActionEvent
public abstract void handleActionEvent(ActionEvent e)
An abstract method to allow sub-classes to process action events.
As this parent class needs to process certain events, sub-classes
that also need to handle their own events should implement this method instead of
actionPerformed. After this class procosses the event, it will be passed onto the
subclass through this method.
e - the Action Event that needs to be processed.
showSelectedPluginSettings
public void showSelectedPluginSettings(Object pluginName)
Once a plugin has been selected, show the settings for it.
pluginName - the plug-in to display.