Home Reference Source
public class | source

TriStateCheckBox

Extends:

react~React.ComponentEventDispatcherUIComponent → TriStateCheckBox

A Checkbox that implements ITriStateCheckBoxFilterControl (IFilterControl) which enables it to be used within the filtering/binding infrasturcture. In addition to the on and off states supported by the regular check box, the Tristate checkbox supports an additional middle state, which is depicted by a checkbox with a fill, an is designed to indicate that the checkbox is neither on or off, just in a undefined/null state.

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public

Allows user to select the middle mode.

public
public

The amount of time (in milliseconds) to wait before dispatching the DELAY_CHANGE event.

public

Whether or not to enable the DELAY_CHANGE event.

public

This is usually automatically set, you don't have to manually set it, unless you're sending strings as Date objects.

public

The filter operation to apply to the comparison See the FilterExpression class for a list.

public

The event that the filter triggers on.

public

grid: *

The grid that the filter belongs to - can be null if filter is used outside the grid

public

The grid column that the filter belongs to - can be null if filter is used outside the grid

public

Whether or not there is an active search

public

In single select datagrids, set this to true for the icon to appear as if it is a radio button

public

Whether or not this control has been registered.

public

The field to search on, usually same as the data field.

public

Method Summary

Public Methods
public

clear()

public

clickHandler(event: *)

Default click handler

public

dispatchEvent(event: *): *

public
public

getHeight(): *

The height of this label

public

getMiddle(): *

Returns if the current state is middle state.

public
public

Returns one of STATE_MIDDLE|STATE_CHECKED|STATE_UNCHECKED on basis of what the user has selected.

public

getValue(): *

Generic function that returns the value of a IFilterControl

public

getWidth(): *

The width of this label

public

kill()

public

onTimerComplete(event: *)

public

setActualSize(w: *, h: *)

public

setMiddle(val: *)

Switches the state to middle state.

public

setSelected(val: *)

public
public

setValue(val: *)

Generic function that sets the value of a IFilterControl

public

updateDisplayList(w: *, h: *)

On basis of the selectedState, sets the icon

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
public

getStyle(prop: *): *

Gets the value of the prop property on this object

public

Returns true if an event listener exists

public

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

From class UIComponent
public static
public static
public
public

children: *[]

public
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
public
public
public
public
public
public
public

A flag to store if this object has been marked for invalidation.

public
public

parent: *

public
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: *

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
public
public
public

detachClass(newClass: *)

public

domEventFired(event: *)

The event handler that gets triggered from the HTML DOM.

public

focus()

public
public

getAttribute(attr: *): *

public
public

getChildAt(idx: *): *

Returns the child of the domElement at the specified index.

public
public
public

getData(): *

This is a getter/setter for the data property.

public

getElementByTagName(tag: *): *

public

getEnabled(): *

Sets the enabled flag

public

getErrorString(val: *): *

public
public
public

getHeight(): *

public
public
public

getIncludeInLayout(val: *): *

public

Getter for the innerHTML property

public
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

Gets the number of children of the dom element associated with this UIComponent.

public

owns(elem: *): Boolean

Recursively iterates through the parent hierarchy of the given element to check to see if the current node is in its parent hierarchy.

public

ownsPoint(pt: *): boolean

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
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
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
public
public
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
public
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

Public Constructors

public constructor() source

Override:

UIComponent#constructor

Public Members

public allowUserToSelectMiddle: * source

Allows user to select the middle mode.

Properties:

NameTypeAttributeDescription
allowUserToSelectMiddle *

public cbClass: string source

public delayDuration: * source

The amount of time (in milliseconds) to wait before dispatching the DELAY_CHANGE event.

Properties:

NameTypeAttributeDescription
delayDuration *

public enableDelayChange: * source

Whether or not to enable the DELAY_CHANGE event.

Properties:

NameTypeAttributeDescription
enableDelayChange *

public filterComparisionType: * source

This is usually automatically set, you don't have to manually set it, unless you're sending strings as Date objects. When set, will attempt to first convert the current value to the type you specified and then do the conversion. Values : auto,string,number,boolean,date

Properties:

NameTypeAttributeDescription
filterComparisionType *

public filterOperation: * source

The filter operation to apply to the comparison See the FilterExpression class for a list. Please note, for CheckBoxList and MultiSelectComboBox, this field defaults to "InList" and is ignored when set. Valid values are : "Equals,NotEquals,BeginsWith,EndsWith,Contains,DoesNotContain,GreaterThan,LessThan,GreaterThanEquals,LessThanEquals,InList,NotInList,Between"

Properties:

NameTypeAttributeDescription
filterOperation *

public filterTriggerEvent: * source

The event that the filter triggers on. Defaults to "change", or if the filterRenderer supports com.flexicious.controls.interfaces.IDelayedChange, then the delayedChange event.

Properties:

NameTypeAttributeDescription
filterTriggerEvent *

public grid: * source

The grid that the filter belongs to - can be null if filter is used outside the grid

Properties:

NameTypeAttributeDescription
grid *

public gridColumn: * source

The grid column that the filter belongs to - can be null if filter is used outside the grid

Properties:

NameTypeAttributeDescription
gridColumn *

public hasSearch: * source

Whether or not there is an active search

Properties:

NameTypeAttributeDescription
hasSearch *

public radioButtonMode: * source

In single select datagrids, set this to true for the icon to appear as if it is a radio button

Properties:

NameTypeAttributeDescription
radioButtonMode *

public registered: * source

Whether or not this control has been registered. This should not be set by your code.

Properties:

NameTypeAttributeDescription
registered *

public searchField: * source

The field to search on, usually same as the data field.

Properties:

NameTypeAttributeDescription
searchField *

public timerInstance: * source

Public Methods

public clear() source

public clickHandler(event: *) source

Default click handler

Params:

NameTypeAttributeDescription
event *

public dispatchEvent(event: *): * source

Dispatches an event into the event flow. The event target is the EventDispatcher object upon which the dispatchEvent() method is called.

Override:

EventDispatcher#dispatchEvent

Params:

NameTypeAttributeDescription
event *

Return:

*

public getClassNames(): string[] source

Override:

UIComponent#getClassNames

Return:

string[]

public getHeight(): * source

The height of this label

Override:

UIComponent#getHeight

Return:

*

public getMiddle(): * source

Returns if the current state is middle state.

Return:

*

public getSelected(): * source

Return:

*

public getSelectedState(): * source

Returns one of STATE_MIDDLE|STATE_CHECKED|STATE_UNCHECKED on basis of what the user has selected.

Return:

*

public getValue(): * source

Generic function that returns the value of a IFilterControl

Return:

*

public getWidth(): * source

The width of this label

Override:

UIComponent#getWidth

Return:

*

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:

UIComponent#kill

public onTimerComplete(event: *) source

Params:

NameTypeAttributeDescription
event *

public setActualSize(w: *, h: *) source

Override:

UIComponent#setActualSize

Params:

NameTypeAttributeDescription
w *
h *

public setMiddle(val: *) source

Switches the state to middle state.

Params:

NameTypeAttributeDescription
val *

public setSelected(val: *) source

Params:

NameTypeAttributeDescription
val *

public setSelectedState(val: *) source

Params:

NameTypeAttributeDescription
val *

public setValue(val: *) source

Generic function that sets the value of a IFilterControl

Params:

NameTypeAttributeDescription
val *

public updateDisplayList(w: *, h: *) source

On basis of the selectedState, sets the icon

Override:

UIComponent#updateDisplayList

Params:

NameTypeAttributeDescription
w *
h *