| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 16 | 2 | 1 | 0.978 | SourceElements[2] |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 16 | 147 | Closure/closure/goog/ui/media/flickr.js |
| 2 | 20 | 166 | Closure/closure/goog/ui/media/mp3.js |
| ||||
/**
* A static convenient method to construct a goog.ui.media.Media control out of
* a FlickrSet URL. It extracts the set id information on the URL, sets it
* as the data model goog.ui.media.FlickrSet renderer uses, sets the states
* supported by the renderer, and returns a Control that binds everything
* together. This is what you should be using for constructing FlickrSet videos,
* except if you need more fine control over the configuration.
*
* @param {goog.ui.media.FlickrSetModel} dataModel The Flickr Set data model.
* @param {goog.dom.DomHelper=} opt_domHelper Optional DOM helper, used for
* document interaction.
* @return {goog.ui.media.Media} A Control binded to the FlickrSet renderer.
* @throws exception in case {@code flickrSetUrl} is an invalid flickr set URL.
* TODO: use {@link goog.ui.media.MediaModel} once it is checked in.
*/
goog.ui.media.FlickrSet.newControl= function (dataModel, opt_domHelper){
var control= new goog.ui.media.Media(
dataModel, goog.ui.media.FlickrSet.getInstance( ),opt_domHelper);
control.setSelected( true);
return control;
} ;
/**
* A static method that sets which flash URL this class should use. Use this if
* you want to host your own flash flickr player.
*
* @param {string} flashUrl The URL of the flash flickr player.
*/
goog.ui.media.FlickrSet.setFlashUrl= function (flashUrl){
goog.ui.media.FlickrSet.flashUrl_= flashUrl;
} ;
|
| ||||
/**
* A static convenient method to construct a goog.ui.media.Media control out of
* a mp3 URL. It checks the mp3 URL, sets it as the data model
* goog.ui.media.Mp3 renderer uses, sets the states supported by the renderer,
* and returns a Control that binds everything together. This is what you
* should be using for constructing Mp3 videos, except if you need more fine
* control over the configuration.
*
* @param {goog.ui.media.MediaModel} dataModel A media model that must contain
* an mp3 url on {@code dataModel.getUrl}.
* @param {goog.dom.DomHelper=} opt_domHelper Optional DOM helper, used for
* document interaction.
* @return {goog.ui.media.Media} A goog.ui.Control subclass with the mp3
* renderer.
*/
goog.ui.media.Mp3.newControl= function (dataModel, opt_domHelper){
var control= new goog.ui.media.Media(
dataModel,
goog.ui.media.Mp3.getInstance( ),
opt_domHelper);
// mp3 ui doesn't have a non selected view: it shows the mp3 player by
// default.
control.setSelected( true);
return control;
} ;
/**
* A static method that sets which flash URL this class should use. Use this if
* you want to host your own flash mp3 player.
*
* @param {string} flashUrl The URL of the flash mp3 player.
*/
goog.ui.media.Mp3.setFlashUrl= function (flashUrl){
goog.ui.media.Mp3.flashUrl_= flashUrl;
} ;
|
| |||
/**
* A static convenient method to construct a goog.ui.media.Media control out of
* a FlickrSet URL. It extracts the set id information on the URL, sets it
* as the data model goog.ui.media.FlickrSet renderer uses, sets the states
* supported by the renderer, and returns a Control that binds everything
* together. This is what you should be using for constructing FlickrSet videos,
* except if you need more fine control over the configuration.
*
* @param {goog.ui.media.FlickrSetModel} dataModel The Flickr Set data model.
* @param {goog.dom.DomHelper=} opt_domHelper Optional DOM helper, used for
* document interaction.
* @return {goog.ui.media.Media} A Control binded to the FlickrSet renderer.
* @throws exception in case {@code flickrSetUrl} is an invalid flickr set URL.
* TODO: use {@link goog.ui.media.MediaModel} once it is checked in.
*/
/**
* A static convenient method to construct a goog.ui.media.Media control out of
* a mp3 URL. It checks the mp3 URL, sets it as the data model
* goog.ui.media.Mp3 renderer uses, sets the states supported by the renderer,
* and returns a Control that binds everything together. This is what you
* should be using for constructing Mp3 videos, except if you need more fine
* control over the configuration.
*
* @param {goog.ui.media.MediaModel} dataModel A media model that must contain
* an mp3 url on {@code dataModel.getUrl}.
* @param {goog.dom.DomHelper=} opt_domHelper Optional DOM helper, used for
* document interaction.
* @return {goog.ui.media.Media} A goog.ui.Control subclass with the mp3
* renderer.
*/
goog.ui.media. [[#variable62e96f40]].newControl= function (dataModel,opt_domHelper)
{ var control=new goog.ui.media.Media(dataModel,goog.ui.media. [[#variable62e96f40]].getInstance( ),opt_domHelper);
// mp3 ui doesn't have a non selected view: it shows the mp3 player by
// default.
control.setSelected( true);
return control;
} ;
/**
* A static method that sets which flash URL this class should use. Use this if
* you want to host your own flash flickr player.
*
* @param {string} flashUrl The URL of the flash flickr player.
*/
/**
* A static method that sets which flash URL this class should use. Use this if
* you want to host your own flash mp3 player.
*
* @param {string} flashUrl The URL of the flash mp3 player.
*/
goog.ui.media. [[#variable62e96f40]].setFlashUrl= function (flashUrl)
{ goog.ui.media. [[#variable62e96f40]].flashUrl_=flashUrl;
} ;
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#62e96f40]] | FlickrSet |
| 1 | 2 | [[#62e96f40]] | Mp3 |