org.jivesoftware.spark.filetransfer.preferences
Class FileTransferPreference

java.lang.Object
  extended by org.jivesoftware.spark.filetransfer.preferences.FileTransferPreference
All Implemented Interfaces:
Preference

public class FileTransferPreference
extends java.lang.Object
implements Preference


Constructor Summary
FileTransferPreference()
           
 
Method Summary
 void commit()
          Called whenever the preference should be saved.
 java.lang.Object getData()
          Returns the data model representing this preference.
 java.lang.String getErrorMessage()
          The error message to display if #isDataDisplayed returns false.
 javax.swing.JComponent getGUI()
          Return the UI to display whenever this preference is selected in the preference dialog.
 javax.swing.Icon getIcon()
          Return the icon to use inside the Preferences list.
 java.lang.String getListName()
          Return the title to use inside the Preferences list.
 java.lang.String getNamespace()
          Returns the associated namespace of this preference.
 java.lang.String getTitle()
          Return the title to use in the preference window.
 java.lang.String getTooltip()
          Return the tooltip to use for this preference.
 boolean isDataValid()
          Return true if the data supplied is valid, otherwise return false.
 void load()
          Called whenever the preference is invoked from the Preference list.
 void shutdown()
          Called when Spark is closing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileTransferPreference

public FileTransferPreference()
Method Detail

getTitle

public java.lang.String getTitle()
Description copied from interface: Preference
Return the title to use in the preference window.

Specified by:
getTitle in interface Preference
Returns:
the title to use inside the preferences list.

getIcon

public javax.swing.Icon getIcon()
Description copied from interface: Preference
Return the icon to use inside the Preferences list. The standard icon size for preferences is 24x24.

Specified by:
getIcon in interface Preference
Returns:
the icon to use inside the Preferences list.

getTooltip

public java.lang.String getTooltip()
Description copied from interface: Preference
Return the tooltip to use for this preference. The tooltip is displayed whenever a user places their mouse cursor over the icon.

Specified by:
getTooltip in interface Preference
Returns:
the tooltip to display.

getListName

public java.lang.String getListName()
Description copied from interface: Preference
Return the title to use inside the Preferences list. The title is displayed below and centered of the icon.

Specified by:
getListName in interface Preference
Returns:
the title to use inside the preferences list.

getNamespace

public java.lang.String getNamespace()
Description copied from interface: Preference
Returns the associated namespace of this preference.

Specified by:
getNamespace in interface Preference
Returns:
the associated namespace of this preference.

getGUI

public javax.swing.JComponent getGUI()
Description copied from interface: Preference
Return the UI to display whenever this preference is selected in the preference dialog.

Specified by:
getGUI in interface Preference
Returns:
the UI to display when this preference is selected.

load

public void load()
Description copied from interface: Preference
Called whenever the preference is invoked from the Preference list.

Specified by:
load in interface Preference

commit

public void commit()
Description copied from interface: Preference
Called whenever the preference should be saved.

Specified by:
commit in interface Preference

isDataValid

public boolean isDataValid()
Description copied from interface: Preference
Return true if the data supplied is valid, otherwise return false.

Specified by:
isDataValid in interface Preference
Returns:
true if the data supplied is valid.

getErrorMessage

public java.lang.String getErrorMessage()
Description copied from interface: Preference
The error message to display if #isDataDisplayed returns false.

Specified by:
getErrorMessage in interface Preference
Returns:
the error message to display.

getData

public java.lang.Object getData()
Description copied from interface: Preference
Returns the data model representing this preference.

Specified by:
getData in interface Preference
Returns:
the data model representing this preference.

shutdown

public void shutdown()
Description copied from interface: Preference
Called when Spark is closing. This should be used to persist any information at that time.

Specified by:
shutdown in interface Preference