The goog.tweak.BooleanSetting Class

goog.tweak.BooleanSetting
> goog.tweak.BasePrimitiveSetting
> goog.tweak.BaseSetting
> goog.tweak.BaseEntry

goog.tweak.BooleanSetting(id, description)

A registry setting that can be either true of false.

id {string}
The ID for the setting.
description {string}
A description of what the setting does.

.addCallback(callback)

Inherited from goog.tweak.BaseEntry .

Adds a callback that should be called when the setting has changed (or when an action has been clicked).

callback {!Function}
The callback to add.

.fireCallbacks()

Inherited from goog.tweak.BaseEntry .

Calls all registered callbacks.

.getDefaultValue

Returns the default value for this setting.

returns {boolean}
The default value.

.getId()

Inherited from goog.tweak.BaseEntry .

returns {string}
Returns the entry's ID.

.getNewValue

Returns the value of the setting to use once "Apply Tweaks" is clicked.

returns {boolean}
The tweaks's new value.

.getNewValueEncoded()

Inherited from goog.tweak.BasePrimitiveSetting .

Returns the value to be used in the query parameter for this tweak.

returns {?string}
The encoded value. Null if the value is set to its default.

.getParamName()

Inherited from goog.tweak.BaseSetting .

Returns the name of the query parameter used for this setting.

returns {?string}
The param name. Null if no query parameter is directly associated with the setting.

.getValue

If the setting has the restartRequired option, then returns its inital value. Otherwise, returns its current value.

returns {boolean}
The tweaks's value.

.initialize()

.isRestartRequired()

Inherited from goog.tweak.BaseEntry .

Returns whether a restart is required for changes to the setting to take effect.

returns {boolean}
The value.

.removeCallback(callback)

Inherited from goog.tweak.BaseEntry .

Removes a callback that was added by addCallback.

callback {!Function}
The callback to add.

.setDefaultValue

Sets the default value for the tweak.

value {boolean}
The default value.

.setInitialQueryParamValue(value)

Inherited from goog.tweak.BaseSetting .

Sets the initial query parameter value for this setting. May not be called after the setting has been initialized.

value {string}
The inital query parameter value for this setting.

.setParamName(value)

Inherited from goog.tweak.BaseSetting .

Sets the name of the query parameter used for this setting. If null is passed the the setting will not appear in the top-level query string.

value {?string}
The new value.

.setRestartRequired(value)

Inherited from goog.tweak.BaseEntry .

Sets whether a restart is required for changes to the setting to take effect.

value {boolean}
The new value.

.setValue

Sets the value of the setting. If the setting has the restartRequired option, then the value will not be changed until the "Apply Tweaks" button is clicked. If it does not have the option, the value will be update immediately and all registered callbacks will be called.

value {boolean}
The tweaks's value.