| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 11 | 2 | 2 | 0.990 | ExpressionStatement |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 11 | 342 | Closure/closure/goog/ui/editor/toolbarfactory.js |
| 2 | 11 | 413 | Closure/closure/goog/ui/editor/toolbarfactory.js |
| ||||
/**
* Creates a menu button with the given ID, tooltip, and caption. Applies
* any custom CSS class names to the button's caption element. The button
* returned doesn't have an actual menu attached; use {@link
* goog.ui.MenuButton#setMenu} to attach a {@link goog.ui.Menu} to the
* button.
* @param {string} id Button ID; must equal a {@link goog.editor.Command} for
* built-in buttons, anything else for custom buttons.
* @param {string} tooltip Tooltip to be shown on hover.
* @param {goog.ui.ControlContent} caption Button caption.
* @param {string=} opt_classNames CSS class name(s) to apply to the caption
* element.
* @param {goog.ui.ButtonRenderer=} opt_renderer Button renderer; defaults to
* {@link goog.ui.ToolbarMenuButtonRenderer} if unspecified.
* @param {goog.dom.DomHelper=} opt_domHelper DOM helper, used for DOM
* creation; defaults to the current document if unspecified.
* @return {!goog.ui.MenuButton} A menu button.
*/
goog.ui.editor.ToolbarFactory.makeMenuButton= function (id, tooltip, caption,
opt_classNames, opt_renderer, opt_domHelper){
var button= new goog.ui.ToolbarMenuButton(
goog.ui.editor.ToolbarFactory.createContent_(caption, opt_classNames,
opt_domHelper),
null,
opt_renderer,
opt_domHelper);
button.setId(id);
button.setTooltip(tooltip);
return button;
} ;
|
| ||||
/**
* Creates a color menu button with the given ID, tooltip, and caption.
* Applies any custom CSS class names to the button's caption element. The
* button is created with a default color menu containing standard color
* palettes.
* @param {string} id Button ID; must equal a {@link goog.editor.Command} for
* built-in toolbar buttons, but can be anything else for custom buttons.
* @param {string} tooltip Tooltip to be shown on hover.
* @param {goog.ui.ControlContent} caption Button caption.
* @param {string=} opt_classNames CSS class name(s) to apply to the caption
* element.
* @param {goog.ui.ColorMenuButtonRenderer=} opt_renderer Button renderer;
* defaults to {@link goog.ui.ToolbarColorMenuButtonRenderer}
* if unspecified.
* @param {goog.dom.DomHelper=} opt_domHelper DOM helper, used for DOM
* creation; defaults to the current document if unspecified.
* @return {!goog.ui.ColorMenuButton} A color menu button.
*/
goog.ui.editor.ToolbarFactory.makeColorMenuButton= function (id, tooltip,
caption, opt_classNames, opt_renderer, opt_domHelper){
var button= new goog.ui.ToolbarColorMenuButton(
goog.ui.editor.ToolbarFactory.createContent_(caption, opt_classNames,
opt_domHelper),
null,
opt_renderer,
opt_domHelper);
button.setId(id);
button.setTooltip(tooltip);
return button;
} ;
|
| |||
/**
* Creates a color menu button with the given ID, tooltip, and caption.
* Applies any custom CSS class names to the button's caption element. The
* button is created with a default color menu containing standard color
* palettes.
* @param {string} id Button ID; must equal a {@link goog.editor.Command} for
* built-in toolbar buttons, but can be anything else for custom buttons.
* @param {string} tooltip Tooltip to be shown on hover.
* @param {goog.ui.ControlContent} caption Button caption.
* @param {string=} opt_classNames CSS class name(s) to apply to the caption
* element.
* @param {goog.ui.ColorMenuButtonRenderer=} opt_renderer Button renderer;
* defaults to {@link goog.ui.ToolbarColorMenuButtonRenderer}
* if unspecified.
* @param {goog.dom.DomHelper=} opt_domHelper DOM helper, used for DOM
* creation; defaults to the current document if unspecified.
* @return {!goog.ui.ColorMenuButton} A color menu button.
*/
/**
* Creates a menu button with the given ID, tooltip, and caption. Applies
* any custom CSS class names to the button's caption element. The button
* returned doesn't have an actual menu attached; use {@link
* goog.ui.MenuButton#setMenu} to attach a {@link goog.ui.Menu} to the
* button.
* @param {string} id Button ID; must equal a {@link goog.editor.Command} for
* built-in buttons, anything else for custom buttons.
* @param {string} tooltip Tooltip to be shown on hover.
* @param {goog.ui.ControlContent} caption Button caption.
* @param {string=} opt_classNames CSS class name(s) to apply to the caption
* element.
* @param {goog.ui.ButtonRenderer=} opt_renderer Button renderer; defaults to
* {@link goog.ui.ToolbarMenuButtonRenderer} if unspecified.
* @param {goog.dom.DomHelper=} opt_domHelper DOM helper, used for DOM
* creation; defaults to the current document if unspecified.
* @return {!goog.ui.MenuButton} A menu button.
*/
goog.ui.editor.ToolbarFactory. [[#variable58abc300]]= function (id,tooltip,caption,opt_classNames,opt_renderer,opt_domHelper)
{ var button=new goog.ui. [[#variable58abc260]](goog.ui.editor.ToolbarFactory.createContent_(caption,opt_classNames,opt_domHelper),null,opt_renderer,opt_domHelper);
button.setId(id);
button.setTooltip(tooltip);
return button;
} ;
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#58abc300]] | makeColorMenuButton |
| 1 | 2 | [[#58abc300]] | makeMenuButton |
| 2 | 1 | [[#58abc260]] | ToolbarColorMenuButton |
| 2 | 2 | [[#58abc260]] | ToolbarMenuButton |