| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 14 | 6 | 4 | 0.955 | SourceElements[2] |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 14 | 802 | Closure/closure/goog/ui/control.js |
| 2 | 14 | 824 | Closure/closure/goog/ui/control.js |
| 3 | 14 | 846 | Closure/closure/goog/ui/control.js |
| 4 | 14 | 868 | Closure/closure/goog/ui/control.js |
| 5 | 18 | 894 | Closure/closure/goog/ui/control.js |
| 6 | 14 | 920 | Closure/closure/goog/ui/control.js |
| ||||
/**
* Returns true if the component is currently highlighted, false otherwise.
* @return {boolean} Whether the component is highlighted.
*/
goog.ui.Control.prototype.isHighlighted= function ( )
{
return this.hasState(goog.ui.Component.State.HOVER);
} ;
/**
* Highlights or unhighlights the component. Does nothing if this state
* transition is disallowed.
* @param {boolean} highlight Whether to highlight or unhighlight the component.
* @see #isTransitionAllowed
*/
goog.ui.Control.prototype.setHighlighted= function (highlight){
if (this.isTransitionAllowed(goog.ui.Component.State.HOVER, highlight)) {
this.setState(goog.ui.Component.State.HOVER, highlight);
}
} ;
|
| ||||
/**
* Returns true if the component is active (pressed), false otherwise.
* @return {boolean} Whether the component is active.
*/
goog.ui.Control.prototype.isActive= function ( )
{
return this.hasState(goog.ui.Component.State.ACTIVE);
} ;
/**
* Activates or deactivates the component. Does nothing if this state
* transition is disallowed.
* @param {boolean} active Whether to activate or deactivate the component.
* @see #isTransitionAllowed
*/
goog.ui.Control.prototype.setActive= function (active){
if (this.isTransitionAllowed(goog.ui.Component.State.ACTIVE, active)) {
this.setState(goog.ui.Component.State.ACTIVE, active);
}
} ;
|
| ||||
/**
* Returns true if the component is selected, false otherwise.
* @return {boolean} Whether the component is selected.
*/
goog.ui.Control.prototype.isSelected= function ( )
{
return this.hasState(goog.ui.Component.State.SELECTED);
} ;
/**
* Selects or unselects the component. Does nothing if this state transition
* is disallowed.
* @param {boolean} select Whether to select or unselect the component.
* @see #isTransitionAllowed
*/
goog.ui.Control.prototype.setSelected= function (select){
if (this.isTransitionAllowed(goog.ui.Component.State.SELECTED, select)) {
this.setState(goog.ui.Component.State.SELECTED, select);
}
} ;
|
| ||||
/**
* Returns true if the component is checked, false otherwise.
* @return {boolean} Whether the component is checked.
*/
goog.ui.Control.prototype.isChecked= function ( )
{
return this.hasState(goog.ui.Component.State.CHECKED);
} ;
/**
* Checks or unchecks the component. Does nothing if this state transition
* is disallowed.
* @param {boolean} check Whether to check or uncheck the component.
* @see #isTransitionAllowed
*/
goog.ui.Control.prototype.setChecked= function (check){
if (this.isTransitionAllowed(goog.ui.Component.State.CHECKED, check)) {
this.setState(goog.ui.Component.State.CHECKED, check);
}
} ;
|
| ||||
/**
* Returns true if the component is styled to indicate that it has keyboard
* focus, false otherwise. Note that {@code isFocused()} returning true
* doesn't guarantee that the component's key event target has keyborad focus,
* only that it is styled as such.
* @return {boolean} Whether the component is styled to indicate as having
* keyboard focus.
*/
goog.ui.Control.prototype.isFocused= function ( )
{
return this.hasState(goog.ui.Component.State.FOCUSED);
} ;
/**
* Applies or removes styling indicating that the component has keyboard focus.
* Note that unlike the other "set" methods, this method is called as a result
* of the component's element having received or lost keyboard focus, not the
* other way around, so calling {@code setFocused(true)} doesn't guarantee that
* the component's key event target has keyboard focus, only that it is styled
* as such.
* @param {boolean} focused Whether to apply or remove styling to indicate that
* the component's element has keyboard focus.
*/
goog.ui.Control.prototype.setFocused= function (focused){
if (this.isTransitionAllowed(goog.ui.Component.State.FOCUSED, focused)) {
this.setState(goog.ui.Component.State.FOCUSED, focused);
}
} ;
|
| ||||
/**
* Returns true if the component is open (expanded), false otherwise.
* @return {boolean} Whether the component is open.
*/
goog.ui.Control.prototype.isOpen= function ( )
{
return this.hasState(goog.ui.Component.State.OPENED);
} ;
/**
* Opens (expands) or closes (collapses) the component. Does nothing if this
* state transition is disallowed.
* @param {boolean} open Whether to open or close the component.
* @see #isTransitionAllowed
*/
goog.ui.Control.prototype.setOpen= function (open){
if (this.isTransitionAllowed(goog.ui.Component.State.OPENED, open)) {
this.setState(goog.ui.Component.State.OPENED, open);
}
} ;
|
| |||
/**
* Returns true if the component is currently highlighted, false otherwise.
* @return {boolean} Whether the component is highlighted.
*/
/**
* Returns true if the component is active (pressed), false otherwise.
* @return {boolean} Whether the component is active.
*/
/**
* Returns true if the component is selected, false otherwise.
* @return {boolean} Whether the component is selected.
*/
/**
* Returns true if the component is checked, false otherwise.
* @return {boolean} Whether the component is checked.
*/
/**
* Returns true if the component is styled to indicate that it has keyboard
* focus, false otherwise. Note that {@code isFocused()} returning true
* doesn't guarantee that the component's key event target has keyborad focus,
* only that it is styled as such.
* @return {boolean} Whether the component is styled to indicate as having
* keyboard focus.
*/
/**
* Returns true if the component is open (expanded), false otherwise.
* @return {boolean} Whether the component is open.
*/
goog.ui.Control.prototype. [[#variable616d6b00]]= function ( )
{ return this.hasState(goog.ui.Component.State. [[#variable6068caa0]]);
} ;
/**
* Highlights or unhighlights the component. Does nothing if this state
* transition is disallowed.
* @param {boolean} highlight Whether to highlight or unhighlight the component.
* @see #isTransitionAllowed
*/
/**
* Activates or deactivates the component. Does nothing if this state
* transition is disallowed.
* @param {boolean} active Whether to activate or deactivate the component.
* @see #isTransitionAllowed
*/
/**
* Selects or unselects the component. Does nothing if this state transition
* is disallowed.
* @param {boolean} select Whether to select or unselect the component.
* @see #isTransitionAllowed
*/
/**
* Checks or unchecks the component. Does nothing if this state transition
* is disallowed.
* @param {boolean} check Whether to check or uncheck the component.
* @see #isTransitionAllowed
*/
/**
* Applies or removes styling indicating that the component has keyboard focus.
* Note that unlike the other "set" methods, this method is called as a result
* of the component's element having received or lost keyboard focus, not the
* other way around, so calling {@code setFocused(true)} doesn't guarantee that
* the component's key event target has keyboard focus, only that it is styled
* as such.
* @param {boolean} focused Whether to apply or remove styling to indicate that
* the component's element has keyboard focus.
*/
/**
* Opens (expands) or closes (collapses) the component. Does nothing if this
* state transition is disallowed.
* @param {boolean} open Whether to open or close the component.
* @see #isTransitionAllowed
*/
goog.ui.Control.prototype. [[#variable616d6a20]]= function ( [[#variable616d69a0]])
{ if (this.isTransitionAllowed(goog.ui.Component.State. [[#variable6068caa0]], [[#variable616d69a0]]))
{ this.setState(goog.ui.Component.State. [[#variable6068caa0]], [[#variable616d69a0]]);
}
} ;
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#616d6b00]] | isHighlighted |
| 1 | 2 | [[#616d6b00]] | isActive |
| 1 | 3 | [[#616d6b00]] | isSelected |
| 1 | 4 | [[#616d6b00]] | isChecked |
| 1 | 5 | [[#616d6b00]] | isFocused |
| 1 | 6 | [[#616d6b00]] | isOpen |
| 2 | 1 | [[#6068caa0]] | HOVER |
| 2 | 2 | [[#6068caa0]] | ACTIVE |
| 2 | 3 | [[#6068caa0]] | SELECTED |
| 2 | 4 | [[#6068caa0]] | CHECKED |
| 2 | 5 | [[#6068caa0]] | FOCUSED |
| 2 | 6 | [[#6068caa0]] | OPENED |
| 3 | 1 | [[#616d6a20]] | setHighlighted |
| 3 | 2 | [[#616d6a20]] | setActive |
| 3 | 3 | [[#616d6a20]] | setSelected |
| 3 | 4 | [[#616d6a20]] | setChecked |
| 3 | 5 | [[#616d6a20]] | setFocused |
| 3 | 6 | [[#616d6a20]] | setOpen |
| 4 | 1 | [[#616d69a0]] | highlight |
| 4 | 2 | [[#616d69a0]] | active |
| 4 | 3 | [[#616d69a0]] | select |
| 4 | 4 | [[#616d69a0]] | check |
| 4 | 5 | [[#616d69a0]] | focused |
| 4 | 6 | [[#616d69a0]] | open |