Home Reference Source
public class | source

NdgBase

Extends:

react~React.ComponentEventDispatcherUIComponent → NdgBase

Direct Subclass:

FlexDataGrid

Indirect Subclass:

ReactDataGrid

Base class for the FlexDataGrid. Please refer to the FlexDataGrid class for details

Constructor Summary

Public Constructor
public

constructor(props: *, arg1: *, arg2: *, tag: *)

Member Summary

Public Members
public
public

Text for the Copy All Rows

public

Text for the Copy Cell Menu

public

Text for the Copy Selected Row

public

The default number of rows to display.

public

A function that determines whether drag should be initiated.

public

A function that gets executed when the drag drop operation is complete.

public

A function that determines whether drop should be shown.

public
public

Flag that indicates whether or not to setup drag support.

public
public
public
public
public
public
public

For some operations, like shift tab and tab key up, purposely pause the Container keyboard listenters, so we do not overwrite the work of one keyboard handler by triggering another.

public
public
public

A collection of toolbar actions.

public
public
public
public
public
public

A collection of toolbar actions.

public

Method Summary

Public Methods
public
public

createListData(text: *, dataField: *, i: *): *

public

Calls invalidateDisplayList()

public

dragDrop(event: *)

public

dragEnter(event: *)

public
public
public

Flag that indicates whether or not to setup drag support.

public

The row data that is currently being dragged

public

Flag that indicates whether or not to setup drop support.

public

The dropIndicator separator Sprite.

public

Flag that indicates whether or not to setup drop support.

public
public

Returns true if selectionMode=MULTIPLE_ROWS or SINGLE_ROW

public

Returns true if selectionMode=MULTIPLE_ROWS or SINGLE_ROW

public

The left locked vertical separator Sprite.

public

The right locked vertical separator Sprite.

public

A list of CellInfo objects.

public

Selection mode for the grid.

public

getUIComponentBitmapData(target: *): *

Drag and Drop support, create a image representation of the row.

public

Returns true if the grid defines the border style specified

public

Invalidates the cell widths, so in the next commit properties, we snap to the new column widths.

public

Invalidates the height, which in turn adjusts the various section based on the updated numbers, and recycles the renderers, so if there is more stuff on the viewport than is currently visible, it is drawn.

public

Invalidates the width, which in turn adjusts the various section based on the updated numbers, and recycles the renderers, so if there is more stuff on the viewport than is currently visible, it is drawn.

public

onCollectionChange(event: *)

public

onCreationComplete(event: *)

public

onGridMouseClick(event: *)

public

onGridResized(event: *)

On grid resized, we reposition the cells.

public

reDraw()

Redraws the grid, assuming the data provider is the same, we're just changing column widths or ordinals. There are four functions that you can use to redraw the grid, on basis of what your needs are.

    S
  • rebuild : Most expensive. Rebuilds the entire grid. This is also the most expensive function
  • reDraw : Removes the cells in view, and redraws them. Should be used when there are no additions/removals to the data provider
  • refreshCells : Resets the text,enabled, styles and border/background etc. of the currently visible cells. See the refreshCells() function for details.
  • invalidateCells : Least expensive. Only resets the border/background of the currently visible cells.
  • rebuildBody : A light weight replacement for rebuild that only rebuids the body, not the header,footer,filter, and pager (which are generally more expensive to rebuild).

public

Rebuild the entire grid.

public

Calls rebuild internally.

public
public
public
public
public
public
public
public
public

showToaster(message: *, toasterPosition: *, toasterRenderer: *, animationDuration: *, visibleDuration: *, moveAnimate: *, fadeAnimate: *)

public
public

updateDisplayList(unscaledWidth: number, unscaledHeight: number)

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(props: *, arg1: *, arg2: *, tag: *) source

Override:

UIComponent#constructor

Params:

NameTypeAttributeDescription
props *
arg1 *
arg2 *
tag *

Public Members

public allowInteractivity: boolean source

Properties:

NameTypeAttributeDescription
allowInteractivity *

public copyAllRowsMenuText: String source

Text for the Copy All Rows

Properties:

NameTypeAttributeDescription
copyCellMenuText *

public copyCellMenuText: String source

Text for the Copy Cell Menu

Properties:

NameTypeAttributeDescription
copyCellMenuText *

public copySelectedRowMenuText: String source

Text for the Copy Selected Row

Properties:

NameTypeAttributeDescription
copyCellMenuText *

public defaultRowCount: number source

The default number of rows to display.

Properties:

NameTypeAttributeDescription
defaultRowCount *

public dragAvailableFunction: Function source

A function that determines whether drag should be initiated. Function should take an IFlexDataGridDataCell object, and return true or false.

Properties:

NameTypeAttributeDescription
dragAvailableFunction *

public dragDropCompleteFunction: Function source

A function that gets executed when the drag drop operation is complete. Takes 2 IFlexDataGridDataCell objects, the initiator, and the target.

Properties:

NameTypeAttributeDescription
dragDropCompleteFunction *

public dropAcceptRejectFunction: Function source

