[]
        
(Showing Draft Content)

GC.Spread.Sheets.Outlines.OutlineInfo

Class: OutlineInfo

Sheets.Outlines.OutlineInfo

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new OutlineInfo(model, start, end, level)

Represents the outline (range group) information.

Parameters

Name Type Description
model Outline The owner of the outline.
start number The start index of the outline.
end number The end index of the outline.
level number The level of the outline.

Properties

children

children: any[]

The children of the group.

example

activeSheet.rowOutlines.group(2, 10);
activeSheet.rowOutlines.group(4, 2);
var outlineInfo = activeSheet.rowOutlines.find(2, 0);
console.log(outlineInfo.children[0] === activeSheet.rowOutlines.find(4, 1)); // true

end

end: number

The end index of the group.

example

activeSheet.rowOutlines.group(2, 10);
var outlineInfo = activeSheet.rowOutlines.find(2, 0);
console.log(outlineInfo.end); // 11

level

level: number

The level of the group.

example

activeSheet.rowOutlines.group(2, 10);
var outlineInfo = activeSheet.rowOutlines.find(2, 0);
console.log(outlineInfo.level); // 0

model

model: Outline

The owner of the group.

example

activeSheet.rowOutlines.group(2, 10);
var outlineInfo = activeSheet.rowOutlines.find(2, 0);
console.log(outlineInfo.model === activeSheet.rowOutlines); // true

parent

parent: OutlineInfo

The parent of the group.

example

activeSheet.rowOutlines.group(2, 10);
activeSheet.rowOutlines.group(4, 2);
var outlineInfo = activeSheet.rowOutlines.find(4, 1);
console.log(outlineInfo.parent === activeSheet.rowOutlines.find(2, 0)); // true

start

start: number

The start index of the group.

example

activeSheet.rowOutlines.group(2, 10);
var outlineInfo = activeSheet.rowOutlines.find(2, 0);
console.log(outlineInfo.start); // 2

Methods

addChild

addChild(child): void

Adds the child.

Parameters

Name Type Description
child Object The child.

Returns

void


contains

contains(index): boolean

Compares this instance to a specified OutlineInfo object and returns an indication of their relative values.

example

activeSheet.rowOutlines.group(2, 10);
activeSheet.rowOutlines.group(4, 2);
var outlineInfo1 = activeSheet.rowOutlines.find(2, 0);
var outlineInfo2 = activeSheet.rowOutlines.find(4, 1);
console.log(outlineInfo1.contains(5)); // true;
console.log(outlineInfo2.contains(5)); // true;
console.log(outlineInfo1.contains(6)); // true;
console.log(outlineInfo2.contains(6)); // false;

Parameters

Name Type Description
index number The index of the group item.

Returns

boolean

true if the range group contains the specified index; otherwise, false.


state

state(value?): OutlineState

Gets or sets the state of this outline (range group).

example

activeSheet.rowOutlines.group(2, 10);
activeSheet.rowOutlines.group(4, 2);
var outlineInfo = activeSheet.rowOutlines.find(4, 1);
console.log(outlineInfo.state()); // equals to GC.Spread.Sheets.Outlines.OutlineState.expanded
outlineInfo.state(GC.Spread.Sheets.Outlines.OutlineState.collapsed);
console.log(outlineInfo.state()); // equals to GC.Spread.Sheets.Outlines.OutlineState.collapsed
activeSheet.repaint(); // the outline is collapsed

Parameters

Name Type
value? OutlineState

Returns

OutlineState

The state of this outline (range group).