goog.tweak.BooleanGroup
Provided By | |
---|---|
Extends |
A registry setting that contains a group of boolean subfield, where all entries modify the same query parameter. For example: ?foo=setting1,-setting2
new BooleanGroup( id, description )
Parameters |
|
---|
Instance Methods
this.addCallback( callback ) → void
void
Adds a callback that should be called when the setting has changed (or when an action has been clicked).
Defined by | |||||
---|---|---|---|---|---|
Parameters |
|
this.addChild( boolEntry ) → void
void
Adds the given BooleanSetting to the group.
Parameters |
|
---|
this.assertNotInitialized( funcName ) → void
void
Asserts that this tweak has not been initialized yet.
Defined by | |||||
---|---|---|---|---|---|
Parameters |
|
this.ensureInitialized() → void
void
Applies the default value or query param value if this is the first time that the function has been called.
this.fireCallbacks() → void
void
Calls all registered callbacks.
this.getChildEntries() → Object<?, goog.tweak.BooleanSetting>
Object<?, goog.tweak.BooleanSetting>
Returns the map of token->boolean settings.
Parameters | None. | ||
---|---|---|---|
Returns |
|
this.getId() → string
string
Defined by | |||
---|---|---|---|
Parameters | None. | ||
Returns |
|
this.getNewValueEncoded() → (string|null)
(string|null)
Returns the value to be used in the query parameter for this tweak.
Overrides | |||
---|---|---|---|
Parameters | None. | ||
Returns |
|
this.getParamName() → (string|null)
(string|null)
Returns the name of the query parameter used for this setting.
Defined by | |||
---|---|---|---|
Parameters | None. | ||
Returns |
|
this.initialize( value ) → void
void
Sets the value of the entry based on the value of the query parameter. Once this is called, configuration settings (associated query parameter, token, etc) may not be changed.
Overrides | |||||
---|---|---|---|---|---|
Parameters |
|
this.isInitializing() → boolean
boolean
Returns whether the setting is currently being initialized.
Defined by | |||
---|---|---|---|
Parameters | None. | ||
Returns |
|
this.isRestartRequired() → boolean
boolean
Returns whether a restart is required for changes to the setting to take effect.
Defined by | |||
---|---|---|---|
Parameters | None. | ||
Returns |
|
this.removeCallback( callback ) → void
void
Removes a callback that was added by addCallback.
Defined by | |||||
---|---|---|---|---|---|
Parameters |
|
this.setInitialQueryParamValue( value ) → void
void
Sets the initial query parameter value for this setting. May not be called after the setting has been initialized.
Defined by | |||||
---|---|---|---|---|---|
Parameters |
|
this.setParamName( value ) → void
void
Sets the name of the query parameter used for this setting. If null is passed the setting will not appear in the top-level query string.
Defined by | |||||
---|---|---|---|---|---|
Parameters |
|
this.setRestartRequired( value ) → void
void
Sets whether a restart is required for changes to the setting to take effect.
Defined by | |||||
---|---|---|---|---|---|
Parameters |
|
Instance Properties
this.description → string
string
A description of what this entry does.
this.initialQueryParamValue → (string|undefined)
(string|undefined)
The value of this setting's query parameter.
this.label → string
string
A descriptive label for the entry.
this.logger → (goog.log.Logger|null)
(goog.log.Logger|null)