BiOlapGridViewManager

This class handles the visual properties of a BiOlapGrid

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

Constructor

new BiOlapGridViewManager ( oOlapGrid )

Parameters

NameTypeOptionalDefaultDescripton
oOlapGridBiOlapGridThe OLAP grid this view manager is to be used with

Properties

NameTypegetsetDescripton
axisHeightNumbercheckedReturns the height of the column header for the axis.
axisOnTopNumbercheckedcheckedThis is used to tell which axis is to be shown as the column headers and which to be shown as the row headers. A value of 0 means that the first axis should be shown at the top.
axisWidthNumbercheckedReturns the width of the row header for the axis
cellMinimumHeightNumbercheckedcheckedThe minimum height a cell might have. This is used when the user resizes a row. Setting this does not update the exisiting rows.
cellMinimumWidthNumbercheckedcheckedThe minimum width a cell might have. This is used when the user resizes a colum. Setting this does not update the exisiting columns.
cellPaddingXNumbercheckedThis returns the amount of padding to take into account when sizing the cells This returns different values depending on the user agent.
cellPaddingYNumbercheckedThis returns the amount of padding to take into account when sizing the cells This returns different values depending on the user agent.
dataModelBiOlapGridDataModelcheckedThe data model that is used with the OLAP grid
fixedLeftWidthNumbercheckedThis is the width of the row header and the fixed columns
fixedTopHeightNumbercheckedThis is the height of the header and the fixed rows
olapGridBiOlapGridcheckedThe OLAP grid this view manager is to be used with
scrollLeftNumbercheckedSets the scroll left to the view manager so that the view manager can figure out what column to start at
scrollTopNumbercheckedSets the scroll top to the view manager so that the view manager can figure out what row to start at
showGridLinesBooleancheckedcheckedWhether to show grid lines between the cells in the OLAP grid
visibleCellsHeightNumbercheckedThis is the sum of all the cell heights in the scrollable part of the grid
visibleCellsWidthNumbercheckedThis is the sum of all the cell widths in the scrollable part of the grid

Methods

NameDescription
getAreaHeightThe returns the height (in pixels) of an area
getAreaWidthThe returns the width (in pixels) of an area
getAxisCellHeightThis returns the height, in pixels, of a cell in the row header for the given axis.
getAxisCellIsVisibleWhether the axis cell is visible. For this to be true it is enough that any of the cells the axis cell covers is visible
getAxisCellPositionWidthThe number of positions the axis header cell takes up. This only includes visible cells
getAxisCellStartPositionThis takes a position and returns the position where the axis cell starts. This asks the data model for this information since the data model might be able to do a more efficient implementation than looping over all cells.
getAxisCellWidthThis returns the width of a cell in the column header for the given axis. This width is the number of pixels the cell should take up.
getAxisDimensionCountThis returns the number of visible dimensions for the given axis
getAxisDimensionVisibleWhether the dimension is visible
getAxisPositionDistanceThis returns the distance (in positions) between 2 cells. This subtracts any hidden cells between the 2 cells
getCellAtThis return the cell at a the given location in the OLAP grid. This returns an object with an x and y field.
getCellBoundsReturns the boundaries for the cell. This returns an object with left, top width and height fields describing the boundaries.
getCellHeightReturns the height for the given cell
getCellLeftReturns the left position of a cell. This is relative to the first cell and it takes hidden columns into account
getCellTopReturns the top position of a cell. This is relative to the first cell and it takes hidden rows into account
getCellWidthReturns the width for the given cell
getCellVisibleReturns whether the cell is visible
getDimensionAtReturns the dimension index at the distance y from the edge
getDimensionHeightThe height for the header representing a dimension in the column header
getDimensionLeftThis returns the left position of a dimension header in the axis header
getDimensionTopThis returns the top position of a dimension header in the axis header
getDimensionWidthThe width for the header representing a dimension in the row header
getFirstViewCellThis returns the first cell in the view. This is the first cell that should be shown in the scrollable part of the viewport of the OLAP grid.
getFirstVisibleCellThis returns the first visible cell on the axis. This includes the cells in the fixed section of the viewport.
getFirstVisibleDimensionThis returns the first visible dimension
getFixedCellThis is the first cell in the fixed section of the viewport.
getLastVisibleCellThis returns the last visible cell on the axis
getMinCellPositionReturns the leftmost position of two
getNextAxisPositionThis returns the position of the next axis header cell
getNextDimensionThis returns the next visible dimension
getNextVisibleCellReturns the next visible cell
getNonFixedCellThis is the first cell in the scrollable (non fixed) section of the viewport.
getPreviousVisibleCellReturns the previous visible cell
getShowHeadersWhether to show the headers for the axis
getVisibleCellIndexThis returns the index of the cell taken hidden cells into account. If the given cell is hidden this returns null.
getVisibleCellsCountThis is the number of visible cells. This includes cells in the fixed as well as the non fixed section of the viewport.
resetCacheResets the cached properties. This empties the cache so that all properties become up to date
scrollAreaIntoViewThis scrolls the OLAP grid so that the given area becomes visible
scrollCellIntoViewScrolls the OLAP grid so that the given cell becomes visible
scrollColumnIntoViewScrolls the OLAP grid so that the given column becomes visible
scrollRowIntoViewScrolls the OLAP grid so that the given row becomes visible
setAxisDimensionVisibleSets whether the dimension is visible
setCellHeightSets the cell height for a given cell
setCellWidthSets the cell width for a given cell
setCellVisibleSets the visibility for a cell (for a row or a column)
setDimensionHeightSets the height for the header representing a dimension in the column header
setDimensionWidthSets the width for the header representing a dimension in the row header
setFixedCellSets the first cell in the fixed section of the viewport.
setNonFixedCellSets the first cell in the scrollable (non fixed) section of the viewport.
setShowHeadersSets whether the headers for the axis is shown

