jSyncManager

org.jSyncManager.Client
Class PluginSettings

java.lang.Object
  extended byorg.jSyncManager.Client.PluginSettings

public class PluginSettings
extends java.lang.Object

Plugin Settings Panel. Encapsulates all of the settings information for a plugin.

Version:
$Revision: 3.2 $
Author:
Ian DALLAS
Last modified by: $Author: yaztromo $ on $Date: 2004/07/14 04:31:15 $.

Field Summary
protected  java.lang.Object associatedObject
           
 
Constructor Summary
PluginSettings()
          Create a new plug-in settings instance.
 
Method Summary
 void addField(javax.swing.JComponent field)
          Adds the specified field to this plug-ins panel.
 void addField(javax.swing.JComponent field, javax.swing.JLabel label)
          Adds the specified field to the JPanel.
 void addField(javax.swing.JComponent field, java.lang.String labelText)
          Adds the specified field with the specified label to this plug-ins panel.
 java.lang.Object getAssociation()
          Retreives the object associated with this plugin settings.
 java.lang.String getDescription()
          Returns a description of the plugin which may optionally be in HTML format.
protected  javax.swing.JPanel getFieldsAndDescriptionJPanel()
          Returns the combined fields and description panel.
 javax.swing.JPanel getFieldsJPanel()
          Retreives the JPanel containing this plug-ins fields.
 java.lang.String getName()
          Returns the name of the plugin.
 void saveChanges()
          Notifies that plugin that settings have been changed and accepted.
 void setAssociation(java.lang.Object obj)
          Sets the object associated with this plugin settings.
 void setDescription(java.lang.String value)
          Sets a description of the plugin which may optionally be in HTML format.
 void setFieldsJPanel(javax.swing.JPanel panel)
          Optional method intended for developers who wish to handle the layout of individual fields themselves.
 void setName(java.lang.String value)
          Sets the name of the plugin.
 void undoChanges()
          Called when a user edits fields and decides to cancel their changes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

associatedObject

protected java.lang.Object associatedObject
Constructor Detail

PluginSettings

public PluginSettings()
Create a new plug-in settings instance.

Method Detail

setFieldsJPanel

public void setFieldsJPanel(javax.swing.JPanel panel)
Optional method intended for developers who wish to handle the layout of individual fields themselves. Otherwise developers can use the addField() methods.


getFieldsJPanel

public javax.swing.JPanel getFieldsJPanel()
Retreives the JPanel containing this plug-ins fields.

Returns:
the JPanel containing this plug-ins fields.

getFieldsAndDescriptionJPanel

protected javax.swing.JPanel getFieldsAndDescriptionJPanel()
Returns the combined fields and description panel.

Returns:
the combined fields and description panel.

getName

public java.lang.String getName()
Returns the name of the plugin.

Returns:
the name of the plugin.

setName

public void setName(java.lang.String value)
Sets the name of the plugin.

Parameters:
value - the name of the plugin.

getDescription

public java.lang.String getDescription()
Returns a description of the plugin which may optionally be in HTML format.

Returns:
a description of the plugin which may optionally be in HTML format.

setDescription

public void setDescription(java.lang.String value)
Sets a description of the plugin which may optionally be in HTML format.

Parameters:
value - a description of the plugin which may optionally be in HTML format.

addField

public void addField(javax.swing.JComponent field)
Adds the specified field to this plug-ins panel.

Parameters:
field - the field to this plug-ins panel.

addField

public void addField(javax.swing.JComponent field,
                     java.lang.String labelText)
Adds the specified field with the specified label to this plug-ins panel.

Parameters:
field - the field to this plug-ins panel.
labelText - the label to associate with this field.

addField

public void addField(javax.swing.JComponent field,
                     javax.swing.JLabel label)
Adds the specified field to the JPanel. All fields will be arranged in columns with labels on the left and fields on the right.

Parameters:
field - the field to this plug-ins panel.
label - the label to associate with this field.

saveChanges

public void saveChanges()
Notifies that plugin that settings have been changed and accepted.


undoChanges

public void undoChanges()
Called when a user edits fields and decides to cancel their changes. Fields should revert to their state at the time of the last saveChanges() call.


setAssociation

public void setAssociation(java.lang.Object obj)
Sets the object associated with this plugin settings.

Parameters:
obj - the object to assciate with this PluginSettings object.

getAssociation

public java.lang.Object getAssociation()
Retreives the object associated with this plugin settings.

Returns:
the object associated with this plugin settings.

jSyncManager

Copyright (c) 1999 - 2004 Brad BARCLAY and others. All Rights Reserved.