A function that determines whether drop should be shown. Function should take an IFlexDataGridDataCell object, and return true or false.

Properties:

NameTypeAttributeDescription
dropAcceptRejectFunction *

public dropIndicator: * source

Properties:

NameTypeAttributeDescription
dropIndicator *

public enableDrag: boolean source

Flag that indicates whether or not to setup drag support. Same as the dragEnabled flag.

Properties:

NameTypeAttributeDescription
enableDrag *

public enableDrillDown: boolean source

Properties:

NameTypeAttributeDescription
enableDrillDown *

public enableDrop: * source

Properties:

NameTypeAttributeDescription
enableDrop *

public enableLockedSectionSeparators: boolean source

Properties:

NameTypeAttributeDescription
enableLockedSectionSeparators *

public enableMultiColumnSort: boolean source

Properties:

NameTypeAttributeDescription
enableMultiColumnSort *

public enableToolbarActions: boolean source

Properties:

NameTypeAttributeDescription
enableToolbarActions *

public itemFilters: {} source

Properties:

NameTypeAttributeDescription
itemFilters *

public keyboardListenersPaused: boolean source

For some operations, like shift tab and tab key up, purposely pause the Container keyboard listenters, so we do not overwrite the work of one keyboard handler by triggering another.

Properties:

NameTypeAttributeDescription
keyboardListenersPaused *

public lockDisclosureCell: boolean source

Properties:

NameTypeAttributeDescription
lockDisclosureCell *

public lockedSectionSeparatorDrawFunction: * source

Properties:

NameTypeAttributeDescription
lockedSectionSeparatorDrawFunction *

public predefinedFilters: Array source

A collection of toolbar actions.

Properties:

NameTypeAttributeDescription
predefinedFilters *

public showSpinnerOnFilterPageSort: boolean source

Properties:

NameTypeAttributeDescription
showSpinnerOnFilterPageSort *

public spinnerFactory: * source

Properties:

NameTypeAttributeDescription
spinnerFactory *

public spinnerLabel: String source

Properties:

NameTypeAttributeDescription
spinnerLabel *

public toolbarActionExecutedFunction: Function source

Properties:

NameTypeAttributeDescription
toolbarActionExecutedFunction *

public toolbarActionValidFunction: Function source

Properties:

NameTypeAttributeDescription
toolbarActionValidFunction *

public toolbarActions: Array source

A collection of toolbar actions.

Properties:

NameTypeAttributeDescription
toolbarActions *

public traceValue: * source

Properties:

NameTypeAttributeDescription
traceValue *

Public Methods

public clearSelection() source

public createListData(text: *, dataField: *, i: *): * source

Params:

NameTypeAttributeDescription
text *
dataField *
i *

Return:

*

public doInvalidate() source

Calls invalidateDisplayList()

public dragDrop(event: *) source

Params:

NameTypeAttributeDescription
event *

public dragEnter(event: *) source

Params:

NameTypeAttributeDescription
event *

public drawDefaultSeparators() source

public getClassNames(): string[] source

Override:

UIComponent#getClassNames

Return:

string[]

public getDragEnabled(): boolean source

Flag that indicates whether or not to setup drag support. Same as enableDrag, property provided for consistency with sdk counterpart

Return:

boolean

public getDragRowData(): * source

The row data that is currently being dragged

Return:

*

public getDropEnabled(): * source

Flag that indicates whether or not to setup drop support. Same as enableDrag, property provided for consistency with sdk counterpart

Return:

*

public getDropIndicator(): * source

The dropIndicator separator Sprite. To style this, please use the dropIndicatorColor and dropIndicatorSeparatorThickness. You can also customize this by extending the grid and overriding the showDropIndicator function.

Return:

*

public getEnableDrop(): boolean source

Flag that indicates whether or not to setup drop support. Same as the dropEnabled flag.

Return:

boolean

public getForceColumnsToFitVisibleArea(): boolean source

Return:

boolean

public getIsCellSelectionMode(): Boolean source

Returns true if selectionMode=MULTIPLE_ROWS or SINGLE_ROW

Return:

Boolean

public getIsRowSelectionMode(): Boolean source

Returns true if selectionMode=MULTIPLE_ROWS or SINGLE_ROW

Return:

Boolean

public getLeftLockedVerticalSeparator(): * source

The left locked vertical separator Sprite. To style this, please use the lockedSeparatorColor and lockedSeparatorThickness. You can also customize this by extending the grid and overriding the drawDefaultSeparators function.

Return:

*

public getRightLockedVerticalSeparator(): * source

The right locked vertical separator Sprite. To style this, please use the lockedSeparatorColor and lockedSeparatorThickness. You can also customize this by extending the grid and overriding the drawDefaultSeparators function.

Return:

*

public getSelectedCells(): * source

A list of CellInfo objects. When grid.selectionMode=SINGLE_CELL, this collection contains only one item

Return:

*

public getSelectionMode(): * source

