Final Class: FlattenedTreeHeaderSet

Oracle® JavaScript Extension Toolkit (JET)
16.0.0

F83701-01

Since:
  • 1.0
Module:
  • ojflattenedtreedatagriddatasource

Note: This class is deprecated since 14.0.0. FlattenedTreeHeaderSet has been deprecated with FlattenedTreeDataGridDataSource.

QuickNav

Description

A HeaderSet represents a collection of headers. The HeaderSet is an object returned by the success callback of the fetchHeaders method on DataGridDataSource. This is an flattened tree specific implementation of the HeaderSet.


Usage

Javascript Import Format
define(['ojs/ojflattenedtreedatagriddatasource'], function(flattenedtreedatagriddatasource) {
 // Application should call API on flattenedtreedatagriddatasource.FlattenedTreeHeaderSet 
})

For additional information visit:


Final classes in JET

Classes in JET are generally final and do not support subclassing. At the moment, final is not enforced. However, this will likely change in an upcoming JET release.


See:

Constructor

new FlattenedTreeHeaderSet(start, end, headers, nodeSet, rowHeader)

Parameters:
Name Type Argument Description
start number the start index of header set.
end number the end index of the header set.
headers Array the array of headers. Required for column headers.
nodeSet Object <optional>
the node set containing data about the row header. Required for row headers.
rowHeader string <optional>
the id of the row header column. Required for row headers.
See:

Methods

getCount : {number}

Gets the actual count of the result set. The total indexes spanned along the innermost header.
Returns:

the actual count of the result set.

Type
number

getData(index, level) : {any}

Gets the data of the specified index. An error is throw when 1) the range is not yet available and 2) the index specified is out of bounds.
Parameters:
Name Type Argument Description
index number the absolute index of the header in which we want to retrieve the header from.
level number <optional>
the level of the header, 0 is the outermost header and increments by 1 moving inward
Returns:

the data object for the specific index.

Type
any

getDepth(index, level) : {number}

Gets the depth of an index starting at a particular level. The depth is the number of levels spanned by the header.
Parameters:
Name Type Argument Description
index number the absolute index of the depth to get
level number <optional>
the level of the header, 0 is the outermost header
Returns:

the number of levels spanned by the header at the specified position

Type
number

getExtent(index, level) : {Object}

Gets the extent of an index on a particular level within the context of the headerSet. Extent is defined as the number of indexes covered by the header. If the extent extends beyond the start and end of the requested range the extent should be trimmed to the edge of the requested range and the object for {'more': {before, after}} should have the value appropriate boolean set. For innermost headers the extent will always be 1.
Parameters:
Name Type Argument Description
index number the absolute index along the innermost header of the extent to get, 0 is the first header in the data source
level number <optional>
the level of the header, 0 is the outermost header and increments by 1 moving inward
Returns:

an object containing two values extent: the number of absolute indexes spanned by the header at this index bounded by the edges of the result set for the specified axis. more: object with keys 'before'/'after' and boolean values true/false representing whether there are more indexes before/after what is in the headerSet

Type
Object

getLabel(level) : {*}

Gets the label for the level along the axis of that header. Specify null to have no header labels.
Parameters:
Name Type Description
level number the header level to retrieve the label data for
Returns:

the data for the header label

Type
*

getLevelCount : {number}

Gets the actual number of levels of the result set for the specified axis. The levels are the counted from the outermost header indexed at 0, and moving inwards toward the databody would increment the level by 1.
Returns:

the number of levels of the result set

Type
number

getMetadata(index, level) : {Object}

Gets the metadata of the specified index. An error is throw when 1) the range is not yet available and 2) the index specified is out of bounds. The metadata that the data source can optionally return are: 1) sortDirection - the initial sort direction of the header. Valid values are "ascending" and "descending". 2) key - the key of the row/column header.
Parameters:
Name Type Argument Description
index number the absolute index of the header in which we want to retrieve the metadata from.
level number <optional>
the level of the header, 0 is the outermost header and increments by 1 moving inward
Returns:

the metadata object for the specific index.

Type
Object