Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
35 | 2 | 2 | 0.975 | SourceElements[4] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 36 | 410 | Closure/closure/goog/ui/menubutton.js |
2 | 35 | 510 | Closure/closure/goog/ui/submenu.js |
| ||||
/** * Adds a new menu item at the end of the menu. * @param {goog.ui.MenuItem|goog.ui.MenuSeparator|goog.ui.Control} item Menu * item to add to the menu. */ goog.ui.MenuButton.prototype.addItem= function (item){ this.getMenu( ).addChild(item, true); } ; /** * Adds a new menu item at the specific index in the menu. * @param {goog.ui.MenuItem|goog.ui.MenuSeparator} item Menu item to add to the * menu. * @param {number} index Index at which to insert the menu item. */ goog.ui.MenuButton.prototype.addItemAt= function (item, index){ this.getMenu( ).addChildAt(item, index, true); } ; /** * Removes the item from the menu and disposes of it. * @param {goog.ui.MenuItem|goog.ui.MenuSeparator} item The menu item to remove. */ goog.ui.MenuButton.prototype.removeItem= function (item){ var child= this.getMenu( ).removeChild(item, true); if (child) { child.dispose( ); } } ; /** * Removes the menu item at a given index in the menu and disposes of it. * @param {number} index Index of item. */ goog.ui.MenuButton.prototype.removeItemAt= function (index){ var child= this.getMenu( ).removeChildAt(index, true); if (child) { child.dispose( ); } } ; |
| ||||
// Methods delegated to sub-menu but accessible here for convinience /** * Adds a new menu item at the end of the menu. * @param {goog.ui.MenuItem} item Menu item to add to the menu. */ goog.ui.SubMenu.prototype.addItem= function (item){ this.getMenu( ).addChild(item, true); } ; /** * Adds a new menu item at a specific index in the menu. * @param {goog.ui.MenuItem} item Menu item to add to the menu. * @param {number} n Index at which to insert the menu item. */ goog.ui.SubMenu.prototype.addItemAt= function (item, n){ this.getMenu( ).addChildAt(item, n, true); } ; /** * Removes an item from the menu and disposes it. * @param {goog.ui.MenuItem} item The menu item to remove. */ goog.ui.SubMenu.prototype.removeItem= function (item){ var child= this.getMenu( ).removeChild(item, true); if (child) { child.dispose( ); } } ; /** * Removes a menu item at a given index in the menu and disposes it. * @param {number} n Index of item. */ goog.ui.SubMenu.prototype.removeItemAt= function (n){ var child= this.getMenu( ).removeChildAt(n, true); if (child) { child.dispose( ); } } ; |
| |||
// Methods delegated to sub-menu but accessible here for convinience /** * Adds a new menu item at the end of the menu. * @param {goog.ui.MenuItem} item Menu item to add to the menu. */ /** * Adds a new menu item at the end of the menu. * @param {goog.ui.MenuItem|goog.ui.MenuSeparator|goog.ui.Control} item Menu * item to add to the menu. */ goog.ui. [[#variable5a586e00]].prototype.addItem= function (item) { this.getMenu( ).addChild(item, true); } ; /** * Adds a new menu item at a specific index in the menu. * @param {goog.ui.MenuItem} item Menu item to add to the menu. * @param {number} n Index at which to insert the menu item. */ /** * Adds a new menu item at the specific index in the menu. * @param {goog.ui.MenuItem|goog.ui.MenuSeparator} item Menu item to add to the * menu. * @param {number} index Index at which to insert the menu item. */ goog.ui. [[#variable5a586e00]].prototype.addItemAt= function (item, [[#variable5a586da0]]) { this.getMenu( ).addChildAt(item, [[#variable5a586da0]], true); } ; /** * Removes an item from the menu and disposes it. * @param {goog.ui.MenuItem} item The menu item to remove. */ /** * Removes the item from the menu and disposes of it. * @param {goog.ui.MenuItem|goog.ui.MenuSeparator} item The menu item to remove. */ goog.ui. [[#variable5a586e00]].prototype.removeItem= function (item) { var child=this.getMenu( ).removeChild(item, true); if (child) { child.dispose( ); } } ; /** * Removes a menu item at a given index in the menu and disposes it. * @param {number} n Index of item. */ /** * Removes the menu item at a given index in the menu and disposes of it. * @param {number} index Index of item. */ goog.ui. [[#variable5a586e00]].prototype.removeItemAt= function ( [[#variable5a586da0]]) { var child=this.getMenu( ).removeChildAt( [[#variable5a586da0]], true); if (child) { child.dispose( ); } } ; |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#5a586e00]] | SubMenu |
1 | 2 | [[#5a586e00]] | MenuButton |
2 | 1 | [[#5a586da0]] | n |
2 | 2 | [[#5a586da0]] | index |