tweak.TweakUi Extends
A UI for editing tweak settings / clicking tweak actions.

Inheritance

Constructor

goog.tweak.TweakUi(registryopt_domHelper)

Parameters

registry : !goog.tweak.Registry
The registry to render.
opt_domHelper : goog.dom.DomHelper=
The DomHelper to render with.

Instance Methods

Public Protected Private
getRootElement() !Element
No description.
Returns: !Element  The root element. Must not be called before render().
code »
insertEntry_(entry)
Updates the UI with the given entry.
Arguments:
entry : !goog.tweak.BaseEntry
The newly registered entry.
code »
installStyles_()
Installs the required CSS styles.
code »
onNewRegisteredEntry_(entry)
Updates the UI with the given entry.
Arguments:
entry : !goog.tweak.BaseEntry
The newly registered entry.
code »
render() !Element
Creates the element to display when the UI is visible.
Returns: !Element  The root element.
code »
restartWithAppliedTweaks_()
Reloads the page with query parameters set by the UI.
code »

Instance Properties

domHelper_ : goog.dom.DomHelper
The DomHelper to render with.
Code »
entriesPanel_ : goog.tweak.EntriesPanel
The element to display when the UI is visible.
Code »
registry_ : goog.tweak.Registry
The registry to create a UI from.
Code »

Static Methods

goog.tweak.TweakUi.create(opt_domHelper) !Element | undefined
Creates a TweakUi if tweaks are enabled.
Arguments:
opt_domHelper : goog.dom.DomHelper=
The DomHelper to render with.
Returns: !Element | undefined  The root UI element or undefined if tweaks are not enabled.
code »
goog.tweak.TweakUi.createCollapsible(opt_domHelper) !Element | undefined
Creates a TweakUi inside of a show/hide link.
Arguments:
opt_domHelper : goog.dom.DomHelper=
The DomHelper to render with.
Returns: !Element | undefined  The root UI element or undefined if tweaks are not enabled.
code »
goog.tweak.TweakUi.entryCompare_(ab) number
Compares the given entries. Orders alphabetically and groups buttons and expandable groups.
Arguments:
a : goog.tweak.BaseEntry
The first entry to compare.
b : goog.tweak.BaseEntry
The second entry to compare.
Returns: number  Refer to goog.array.defaultCompare.
code »
goog.tweak.TweakUi.extractBooleanGroupEntries_(group) !Array.<!goog.tweak.BaseEntry>
Returns the list of entries from the given boolean group.
Arguments:
group : !goog.tweak.BooleanGroup
The group to get the entries from.
Returns: !Array.<!goog.tweak.BaseEntry>  The sorted entries.
code »
goog.tweak.TweakUi.extractNamespace_(entry) string
No description.
Arguments:
entry : !goog.tweak.BaseEntry
The entry.
Returns: string  Returns the namespace for the entry, or '' if it is not namespaced.
code »
goog.tweak.TweakUi.getNamespacedLabel_(entry) string
No description.
Arguments:
entry : !goog.tweak.BaseEntry
The entry.
Returns: string  Returns the part of the label after the last period, unless the label has been explicly set (it is different from the ID).
code »
goog.tweak.TweakUi.isGroupEntry_(entry) boolean
No description.
Arguments:
entry : !goog.tweak.BaseEntry
The entry.
Returns: boolean  Returns whether the given entry contains sub-entries.
code »

Static Properties

goog.tweak.TweakUi.CSS_STYLES_ :
CSS used by TweakUI.
Code »
goog.tweak.TweakUi.ENTRY_CSS_CLASSES_ :
The CSS classes for each tweak entry div.
Code »
goog.tweak.TweakUi.ENTRY_CSS_CLASS_ :
The CSS class name unique to the tweak entry div.
Code »
goog.tweak.TweakUi.ENTRY_GROUP_CSS_CLASSES_ :
The CSS classes for each namespace tweak entry div.
Code »
goog.tweak.TweakUi.ROOT_PANEL_CLASS_ :
The CSS class name unique to the root tweak panel div.
Code »
goog.tweak.TweakUi.STYLE_SHEET_INSTALLED_MARKER_ :
Marker that the style sheet has already been installed.
Code »

Package tweak

Package Reference