org.jivesoftware.sparkimpl.preference.notifications
Class NotificationsPreference

java.lang.Object
  extended by org.jivesoftware.sparkimpl.preference.notifications.NotificationsPreference
All Implemented Interfaces:
Preference

public class NotificationsPreference
extends java.lang.Object
implements Preference

Handles the preferences for notification behavior within the Spark IM Client.

Author:
Derek DeMoro

Field Summary
static java.lang.String NAMESPACE
          Define the Namespace used for this preference.
 
Constructor Summary
NotificationsPreference()
           
 
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
 

Field Detail

NAMESPACE

public static final java.lang.String NAMESPACE
Define the Namespace used for this preference.

See Also:
Constant Field Values
Constructor Detail

NotificationsPreference

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

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.

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.

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.

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

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.

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.

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.

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.

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.

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