UIComponent
Extends:
Direct Subclass:
Indirect Subclass:
A Utility class that contains generic functions needed in multiple places.
Static Method Summary
Static Public Methods | ||
public static |
|
|
public static |
|
Constructor Summary
Public Constructor | ||
public |
constructor(propsOrTagName: *, tagName: *, shouldInit: *) |
Member Summary
Public Members | ||
public |
|
|
public |
children: *[] |
|
public |
childrenWithProps: *[] |
|
public |
data: * This is a getter/setter for the data property. |
|
public |
domElement: HTMLElement The dom element associated with this UIComponent. |
|
public |
A list of event listeners that are added to the domElement (these create html dom event listeners as opposed to js only event listeners) |
|
public |
Whether or not this control is enabled. |
|
public |
errorString: * |
|
public |
handCursor: * |
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
A flag to store if this object has been marked for invalidation. |
|
public |
oldDisplay: * |
|
public |
parent: * |
|
public |
propertyBag: {} |
|
public |
props: * |
|
public |
reactElement: ReactElement The react element associated with this UIComponent. |
|
public |
state: * |
|
public |
tagName: * |
|
public |
toolTip: * |
|
public |
|
|
public |
Whether or not this control is enabled. |
|
public |
|
|
public |
x: * |
|
public |
y: * |
Method Summary
Public Methods | ||
public |
addChild(child: *) This methods takes another UIComponent object, and adds it to the dom as a child of the domElement of this UIComponent. |
|
public |
addChildAt(child: *, idx: *) This methods takes another UIComponent object, and adds it to the dom as a child of the domElement of this UIComponent. |
|
public |
addDomEventListener(evt: *, f: *) When you call addEventListener on a UIComponent, certain events, defined by the domEvents array are also associated with the corresponding domElement. |
|
public |
addEventListener(context: *, type: *, listener: *) Calls super.addEventListener, and for dom based events, also adds a HTML Event listener |
|
public |
attachClass(newClass: *) |
|
public |
|
|
public |
|
|
public |
componentWillReceiveProps(nextProps: *) |
|
public |
|
|
public |
|
|
public |
detachClass(newClass: *) |
|
public |
domEventFired(event: *) The event handler that gets triggered from the HTML DOM. |
|
public |
focus() |
|
public |
getAllChildren(): * |
|
public |
getAttribute(attr: *): * |
|
public |
getAutomationName(): * |
|
public |
getChildAt(idx: *): * Returns the child of the domElement at the specified index. |
|
public |
getClassNames(): string[] |
|
public |
getComponentStyleAttribute(attr: *): * |
|
public |
getData(): * This is a getter/setter for the data property. |
|
public |
getElementByTagName(tag: *): * |
|
public |
getEnabled(): * Sets the enabled flag |
|
public |
getErrorString(val: *): * |
|
public |
getHandCursor(): * |
|
public |
getHandCursor(): * |
|
public |
getHeight(): * |
|
public |
|
|
public |
|
|
public |
getIncludeInLayout(val: *): * |
|
public |
getInnerHTML(): * Getter for the innerHTML property |
|
public |
getPixelHeight(): * |
|
public |
getStyleAttribute(attr: *): * |
|
public |
getText(): * Getter for the text property |
|
public |
|
|
public |
|
|
public |
getVisible(val: *): * Sets the visible flag |
|
public |
getWidth(): * |
|
public |
getX(): * Gets the X co ordinate |
|
public |
getY(): * Gets the Y co ordinate |
|
public |
globalToLocal(ptIn: *): flexiciousNmsp.Point Converts the given global Point to local co-ordinates. |
|
public |
initFromProps(props: *) |
|
public |
Any initialization code is supposed to go in this method. |
|
public |
This method will queue the component so the display list will render it once the current frame of execution is over. |
|
public |
kill() First, calls super.kill(), which takes out all event listeners. |
|
public |
localToGlobal(ptIn: *): flexiciousNmsp.Point Converts the given local Point to global co-ordinates. |
|
public |
measureText(textToMeasure: *): {"width": *} Returns the width of the given text. |
|
public |
mergeObjects(obj1: *, obj2: *): * |
|
public |
move(x: *, y: *) Sets the X and Y co ordinates of the current dom element |
|
public |
numChildren(): * Gets the number of children of the dom element associated with this UIComponent. |
|
public |
Recursively iterates through the parent hierarchy of the given element to check to see if the current node is in its parent hierarchy. |
|
public |
|
|
public |
removeAllChildren(child: *) |
|
public |
removeChild(child: *) This methods takes another UIComponent object, and removes it from the dom. |
|
public |
removeChildAt(idx: *) This methods takes another UIComponent object, and removes it from the dom. |
|
public |
removeComponentAttribute(attr: *) |
|
public |
removeDomEventListener(evt: *, f: *) Removes a previously attached DOM event listener. |
|
public |
removeEventListener(type: *, listener: *) Calls super.addEventListener, and for dom based events, also removes the previously added HTML Event listener |
|
public |
removeEventListenerKeepDomListener(type: *, listener: *) Calls super.addEventListener, and for dom based events, also removes the previously added HTML Event listener |
|
public |
render(): * |
|
public |
setActualSize(w: *, h: *) |
|
public |
|
|
public |
setAttribute(attr: *, val: *) |
|
public |
setAutomationName(val: *) |
|
public |
setChildIndex(child: *, index: *) Sets the visible flag |
|
public |
setComponentStyleAttribute(attr: *, val: *) |
|
public |
setData(val: *) This is important, because the grid looks for a "setData" method on the renderer. |
|
public |
setDomElement(elem: *) Sets the domElement of this UIComponent to the specified element, and creates a property on the dom element called component to this. |
|
public |
setEnabled(val: *) Sets the enabled flag |
|
public |
setErrorString(val: *) |
|
public |
setHandCursor(val: *) |
|
public |
setHeight(val: *): * |
|
public |
setHorizontalScrollPolicy(policy: *) |
|
public |
setHorizontalScrollPosition(val: *): * |
|
public |
setIncludeInLayout(val: *) |
|
public |
setInnerHTML(val: *) Setter for the innerHTML property |
|
public |
setState(newState: *) |
|
public |
setStateIfDomPresent(state: *, db: *) |
|
public |
setStateInternal(newState: *) |
|
public |
setStyleAttribute(attr: *, val: *) |
|
public |
setText(val: *) Setter for the text property |
|
public |
setToolTip(val: *) |
|
public |
setVerticalScrollPolicy(policy: *) |
|
public |
setVerticalScrollPosition(val: *): * |
|
public |
setVisible(val: *) Sets the visible flag |
|
public |
setWidth(val: *): * |
|
public |
setX(val: *): * Sets the X co ordinate |
|
public |
setY(val: *): * Sets the Y co ordinate |
|
public |
updateDisplayList(w: *, h: *) Called as a part of render phase. |
|
public |
|
|
public |
|
Inherited Summary
From class EventDispatcher | ||
public |
[prop]: * |
|
public |
|
|
public |
A list of event listeners for this event dispatcher object. |
|
public |
typeCache: {} |
|
public |
addEventListener(context: *, type: *, listener: *) Registers an event listener object with an EventDispatcher object so that the listener receives notification of an event. |
|
public |
|
|
public |
dispatchEvent(event: *): boolean Dispatches an event into the event flow. |
|
public |
getClassNames(): string[] |
|
public |
getStyle(prop: *): * Gets the value of the prop property on this object |
|
public |
hasEventListener(type: *): Boolean Returns true if an event listener exists |
|
public |
implementsOrExtends(name: *): Boolean Returns true if the class name to check is in the list of class names defined for this class. |
|
public |
kill() Removes all event listeners |
|
public |
killArray(arr: *) Given an array of event dispatchers, calls the kill method on each of them. |
|
public |
removeEventListener(type: *, listener: *) Removes a listener from the EventDispatcher object. |
|
public |
setStyle(prop: *, val: *) Sets the value of the prop property on this object |
Static Public Methods
public static clearPendingUpdates() source
public static flushPendingUpdates() source
Public Constructors
public constructor(propsOrTagName: *, tagName: *, shouldInit: *) source
Override:
EventDispatcher#constructorParams:
Name | Type | Attribute | Description |
propsOrTagName | * | ||
tagName | * | ||
shouldInit | * |
Public Members
public children: *[] source
public childrenWithProps: *[] source
public data: * source
This is a getter/setter for the data property. When the cell is created, it belongs to a row The data property points to the item in the grids dataprovider that is being rendered by this cell.
public domListeners: Array source
A list of event listeners that are added to the domElement (these create html dom event listeners as opposed to js only event listeners)
public errorString: * source
public handCursor: * source
public horizontalScrollPolicy: * source
public oldDisplay: * source
public parent: * source
public propertyBag: {} source
public props: * source
public reactElement: ReactElement source
The react element associated with this UIComponent. It will only be initialized in the render method?
public state: * source
public tagName: * source
public toolTip: * source
public verticalScrollPolicy: * source
public x: * source
public y: * source
Public Methods
public addChild(child: *) source
This methods takes another UIComponent object, and adds it to the dom as a child of the domElement of this UIComponent.
Params:
Name | Type | Attribute | Description |
child | * | Can be either another UIComponent or a DomElement. |
public addChildAt(child: *, idx: *) source
This methods takes another UIComponent object, and adds it to the dom as a child of the domElement of this UIComponent.
Params:
Name | Type | Attribute | Description |
child | * | Can be either another UIComponent or a DomElement. |
|
idx | * | to add the child at |
public addDomEventListener(evt: *, f: *) source
When you call addEventListener on a UIComponent, certain events, defined by the domEvents array are also associated with the corresponding domElement. This method is used to add such event listeners.
Params:
Name | Type | Attribute | Description |
evt | * | Event to add |
|
f | * | Event listener to add. |
public addEventListener(context: *, type: *, listener: *) source
Calls super.addEventListener, and for dom based events, also adds a HTML Event listener
Override:
EventDispatcher#addEventListenerParams:
Name | Type | Attribute | Description |
context | * | ||
type | * | ||
listener | * |
public attachClass(newClass: *) source
Params:
Name | Type | Attribute | Description |
newClass | * |
public componentDidMount() source
public componentWillMount() source
public componentWillReceiveProps(nextProps: *) source
Params:
Name | Type | Attribute | Description |
nextProps | * |
public componentWillUnmount() source
public componentWillUpdate() source
public detachClass(newClass: *) source
Params:
Name | Type | Attribute | Description |
newClass | * |
public domEventFired(event: *) source
The event handler that gets triggered from the HTML DOM.
Params:
Name | Type | Attribute | Description |
event | * | Event from the HTML DOM. |
public focus() source
public getChildAt(idx: *): * source
Returns the child of the domElement at the specified index.
Params:
Name | Type | Attribute | Description |
idx | * |
Return:
* |
public getComponentStyleAttribute(attr: *): * source
Params:
Name | Type | Attribute | Description |
attr | * |
Return:
* |
public getData(): * source
This is a getter/setter for the data property. When the cell is created, it belongs to a row The data property points to the item in the grids dataprovider that is being rendered by this cell.
Return:
* |
public getVisible(val: *): * source
Sets the visible flag
Params:
Name | Type | Attribute | Description |
val | * |
Return:
* |
public globalToLocal(ptIn: *): flexiciousNmsp.Point source
Converts the given global Point to local co-ordinates.
Params:
Name | Type | Attribute | Description |
ptIn | * | {flexiciousNmsp.Point} |
Return:
flexiciousNmsp.Point |
public initFromProps(props: *) source
Params:
Name | Type | Attribute | Description |
props | * |
public invalidateDisplayList() source
This method will queue the component so the display list will render it once the current frame of execution is over.
public kill() source
First, calls super.kill(), which takes out all event listeners. Then, removes all the dom event listeners that we add. Then, wipes out the reference on the domElement. Then, wipes out the domElement reference. Finally, removes itself from the display list if its pending validation.
Override:
EventDispatcher#killpublic localToGlobal(ptIn: *): flexiciousNmsp.Point source
Converts the given local Point to global co-ordinates.
Params:
Name | Type | Attribute | Description |
ptIn | * | {flexiciousNmsp.Point} |
Return:
flexiciousNmsp.Point |
public measureText(textToMeasure: *): {"width": *} source
Returns the width of the given text.
Params:
Name | Type | Attribute | Description |
textToMeasure | * |
Return:
{"width": *} |
public mergeObjects(obj1: *, obj2: *): * source
Params:
Name | Type | Attribute | Description |
obj1 | * | ||
obj2 | * |
Return:
* |
public move(x: *, y: *) source
Sets the X and Y co ordinates of the current dom element
Params:
Name | Type | Attribute | Description |
x | * | ||
y | * |
public numChildren(): * source
Gets the number of children of the dom element associated with this UIComponent.
Return:
* |
public owns(elem: *): Boolean source
Recursively iterates through the parent hierarchy of the given element to check to see if the current node is in its parent hierarchy.
Params:
Name | Type | Attribute | Description |
elem | * | The element to check |
public removeAllChildren(child: *) source
Params:
Name | Type | Attribute | Description |
child | * |
public removeChild(child: *) source
This methods takes another UIComponent object, and removes it from the dom.
Params:
Name | Type | Attribute | Description |
child | * | Can be either another UIComponent or a DomElement. |
public removeChildAt(idx: *) source
This methods takes another UIComponent object, and removes it from the dom.
Params:
Name | Type | Attribute | Description |
idx | * |
public removeComponentAttribute(attr: *) source
Params:
Name | Type | Attribute | Description |
attr | * |
public removeDomEventListener(evt: *, f: *) source
Removes a previously attached DOM event listener.
Params:
Name | Type | Attribute | Description |
evt | * | Event to add |
|
f | * | Event listener to add. |
public removeEventListener(type: *, listener: *) source
Calls super.addEventListener, and for dom based events, also removes the previously added HTML Event listener
Override:
EventDispatcher#removeEventListenerParams:
Name | Type | Attribute | Description |
type | * | ||
listener | * |
public removeEventListenerKeepDomListener(type: *, listener: *) source
Calls super.addEventListener, and for dom based events, also removes the previously added HTML Event listener
Params:
Name | Type | Attribute | Description |
type | * | ||
listener | * |
public setActualSize(w: *, h: *) source
Params:
Name | Type | Attribute | Description |
w | * | ||
h | * |
public setActualSizeFromDomElement() source
public setAttribute(attr: *, val: *) source
Params:
Name | Type | Attribute | Description |
attr | * | ||
val | * |
public setAutomationName(val: *) source
Params:
Name | Type | Attribute | Description |
val | * |
public setChildIndex(child: *, index: *) source
Sets the visible flag
Params:
Name | Type | Attribute | Description |
child | * | ||
index | * |
public setComponentStyleAttribute(attr: *, val: *) source
Params:
Name | Type | Attribute | Description |
attr | * | ||
val | * |
public setData(val: *) source
This is important, because the grid looks for a "setData" method on the renderer.
Params:
Name | Type | Attribute | Description |
val | * |
public setDomElement(elem: *) source
Sets the domElement of this UIComponent to the specified element, and creates a property on the dom element called component to this.
Params:
Name | Type | Attribute | Description |
elem | * | The domElement to associate with the current UIComponent. |
public setErrorString(val: *) source
Params:
Name | Type | Attribute | Description |
val | * |
public setHandCursor(val: *) source
Params:
Name | Type | Attribute | Description |
val | * |
public setHorizontalScrollPolicy(policy: *) source
Params:
Name | Type | Attribute | Description |
policy | * |
public setHorizontalScrollPosition(val: *): * source
Params:
Name | Type | Attribute | Description |
val | * |
Return:
* |
public setIncludeInLayout(val: *) source
Params:
Name | Type | Attribute | Description |
val | * |
public setInnerHTML(val: *) source
Setter for the innerHTML property
Params:
Name | Type | Attribute | Description |
val | * |
public setState(newState: *) source
Params:
Name | Type | Attribute | Description |
newState | * |
public setStateIfDomPresent(state: *, db: *) source
Params:
Name | Type | Attribute | Description |
state | * | ||
db | * |
public setStateInternal(newState: *) source
Params:
Name | Type | Attribute | Description |
newState | * |
public setStyleAttribute(attr: *, val: *) source
Params:
Name | Type | Attribute | Description |
attr | * | ||
val | * |
public setText(val: *) source
Setter for the text property
Params:
Name | Type | Attribute | Description |
val | * |
public setToolTip(val: *) source
Params:
Name | Type | Attribute | Description |
val | * |
public setVerticalScrollPolicy(policy: *) source
Params:
Name | Type | Attribute | Description |
policy | * |
public setVerticalScrollPosition(val: *): * source
Params:
Name | Type | Attribute | Description |
val | * |
Return:
* |
public setX(val: *): * source
Sets the X co ordinate
Params:
Name | Type | Attribute | Description |
val | * |
Return:
* |
public setY(val: *): * source
Sets the Y co ordinate
Params:
Name | Type | Attribute | Description |
val | * |
Return:
* |
public updateDisplayList(w: *, h: *) source
Called as a part of render phase.
Params:
Name | Type | Attribute | Description |
w | * | ||
h | * |