org.jivesoftware.sparkimpl.preference.sounds
Class SoundPreference

java.lang.Object
  extended by org.jivesoftware.sparkimpl.preference.sounds.SoundPreference
All Implemented Interfaces:
Preference

public class SoundPreference
extends java.lang.Object
implements Preference

Preferences to handle Sounds played within Spark.

Author:
Derek DeMoro

Field Summary
static java.lang.String NAMESPACE
           
 
Constructor Summary
SoundPreference()
           
 
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.
 SoundPreferences getPreferences()
           
 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 loadFromFile()
           
 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
 

Field Detail

NAMESPACE

public static java.lang.String NAMESPACE
Constructor Detail

SoundPreference

public SoundPreference()
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.

loadFromFile

public void loadFromFile()

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.

getPreferences

public SoundPreferences getPreferences()

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