Selection mode for the grid. The grid supports the following selection modes:

  • MULTIPLE_CELLS
  • MULTIPLE_ROWS
  • NONE
  • SINGLE_CELL
  • SINGLE_ROW
  • In Row selection modes (Single Row or Multiple Rows), as the user selects rows, the selectedKeys and selectedObjects properties are updated respectively.
    In cell selection mode, the selectedCells property is updated. The selectedKeys contains the value of the selected objects "selectedKeyField" property.
    The selected objects is a readonly collection that contains the actual selected objects.
    The selected cells property is a collection of CellInfo Objects, which contains a rowData property (which is a pointer to the actual data object bound to the row) and a column property which can uniquely identify a cell.
    If you programatically modify the selected cells collection or selectedKeys collection, please ensure that you call refreshCells() method on the grid.

    Return:

    *

    public getUIComponentBitmapData(target: *): * source

    Drag and Drop support, create a image representation of the row.

    Params:

    NameTypeAttributeDescription
    target *

    Return:

    *

    public hasBorderSide(side: *): boolean source

    Returns true if the grid defines the border style specified

    Params:

    NameTypeAttributeDescription
    side *

    Return:

    boolean

    public invalidateCellWidths() source

    Invalidates the cell widths, so in the next commit properties, we snap to the new column widths.

    public invalidateHeight() source

    Invalidates the height, which in turn adjusts the various section based on the updated numbers, and recycles the renderers, so if there is more stuff on the viewport than is currently visible, it is drawn.

    public invalidateWidth() source

    Invalidates the width, which in turn adjusts the various section based on the updated numbers, and recycles the renderers, so if there is more stuff on the viewport than is currently visible, it is drawn.

    public onCollectionChange(event: *) source

    Params:

    NameTypeAttributeDescription
    event *

    public onCreationComplete(event: *) source

    Params:

    NameTypeAttributeDescription
    event *

    public onGridMouseClick(event: *) source

    Params:

    NameTypeAttributeDescription
    event *

    public onGridResized(event: *) source

    On grid resized, we reposition the cells.

    Params:

    NameTypeAttributeDescription
    event *

    public reDraw() source

    Redraws the grid, assuming the data provider is the same, we're just changing column widths or ordinals. There are four functions that you can use to redraw the grid, on basis of what your needs are.

      S
    • rebuild : Most expensive. Rebuilds the entire grid. This is also the most expensive function
    • reDraw : Removes the cells in view, and redraws them. Should be used when there are no additions/removals to the data provider
    • refreshCells : Resets the text,enabled, styles and border/background etc. of the currently visible cells. See the refreshCells() function for details.
    • invalidateCells : Least expensive. Only resets the border/background of the currently visible cells.
    • rebuildBody : A light weight replacement for rebuild that only rebuids the body, not the header,footer,filter, and pager (which are generally more expensive to rebuild).

    public rebuild() source

    Rebuild the entire grid. Iterates through the data provider, re-evaluvates the vertical positions of each item, Drops and recreates all cells. There are four functions that you can use to redraw the grid, on basis of what your needs are.

    • rebuild : Most expensive. Rebuilds the entire grid. This is also the most expensive function
    • reDraw : Removes the cells in view, and redraws them. Should be used when there are no additions/removals to the data provider
    • refreshCells : Resets the text,enabled, styles and border/background etc. of the currently visible cells. See the refreshCells() function for details.
    • invalidateCells : Least expensive. Only resets the border/background of the currently visible cells.
    • rebuildBody : A light weight replacement for rebuild that only rebuids the body, not the header,footer,filter, and pager (which are generally more expensive to rebuild).

    public refreshLayout() source

    Calls rebuild internally.

    public resumeKeyboardListeners() source

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

    Override:

    UIComponent#setActualSize

    Params:

    NameTypeAttributeDescription
    w number

    width

    h number

    height

    public setDragEnabled(enabled: boolean) source

    Params:

    NameTypeAttributeDescription
    enabled boolean

    public setDropEnabled(enabled: boolean) source

    Params:

    NameTypeAttributeDescription
    enabled boolean

    public setEnableDrop(enabled: boolean) source

    Params:

    NameTypeAttributeDescription
    enabled boolean

    public setHeight(val: number) source

    Override:

    UIComponent#setHeight

    Params:

    NameTypeAttributeDescription
    val number

    public setSelectionMode(value: boolean) source

    Params:

    NameTypeAttributeDescription
    value boolean

    public setWidth(val: number) source

    Override:

    UIComponent#setWidth

    Params:

    NameTypeAttributeDescription
    val number

    public showToaster(message: *, toasterPosition: *, toasterRenderer: *, animationDuration: *, visibleDuration: *, moveAnimate: *, fadeAnimate: *) source

    Params:

    NameTypeAttributeDescription
    message *
    toasterPosition *
    toasterRenderer *
    animationDuration *
    visibleDuration *
    moveAnimate *
    fadeAnimate *

    public traceEvent(msg: String) source

    Params:

    NameTypeAttributeDescription
    msg String

    public updateDisplayList(unscaledWidth: number, unscaledHeight: number) source

    Called as a part of render phase.

    Override:

    UIComponent#updateDisplayList

    Params:

    NameTypeAttributeDescription
    unscaledWidth number
    unscaledHeight number