Module: explorer/widgets/gadgetarea/PreferencesDialog

explorer/widgets/gadgetarea/PreferencesDialog

A modal window that serves as a UI for the Preferences Gadget example.
Source:

Extends

Requires

Methods

addPrefsChangedListener(listener)

Adds a listener function to the instance variable prefsChangedListeners.
Parameters:
Name Type Description
listener Function A callback function that updates the prefs and rerenders the gadget.
Source:

addPrefsToUI()

Adds the prefs gadget's metadata to the modal.
Source:

addPrefToUI()

Adds each pref in prefs to the modal.
Source:

destroy()

Destroys the PreferencesDialog.
Source:

getPrefs() → {Object}

Gets the prefs from the control groups.
Source:
Returns:
The prefs object assembled from the control groups.
Type
Object

isValid() → {Boolean}

Checks whether the prefs' fields are valid (has values).
Source:
Returns:
Whether or not the fields are valid.
Type
Boolean

notifyPrefsChangedListeners()

Adds each pref in prefs to the modal.
Source:

postCreate()

Called right before widget is added to the dom. See link for more information.
Source:
See:

setPrefs(prefs)

Sets each control group that exists in a spec's prefs.
Parameters:
Name Type Description
prefs Object The prefs object in a gadget's metadata.
Source:

startup()

Called right after widget is added to the dom. See link for more information.
Source:
See: