goog.tweak.StringSetting
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.assertNotInitialized( funcName ) → void
void
Asserts that this tweak has not been initialized yet.
Defined by | |||||
---|---|---|---|---|---|
Parameters |
|
this.encodeNewValue() → string
string
Returns the query param encoded representation of the setting's value.
Overrides | |||
---|---|---|---|
Parameters | None. | ||
Returns |
|
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.getDefaultValue() → string
string
Returns the default value for this setting.
Overrides | |||
---|---|---|---|
Parameters | None. | ||
Returns |
|
this.getId() → string
string
Defined by | |||
---|---|---|---|
Parameters | None. | ||
Returns |
|
this.getNewValue() → string
string
Returns the value of the setting to use once "Apply Tweaks" is clicked.
Overrides | |||
---|---|---|---|
Parameters | None. | ||
Returns |
|
this.getNewValueEncoded() → (string|null)
(string|null)
Returns the value to be used in the query parameter for this tweak.
Defined by | |||
---|---|---|---|
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.getValue() → string
string
If the setting has the restartRequired option, then returns its initial value. Otherwise, returns its current value.
Overrides | |||
---|---|---|---|
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.setDefaultValue( value ) → void
void
Sets the default value for the tweak.
Overrides | |||||
---|---|---|---|---|---|
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 |
|
this.setValidValues( values ) → void
void
this.setValue( value ) → void
void
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.
Overrides | |||||
---|---|---|---|---|---|
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)
Valid values for the setting.