BiTreeViewViewManager

This class handles the visual properties of a BiTreeView

This class extends BiObject and therefore all methods and fields available for BiObject are also available for BiTreeViewViewManager .

Constructor

new BiTreeViewViewManager ( [ oTreeView ] )

Parameters

Name Type Optional Default Descripton
oTreeView BiTreeView checked The tree view this view manager is to be used with

Properties

Name Type get set Descripton
ascendingIcon String checked checked The path to the arrow image to use for ascending sort
cellPaddingX Number checked This returns the amount of padding to take into account when sizing the cells This returns different values depending on the user agent.
columnCount Number checked The number of columns to show
columnOrders Number[] checked checked The order of the columns in the visual representation
dataModel BiTreeViewDataModel checked The data model that is used with the tree view
descendingIcon String checked checked The path to the arrow image to use for descending sort
firstVisibleColumn Number checked The first visible column in the tree view viewport
firstVisibleRow Number checked The first shown row in the viewport
headerCellPaddingX Number checked This returns the amount of padding to take into account when sizing the header cells This returns different values depending on the user agent.
headersHeight Number checked checked The height of the column headers
highlightSortColumn Boolean checked checked Whether to highlight the background of the sorted column
indentColumn Number checked checked The index of the column that should be indented. Use -1 to not show any indention
pageCount Number checked The number of rows shown in the viewport
rowHeadersWidth Number checked checked The width of the row headers
rowHeight Number checked checked The height of a row in the tree view
scrollLeft Number checked Sets the scroll left to the view manager so that the view manager can figure out what column to start at
scrollTop Number checked Sets the scroll top to the view manager so that the view manager can figure out what row to start at
showGridLines Boolean checked checked Whether to show grid lines between the cells in the tree view
showHeaders Boolean checked checked Whether to show the headers
shownColumnsWidth Number checked This is the sum of all the column widths
showRowHeaders Boolean checked checked Whether to show the row headers
treeView BiTreeView checked checked The tree view this view manager is to be used with

Methods

Name Description
fitColumnWidths Resizes all columns to fit inside the grid.
getCanMoveColumn Whether the user can drag the column header to reorder the columns
getCanResizeColumn Whether the column at x can be resize
getCellBounds Returns the boundaries for the cell. This returns an object with left, top width and height fields describing the boundaries.
getCellHeight Returns the row height for the row. For a BiTreeView this should be the same for all rows.
getCellWidth Returns the width for a column. (Same as getColumnWidth)
getColumnAt Returns the column at the x position. x is the distance from the left edge (if row headers visible left edge is to the left edge of the row headers
getColumnBounds Returns the boundaries for the column. This returns an object with left, top width and height fields describing the boundaries.
getColumnLeft Returns the left position for the column.
getColumnWidth This returns the width of the xth column
getColumnVisible Whether the column at x is visible or hidden
getHeaderBounds Returns the boundaries for the header. This returns an object with left, top width and height fields describing the boundaries.
getModelColumn Returns the column index in the data model for the visual column index
getNextColumn Returns the index of the column coming after the given column
getPreviousColumn Returns the index of the column coming before the given column
getRowAt Returns the row at the y position. y is the distance from the upper edge in pixels
getRowBounds Returns the boundaries for the row. This returns an object with left, top width and height fields describing the boundaries.
getShowExpandIcon Whether to show the expand icon (plus/minus icon) for the given row
getViewColumn Returns the visual column index for the index in the data model
insertColumnBefore Inserts a column before another column
resetCache resets the cached properties. This is called after the columns are changed
rowCountChanged This is called when the row count changes.
scrollCellIntoView Scrolls the tree view so that the given cell becomes visible
scrollColumnIntoView Scrolls the tree view so that the given column becomes visible
scrollRowIntoView Scrolls the tree view so that the given row becomes visible
scrollSubtreeIntoView Scrolls a subtree into view (if possible)
setColumnWidth Sets the width of the xth column
setColumnVisible Sets whether a column should be visible or not

Events

None.

Static Methods

None.

Static Fields

None.

Remarks

Method Details

fitColumnWidths

Resizes all columns to fit inside the grid.

Syntax

object.fitColumnWidths
 (
 
 )
 

Parameters

No arguments.

Return Type

void

getCanMoveColumn

Whether the user can drag the column header to reorder the columns

Syntax

object.getCanMoveColumn
 (
 x
 )
 

Parameters

Name Type Optional Default Descripton
x Number The index of the column

Return Type

Boolean

getCanResizeColumn

Whether the column at x can be resize

Syntax

object.getCanResizeColumn
 (
 x
 )
 

Parameters

Name Type Optional Default Descripton
x Number The index of the column

Return Type

Boolean

getCellBounds

Returns the boundaries for the cell. This returns an object with left, top width and height fields describing the boundaries.

Syntax

object.getCellBounds
 (
 x,y
 )
 

Parameters

Name Type Optional Default Descripton
x Number The column index of the cell
y Number The row index of the cell

Return Type

Object

getCellHeight

Returns the row height for the row. For a BiTreeView this should be the same for all rows.

Syntax

object.getCellHeight
 (
 y
 )
 

Parameters

Name Type Optional Default Descripton
y Number The row to get the height for

Return Type

Number

getCellWidth

Returns the width for a column. (Same as getColumnWidth)

Syntax

object.getCellWidth
 (
 x
 )
 

Parameters

Name Type Optional Default Descripton
x Number The column to get the width for

Return Type

Number

getColumnAt

Returns the column at the x position. x is the distance from the left edge (if row headers visible left edge is to the left edge of the row headers

Syntax

object.getColumnAt
 (
 x
 )
 

Parameters

Name Type Optional Default Descripton
x Number The distance (in pixels) from the left edge.

Return Type

Number

getColumnBounds

Returns the boundaries for the column. This returns an object with left, top width and height fields describing the boundaries.

Syntax

object.getColumnBounds
 (
 x
 )
 

Parameters

Name Type Optional Default Descripton
x Number The index of the column

Return Type

Object

getColumnLeft

Returns the left position for the column.

Syntax

object.getColumnLeft
 (
 x
 )
 

Parameters

Name Type Optional Default Descripton
x Number The index of the column

Return Type

Number

getColumnWidth

This returns the width of the xth column

Syntax

object.getColumnWidth
 (
 x
 )
 

Parameters

Name Type Optional Default Descripton
x Number The index of the column to get the width for

Return Type

Number

getColumnVisible

Whether the column at x is visible or hidden

Syntax

object.getColumnVisible
 (
 x
 )
 

Parameters

Name Type Optional Default Descripton
x Number The column index

Return Type

Boolean

getHeaderBounds

Returns the boundaries for the header. This returns an object with left, top width and height fields describing the boundaries.

Syntax

object.getHeaderBounds
 (
 x
 )
 

Parameters

Name Type Optional Default Descripton
x Number The column index of the header cell

Return Type

Object

getModelColumn

Returns the column index in the data model for the visual column index

Syntax

object.getModelColumn
 (
 vx
 )
 

Parameters

Name Type Optional Default Descripton
vx Number The visual column index

Return Type

Number

getNextColumn

Returns the index of the column coming after the given column

Syntax

object.getNextColumn
 (
 mx
 )
 

Parameters

Name Type Optional Default Descripton
mx Number The index of the column

Return Type

Number

getPreviousColumn

Returns the index of the column coming before the given column

Syntax

object.getPreviousColumn
 (
 mx
 )
 

Parameters

Name Type Optional Default Descripton
mx Number The index of the column

Return Type

Number

getRowAt

Returns the row at the y position. y is the distance from the upper edge in pixels

Syntax

object.getRowAt
 (
 y
 )
 

Parameters

Name Type Optional Default Descripton
y Number The distance (in pixels) from the upper edge.

Return Type

Number

getRowBounds

Returns the boundaries for the row. This returns an object with left, top width and height fields describing the boundaries.

Syntax

object.getRowBounds
 (
 y
 )
 

Parameters

Name Type Optional Default Descripton
y Number The index of the row

Return Type

Object

getShowExpandIcon

Whether to show the expand icon (plus/minus icon) for the given row

Syntax

object.getShowExpandIcon
 (
 y
 )
 

Parameters

Name Type Optional Default Descripton
y Number The row index

Return Type

Boolean

getViewColumn

Returns the visual column index for the index in the data model

Syntax

object.getViewColumn
 (
 mx
 )
 

Parameters

Name Type Optional Default Descripton
mx Number The index in the data model

Return Type

Number

insertColumnBefore

Inserts a column before another column

Syntax

object.insertColumnBefore
 (
 x,beforeX
 )
 

Parameters

Name Type Optional Default Descripton
x Number The index of the column to insert
beforeX Number The index of the column to insert before

Return Type

void

resetCache

resets the cached properties. This is called after the columns are changed

Syntax

object.resetCache
 (
 
 )
 

Parameters

No arguments.

Return Type

void

rowCountChanged

This is called when the row count changes.

Syntax

object.rowCountChanged
 (
 nRow,nCount
 )
 

Parameters

Name Type Optional Default Descripton
nRow Number The row that change starts at
nCount Number The rows that was added or removed

Return Type

void

scrollCellIntoView

Scrolls the tree view so that the given cell becomes visible

Syntax

object.scrollCellIntoView
 (
 x,y
 )
 

Parameters

Name Type Optional Default Descripton
x Number The column index of the cell to scroll into view
y Number The row index of the cell to scroll into view

Return Type

void

scrollColumnIntoView

Scrolls the tree view so that the given column becomes visible

Syntax

object.scrollColumnIntoView
 (
 x
 )
 

Parameters

Name Type Optional Default Descripton
x Number The index of the column to scroll into view

Return Type

void

scrollRowIntoView

Scrolls the tree view so that the given row becomes visible

Syntax

object.scrollRowIntoView
 (
 y
 )
 

Parameters

Name Type Optional Default Descripton
y Number The index of the row to scroll into view

Return Type

void

scrollSubtreeIntoView

Scrolls a subtree into view (if possible)

Syntax

object.scrollSubtreeIntoView
 (
 y
 )
 

Parameters

Name Type Optional Default Descripton
y Number The row index of the row whos subtree should be scrolled into view

Return Type

void

setColumnWidth

Sets the width of the xth column

Syntax

object.setColumnWidth
 (
 x,w
 )
 

Parameters

Name Type Optional Default Descripton
x Number The index of the column to set the width for
w Number The new width

Return Type

void

setColumnVisible

Sets whether a column should be visible or not

Syntax

object.setColumnVisible
 (
 x,b
 )
 

Parameters

Name Type Optional Default Descripton
x Number The column index (in the data model) that should be hidden or shown
b Booleab Whether to hide or show the colunm

Return Type

void