Events

None.

Static Methods

None.

Static Fields

None.

Remarks

None.

Method Details

getAreaHeight

The returns the height (in pixels) of an area

Syntax

object.getAreaHeight ( oArea )

Parameters

NameTypeOptionalDefaultDescripton
oAreaBiAreaThe area to get the height for

Return Type

Number

getAreaWidth

The returns the width (in pixels) of an area

Syntax

object.getAreaWidth ( oArea )

Parameters

NameTypeOptionalDefaultDescripton
oAreaBiAreaThe area to get the width for

Return Type

Number

getAxisCellHeight

This returns the height, in pixels, of a cell in the row header for the given axis.

Syntax

object.getAxisCellHeight ( nDim,nPos )

Parameters

NameTypeOptionalDefaultDescripton
nDimNumberThe dimension index
nPosNumberThe start position of the cell

Return Type

Number

getAxisCellIsVisible

Whether the axis cell is visible. For this to be true it is enough that any of the cells the axis cell covers is visible

Syntax

object.getAxisCellIsVisible ( nAxis,nDim,nPos )

Parameters

NameTypeOptionalDefaultDescripton
nAxisNumberThe axis that the dimension is part of
nDimNumberThe index of the dimension
nPosNumberThe start position of the axis cell

Return Type

Boolean

getAxisCellPositionWidth

The number of positions the axis header cell takes up. This only includes visible cells

Syntax

object.getAxisCellPositionWidth ( nAxis,nDim,nPos )

Parameters

NameTypeOptionalDefaultDescripton
nAxisNumberThe axis that the dimension is part of
nDimNumberThe index of the dimension
nPosNumberThe start position of the axis cell

Return Type

Number

getAxisCellStartPosition

This takes a position and returns the position where the axis cell starts. This asks the data model for this information since the data model might be able to do a more efficient implementation than looping over all cells.

Syntax

object.getAxisCellStartPosition ( nAxis,nDim,nPos )

Parameters

NameTypeOptionalDefaultDescripton
nAxisNumberThe axis to the cell is part of
nDimNumberThe index of the dimension
nPosNumberA position that is part of the axis cell.

Return Type

Number

getAxisCellWidth

This returns the width of a cell in the column header for the given axis. This width is the number of pixels the cell should take up.

Syntax

object.getAxisCellWidth ( nDim,nPos )

Parameters

NameTypeOptionalDefaultDescripton
nDimNumberThe dimension index
nPosNumberThe start position of the cell

Return Type

Number

getAxisDimensionCount

This returns the number of visible dimensions for the given axis

Syntax

object.getAxisDimensionCount ( nAxis )

Parameters

NameTypeOptionalDefaultDescripton
nAxisNumberThe axis to get the dimension count for

Return Type

Number

getAxisDimensionVisible

Whether the dimension is visible

Syntax

object.getAxisDimensionVisible ( nAxis,nDim )

Parameters

NameTypeOptionalDefaultDescripton
nAxisNumberThe axis that the dimension is part of
nDimNumberThe index of the dimension

Return Type

Boolean

getAxisPositionDistance

This returns the distance (in positions) between 2 cells. This subtracts any hidden cells between the 2 cells

Syntax

object.getAxisPositionDistance ( nAxis,p1,p2 )

Parameters

NameTypeOptionalDefaultDescripton
nAxisNumberThe axis the cells are part of
p1NumberOne of the positions
p2NumberThe other position

Return Type

Number

getCellAt

This return the cell at a the given location in the OLAP grid. This returns an object with an x and y field.

Syntax

object.getCellAt ( nLeft,nTop,nStartCol,nStartRow )

Parameters

NameTypeOptionalDefaultDescripton
nLeftNumberThe left position (in pixels) to get the cell at
nTopNumberThe top position (in pixels) to get the cell at
nStartColNumberThe starting column of the viewport
nStartRowNumberThe starting row of the viewport

Return Type

Object

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

NameTypeOptionalDefaultDescripton
xNumberThe column index of the cell
yNumberThe row index of the cell

Return Type

Object

getCellHeight

Returns the height for the given cell

Syntax

object.getCellHeight ( y )

Parameters

NameTypeOptionalDefaultDescripton
yNumberThe position of the cell

Return Type

Number

getCellLeft

Returns the left position of a cell. This is relative to the first cell and it takes hidden columns into account

Syntax

object.getCellLeft ( mx )

Parameters

NameTypeOptionalDefaultDescripton
mxNumberThe position of the cell

Return Type

Number

getCellTop

Returns the top position of a cell. This is relative to the first cell and it takes hidden rows into account

Syntax

object.getCellTop ( my )

Parameters

NameTypeOptionalDefaultDescripton
myNumberThe position of the cell

Return Type

Number

getCellWidth

Returns the width for the given cell

Syntax

object.getCellWidth ( x )

Parameters

NameTypeOptionalDefaultDescripton
xNumberThe position of the cell

Return Type

Number

getCellVisible

Returns whether the cell is visible

Syntax

object.getCellVisible ( nAxis,nPos )

Parameters

NameTypeOptionalDefaultDescripton
nAxisNumberThe axis to get the cell visibility for
nPosNumberThe position of the cell

Return Type

Boolean

getDimensionAt

Returns the dimension index at the distance y from the edge

Syntax

object.getDimensionAt ( nAxis,y )

Parameters

NameTypeOptionalDefaultDescripton
nAxisNumberThe axis to get the dimension index for
yNumberThe distance from the edge.

Return Type

Number

getDimensionHeight

The height for the header representing a dimension in the column header

Syntax

object.getDimensionHeight ( nDim )

Parameters

NameTypeOptionalDefaultDescripton
nDimNumberThe dimension index

Return Type

Number

getDimensionLeft

This returns the left position of a dimension header in the axis header

Syntax

object.getDimensionLeft ( nDim )

Parameters

NameTypeOptionalDefaultDescripton
nDimNumberThe dimension index

Return Type

Number

getDimensionTop

This returns the top position of a dimension header in the axis header

Syntax

object.getDimensionTop ( nDim )

Parameters

NameTypeOptionalDefaultDescripton
nDimNumberThe dimension index

Return Type

Number

getDimensionWidth

The width for the header representing a dimension in the row header

Syntax

object.getDimensionWidth ( nDim )

Parameters

NameTypeOptionalDefaultDescripton
nDimNumberThe dimension index

Return Type

Number

getFirstViewCell

This returns the first cell in the view. This is the first cell that should be shown in the scrollable part of the viewport of the OLAP grid.

Syntax

object.getFirstViewCell ( nAxis )

Parameters

NameTypeOptionalDefaultDescripton
nAxisNumberThe axis to get the cell for

Return Type

Number

getFirstVisibleCell

This returns the first visible cell on the axis. This includes the cells in the fixed section of the viewport.

Syntax

object.getFirstVisibleCell ( nAxis )

Parameters

NameTypeOptionalDefaultDescripton
nAxisNumberThe axis to get the cell for

Return Type

Number

getFirstVisibleDimension

This returns the first visible dimension

Syntax

object.getFirstVisibleDimension ( nAxis )

Parameters

NameTypeOptionalDefaultDescripton
nAxisNumberThe axis that you want the dimension for

Return Type

Number

getFixedCell

This is the first cell in the fixed section of the viewport.

Syntax

object.getFixedCell ( nAxis )

Parameters

NameTypeOptionalDefaultDescripton
nAxisNumberThe axis to get the cell for

Return Type

Number

getLastVisibleCell

This returns the last visible cell on the axis

Syntax

object.getLastVisibleCell ( nAxis )

Parameters

NameTypeOptionalDefaultDescripton
nAxisNumberThe axis to get the cell for

Return Type

Number

getMinCellPosition

Returns the leftmost position of two

Syntax

object.getMinCellPosition ( nAxis,p1,p2 )

Parameters

NameTypeOptionalDefaultDescripton
nAxisNumberThe axis to compare
p1NumberOne of the positions
p2NumberThe other position

Return Type

Number

getNextAxisPosition

This returns the position of the next axis header cell

Syntax

object.getNextAxisPosition ( nAxis,nDim,nPos )

Parameters

NameTypeOptionalDefaultDescripton
nAxisNumberThe axis to the cells are part of
nDimNumberThe index of the dimension
nPosNumberThe start position of the axis cell

Return Type

Number

getNextDimension

This returns the next visible dimension

Syntax

object.getNextDimension ( nAxis,nDim )

Parameters

NameTypeOptionalDefaultDescripton
nAxisNumberThe axis that the dimension is part of
nDimNumberThe dimension index to get the next after

Return Type

Number

getNextVisibleCell

Returns the next visible cell

Syntax

object.getNextVisibleCell ( nAxis,nPos )

Parameters

NameTypeOptionalDefaultDescripton
nAxisNumberThe axis to get the cell for
nPosNumberThe position of the current cell

Return Type

Number

getNonFixedCell

This is the first cell in the scrollable (non fixed) section of the viewport.

Syntax

object.getNonFixedCell ( nAxis )

Parameters

NameTypeOptionalDefaultDescripton
nAxisNumberThe axis to get the cell for

Return Type

Number

getPreviousVisibleCell

Returns the previous visible cell

Syntax

object.getPreviousVisibleCell ( nAxis,nPos )

Parameters

NameTypeOptionalDefaultDescripton
nAxisNumberThe axis to get the cell for
nPosNumberThe position of the current cell

Return Type

Number

getShowHeaders

Whether to show the headers for the axis

Syntax

object.getShowHeaders ( nAxis )

Parameters

NameTypeOptionalDefaultDescripton
nAxisNumberThe axis

Return Type

Boolean

getVisibleCellIndex

This returns the index of the cell taken hidden cells into account. If the given cell is hidden this returns null.

Syntax

object.getVisibleCellIndex ( nAxis,nPos )

Parameters

NameTypeOptionalDefaultDescripton
nAxisNumberThe axis to get the cell for
nPosNumberThe position of the current cell

Return Type

Number

getVisibleCellsCount

This is the number of visible cells. This includes cells in the fixed as well as the non fixed section of the viewport.

Syntax

object.getVisibleCellsCount ( nAxis )

Parameters

NameTypeOptionalDefaultDescripton
nAxisNumberThe axis to get the cell count for

Return Type

Number

resetCache

Resets the cached properties. This empties the cache so that all properties become up to date

Syntax

object.resetCache ( )

Parameters

No arguments.

Return Type

void

scrollAreaIntoView

This scrolls the OLAP grid so that the given area becomes visible

Syntax

object.scrollAreaIntoView ( oArea )

Parameters

NameTypeOptionalDefaultDescripton
oAreaBiAreaThe area to scroll into view

Return Type

void

scrollCellIntoView

Scrolls the OLAP grid so that the given cell becomes visible

Syntax

object.scrollCellIntoView ( x,y )

Parameters

NameTypeOptionalDefaultDescripton
xNumberThe column index of the cell to scroll into view
yNumberThe row index of the cell to scroll into view

Return Type

void

scrollColumnIntoView

Scrolls the OLAP grid so that the given column becomes visible

Syntax

object.scrollColumnIntoView ( x )

Parameters

NameTypeOptionalDefaultDescripton
xNumberThe index of the column to scroll into view

Return Type

void

scrollRowIntoView

Scrolls the OLAP grid so that the given row becomes visible

Syntax

object.scrollRowIntoView ( y )

Parameters

NameTypeOptionalDefaultDescripton
yNumberThe index of the row to scroll into view

Return Type

void

setAxisDimensionVisible

Sets whether the dimension is visible

Syntax

object.setAxisDimensionVisible ( nAxis,nDim,bVisible )

Parameters

NameTypeOptionalDefaultDescripton
nAxisNumberThe axis that the dimension is part of
nDimNumberThe index of the dimension
bVisibleBooleanWhether to show the dimension

Return Type

void

setCellHeight

Sets the cell height for a given cell

Syntax

object.setCellHeight ( y,h )

Parameters

NameTypeOptionalDefaultDescripton
yNumberThe position of the cell
hNumberThe new height

Return Type

void

setCellWidth

Sets the cell width for a given cell

Syntax

object.setCellWidth ( x,w )

Parameters

NameTypeOptionalDefaultDescripton
xNumberThe position of the cell
wNumberThe new width

Return Type

void

setCellVisible

Sets the visibility for a cell (for a row or a column)

Syntax

object.setCellVisible ( nAxis,nPos,bVis )

Parameters

NameTypeOptionalDefaultDescripton
nAxisNumberThe axis to set the cell visibility for
nPosNumberThe position of the cell
bVisBooleanWhether to make the cell visible

Return Type

void

setDimensionHeight

Sets the height for the header representing a dimension in the column header

Syntax

object.setDimensionHeight ( nDim,nHeight )

Parameters

NameTypeOptionalDefaultDescripton
nDimNumberThe dimension index
nHeightNumberThe new height for the dimension

Return Type

Number

setDimensionWidth

Sets the width for the header representing a dimension in the row header

Syntax

object.setDimensionWidth ( nDim,nWidth )

Parameters

NameTypeOptionalDefaultDescripton
nDimNumberThe dimension index
nWidthNumberThe new width for the dimension

Return Type

Number

setFixedCell

Sets the first cell in the fixed section of the viewport.

Syntax

object.setFixedCell ( nAxis,nPos )

Parameters

NameTypeOptionalDefaultDescripton
nAxisNumberThe axis to get the cell for
nPosNumberThe position to start the fixed section at

Return Type

void

setNonFixedCell

Sets the first cell in the scrollable (non fixed) section of the viewport.

Syntax

object.setNonFixedCell ( nAxis,nPos )

Parameters

NameTypeOptionalDefaultDescripton
nAxisNumberThe axis to get the cell for
nPosNumberThe position to start the non fixed section at

Return Type

void

setShowHeaders

Sets whether the headers for the axis is shown

Syntax

object.setShowHeaders ( nAxis,b )

Parameters

NameTypeOptionalDefaultDescripton
nAxisNumberThe axis
bBooleanShown or not

Return Type

Boolean