Caplin Trader 4.7.1

Class: module:caplin/control/basic/BasicControl

module:caplin/control/basic/BasicControl

An implementation of Control and ControlFramework that acts as a base class for implementations of real controls.

Constructor

(abstract) new module:caplin/control/basic/BasicControl(controlType)

Constructs a new BasicControl with the specified arguments.

This abstract class should never be constructed explicitly.

Parameters:
Name Type Description
controlType module:caplin/control/factory/ControlType The control type.
Implements:

Methods

addClass()

Implements:
See:

attachControlEventListener()

Implements:
See:

bind()

Implements:
See:

clear()

Implements:
See:
  • caplin.control.Control#clear

clearState()

Implements:
See:

detachControlEventListener()

Implements:
See:

disable()

Implements:
See:

enable()

Implements:
See:

finalize()

Implements:
See:

flash()

Implements:
See:

focus()

Implements:
See:

getAttributes()

Implements:
See:

getElement() → {DOMElement}

Gets the element associated with this control.
Returns:
the element associated with this control.
Type
DOMElement

getFlashDuration() → {Numeric}

Gets the value of the flash duration.
Returns:
the value of the flash duration.
Type
Numeric

getId() → {Integer}

Gets the numeric id of this control.
Returns:
The numeric id of this control.
Type
Integer

getInitialClassName()

Implements:
See:

getNumericFlashDirection(newValue, oldValue) → {String}

Determines the numeric flash direction of the new value relative to the old value. If either new or old value is not a number (for example, if either value is undefined) then the function returns an empty string.
Parameters:
Name Type Description
newValue Numeric The new value.
oldValue Numeric The old value.
Returns:
'up', 'down' or 'flat' depending on whether the new value is respectively greater than, less than or equal to the old value.
Type
String

getValue()

Implements:
See:

initialize()

Implements:
See:

isBound() → {boolean}

Indicates whether the control is bound to an HTML Element.
Returns:
true if the control is bound to an HTML Element; otherwise false.
Type
boolean

isEnabled()

Implements:
See:

refresh()

Implements:
See:

removeClass()

Implements:
See:

removeFlash()

Removes the flash state from the control.

replaceClass()

Implements:
See:

select()

Implements:
See:

setAttribute(name, value)

Sets a control attribute.
Parameters:
Name Type Description
name String The name of the attribute to set.
value Variant The value to set.
See:

setDomAttribute(attributeName, attributeValue)

Sets the given HTML attribute value on of the underlying HTML element.
Parameters:
Name Type Description
attributeName String the HTML attribute name to be set.
attributeValue String the HTML attribute value to set.

setDomClass(className)

Sets the DOM CSS classname of the underlying HTML element.
Parameters:
Name Type Description
className String the CSS class name to set.

setDomParentClass(className)

Sets the DOM CSS classname of the underlying parent HTML element.
Parameters:
Name Type Description
className String the CSS class name to set.

setDomStyle(styleName, styleValue)

Sets the given CSS style value on of the underlying HTML element.
Parameters:
Name Type Description
styleName String the CSS style name to be set.
styleValue String the CSS value to set.

(abstract) setDomValue(value)

Sets the value in the DOM. Implementing classes must specify how their DOM value will be set.
Parameters:
Name Type Description
value String The value to set in the DOM.

setId(id)

Sets the id of this control.
Parameters:
Name Type Description
id Integer the value of the id to set.

setInitialClassName()

Implements:
See:

setStyle()

Implements:
See:

setTooltip(tooltip)

Sets the tooltip value for this control.
Parameters:
Name Type Description
tooltip String the tooltip value.

setValue()

Implements:
See:

toString()

Implements:
See:

unbind()

Implements:
See: