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
| Name | Type | Optional | Default | Descripton |
oOlapGrid | | The OLAP grid this view manager is to be used with |
Properties
| Name | Type | get | set | Descripton |
axisHeight | Number | ![]() | Returns the height of the column header for the axis. | |
axisOnTop | Number | ![]() | ![]() | This 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. |
axisWidth | Number | ![]() | Returns the width of the row header for the axis | |
cellMinimumHeight | Number | ![]() | ![]() | The minimum height a cell might have. This is used when the user resizes a row. Setting this does not update the exisiting rows. |
cellMinimumWidth | Number | ![]() | ![]() | The minimum width a cell might have. This is used when the user resizes a colum. Setting this does not update the exisiting columns. |
cellPaddingX | Number | ![]() | This returns the amount of padding to take into account when sizing the cells This returns different values depending on the user agent. | |
cellPaddingY | Number | ![]() | This returns the amount of padding to take into account when sizing the cells This returns different values depending on the user agent. | |
dataModel | | ![]() | The data model that is used with the OLAP grid | |
fixedLeftWidth | Number | ![]() | This is the width of the row header and the fixed columns | |
fixedTopHeight | Number | ![]() | This is the height of the header and the fixed rows | |
olapGrid | | ![]() | The OLAP grid this view manager is to be used with | |
scrollLeft | Number | ![]() | Sets the scroll left to the view manager so that the view manager can figure out what column to start at | |
scrollTop | Number | ![]() | Sets the scroll top to the view manager so that the view manager can figure out what row to start at | |
showGridLines | Boolean | ![]() | ![]() | Whether to show grid lines between the cells in the OLAP grid |
visibleCellsHeight | Number | ![]() | This is the sum of all the cell heights in the scrollable part of the grid | |
visibleCellsWidth | Number | ![]() | This is the sum of all the cell widths in the scrollable part of the grid |
Methods
| Name | Description |
getAreaHeight | The returns the height (in pixels) of an area |
getAreaWidth | The returns the width (in pixels) of an area |
getAxisCellHeight | This returns the height, in pixels, of a cell in the row header for the given axis. |
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 |
getAxisCellPositionWidth | The number of positions the axis header cell takes up. This only includes visible cells |
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. |
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. |
getAxisDimensionCount | This returns the number of visible dimensions for the given axis |
getAxisDimensionVisible | Whether the dimension is visible |
getAxisPositionDistance | This returns the distance (in positions) between 2 cells. This subtracts any hidden cells between the 2 cells |
getCellAt | This return the cell at a the given location in the OLAP grid. This returns an object with an x and y field. |
getCellBounds | Returns the boundaries for the cell. This returns an object with left, top width and height fields describing the boundaries. |
getCellHeight | Returns the height for the given cell |
getCellLeft | Returns the left position of a cell. This is relative to the first cell and it takes hidden columns into account |
getCellTop | Returns the top position of a cell. This is relative to the first cell and it takes hidden rows into account |
getCellWidth | Returns the width for the given cell |
getCellVisible | Returns whether the cell is visible |
getDimensionAt | Returns the dimension index at the distance y from the edge |
getDimensionHeight | The height for the header representing a dimension in the column header |
getDimensionLeft | This returns the left position of a dimension header in the axis header |
getDimensionTop | This returns the top position of a dimension header in the axis header |
getDimensionWidth | The width for the header representing a dimension in the row header |
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. |
getFirstVisibleCell | This returns the first visible cell on the axis. This includes the cells in the fixed section of the viewport. |
getFirstVisibleDimension | This returns the first visible dimension |
getFixedCell | This is the first cell in the fixed section of the viewport. |
getLastVisibleCell | This returns the last visible cell on the axis |
getMinCellPosition | Returns the leftmost position of two |
getNextAxisPosition | This returns the position of the next axis header cell |
getNextDimension | This returns the next visible dimension |
getNextVisibleCell | Returns the next visible cell |
getNonFixedCell | This is the first cell in the scrollable (non fixed) section of the viewport. |
getPreviousVisibleCell | Returns the previous visible cell |
getShowHeaders | Whether to show the headers for the axis |
getVisibleCellIndex | This returns the index of the cell taken hidden cells into account. If the given cell is hidden this returns null. |
getVisibleCellsCount | This is the number of visible cells. This includes cells in the fixed as well as the non fixed section of the viewport. |
resetCache | Resets the cached properties. This empties the cache so that all properties become up to date |
scrollAreaIntoView | This scrolls the OLAP grid so that the given area becomes visible |
scrollCellIntoView | Scrolls the OLAP grid so that the given cell becomes visible |
scrollColumnIntoView | Scrolls the OLAP grid so that the given column becomes visible |
scrollRowIntoView | Scrolls the OLAP grid so that the given row becomes visible |
setAxisDimensionVisible | Sets whether the dimension is visible |
setCellHeight | Sets the cell height for a given cell |
setCellWidth | Sets the cell width for a given cell |
setCellVisible | Sets the visibility for a cell (for a row or a column) |
setDimensionHeight | Sets the height for the header representing a dimension in the column header |
setDimensionWidth | Sets the width for the header representing a dimension in the row header |
setFixedCell | Sets the first cell in the fixed section of the viewport. |
setNonFixedCell | Sets the first cell in the scrollable (non fixed) section of the viewport. |
setShowHeaders | Sets 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
| Name | Type | Optional | Default | Descripton |
oArea | | The area to get the height for |
Return Type
Number
getAreaWidth
The returns the width (in pixels) of an area
Syntax
object.getAreaWidth ( oArea ) Parameters
| Name | Type | Optional | Default | Descripton |
oArea | | The 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
| Name | Type | Optional | Default | Descripton |
nDim | Number | The dimension index | ||
nPos | Number | The 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
| Name | Type | Optional | Default | Descripton |
nAxis | Number | The axis that the dimension is part of | ||
nDim | Number | The index of the dimension | ||
nPos | Number | The 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
| Name | Type | Optional | Default | Descripton |
nAxis | Number | The axis that the dimension is part of | ||
nDim | Number | The index of the dimension | ||
nPos | Number | The 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
| Name | Type | Optional | Default | Descripton |
nAxis | Number | The axis to the cell is part of | ||
nDim | Number | The index of the dimension | ||
nPos | Number | A 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
| Name | Type | Optional | Default | Descripton |
nDim | Number | The dimension index | ||
nPos | Number | The 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
| Name | Type | Optional | Default | Descripton |
nAxis | Number | The axis to get the dimension count for |
Return Type
Number
getAxisDimensionVisible
Whether the dimension is visible
Syntax
object.getAxisDimensionVisible ( nAxis,nDim ) Parameters
| Name | Type | Optional | Default | Descripton |
nAxis | Number | The axis that the dimension is part of | ||
nDim | Number | The 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
| Name | Type | Optional | Default | Descripton |
nAxis | Number | The axis the cells are part of | ||
p1 | Number | One of the positions | ||
p2 | Number | The 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
| Name | Type | Optional | Default | Descripton |
nLeft | Number | The left position (in pixels) to get the cell at | ||
nTop | Number | The top position (in pixels) to get the cell at | ||
nStartCol | Number | The starting column of the viewport | ||
nStartRow | Number | The 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
| 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 height for the given cell
Syntax
object.getCellHeight ( y ) Parameters
| Name | Type | Optional | Default | Descripton |
y | Number | The 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
| Name | Type | Optional | Default | Descripton |
mx | Number | The 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
| Name | Type | Optional | Default | Descripton |
my | Number | The position of the cell |
Return Type
Number
getCellWidth
Returns the width for the given cell
Syntax
object.getCellWidth ( x ) Parameters
| Name | Type | Optional | Default | Descripton |
x | Number | The position of the cell |
Return Type
Number
getCellVisible
Returns whether the cell is visible
Syntax
object.getCellVisible ( nAxis,nPos ) Parameters
| Name | Type | Optional | Default | Descripton |
nAxis | Number | The axis to get the cell visibility for | ||
nPos | Number | The 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
| Name | Type | Optional | Default | Descripton |
nAxis | Number | The axis to get the dimension index for | ||
y | Number | The 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
| Name | Type | Optional | Default | Descripton |
nDim | Number | The dimension index |
Return Type
Number
getDimensionLeft
This returns the left position of a dimension header in the axis header
Syntax
object.getDimensionLeft ( nDim ) Parameters
| Name | Type | Optional | Default | Descripton |
nDim | Number | The dimension index |
Return Type
Number
getDimensionTop
This returns the top position of a dimension header in the axis header
Syntax
object.getDimensionTop ( nDim ) Parameters
| Name | Type | Optional | Default | Descripton |
nDim | Number | The dimension index |
Return Type
Number
getDimensionWidth
The width for the header representing a dimension in the row header
Syntax
object.getDimensionWidth ( nDim ) Parameters
| Name | Type | Optional | Default | Descripton |
nDim | Number | The 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
| Name | Type | Optional | Default | Descripton |
nAxis | Number | The 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
| Name | Type | Optional | Default | Descripton |
nAxis | Number | The axis to get the cell for |
Return Type
Number
getFirstVisibleDimension
This returns the first visible dimension
Syntax
object.getFirstVisibleDimension ( nAxis ) Parameters
| Name | Type | Optional | Default | Descripton |
nAxis | Number | The 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
| Name | Type | Optional | Default | Descripton |
nAxis | Number | The axis to get the cell for |
Return Type
Number
getLastVisibleCell
This returns the last visible cell on the axis
Syntax
object.getLastVisibleCell ( nAxis ) Parameters
| Name | Type | Optional | Default | Descripton |
nAxis | Number | The axis to get the cell for |
Return Type
Number
getMinCellPosition
Returns the leftmost position of two
Syntax
object.getMinCellPosition ( nAxis,p1,p2 ) Parameters
| Name | Type | Optional | Default | Descripton |
nAxis | Number | The axis to compare | ||
p1 | Number | One of the positions | ||
p2 | Number | The other position |
Return Type
Number
getNextAxisPosition
This returns the position of the next axis header cell
Syntax
object.getNextAxisPosition ( nAxis,nDim,nPos ) Parameters
| Name | Type | Optional | Default | Descripton |
nAxis | Number | The axis to the cells are part of | ||
nDim | Number | The index of the dimension | ||
nPos | Number | The start position of the axis cell |
Return Type
Number
getNextDimension
This returns the next visible dimension
Syntax
object.getNextDimension ( nAxis,nDim ) Parameters
| Name | Type | Optional | Default | Descripton |
nAxis | Number | The axis that the dimension is part of | ||
nDim | Number | The dimension index to get the next after |
Return Type
Number
getNextVisibleCell
Returns the next visible cell
Syntax
object.getNextVisibleCell ( nAxis,nPos ) Parameters
| Name | Type | Optional | Default | Descripton |
nAxis | Number | The axis to get the cell for | ||
nPos | Number | The 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
| Name | Type | Optional | Default | Descripton |
nAxis | Number | The axis to get the cell for |
Return Type
Number
getPreviousVisibleCell
Returns the previous visible cell
Syntax
object.getPreviousVisibleCell ( nAxis,nPos ) Parameters
| Name | Type | Optional | Default | Descripton |
nAxis | Number | The axis to get the cell for | ||
nPos | Number | The position of the current cell |
Return Type
Number
getShowHeaders
Whether to show the headers for the axis
Syntax
object.getShowHeaders ( nAxis ) Parameters
| Name | Type | Optional | Default | Descripton |
nAxis | Number | The 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
| Name | Type | Optional | Default | Descripton |
nAxis | Number | The axis to get the cell for | ||
nPos | Number | The 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
| Name | Type | Optional | Default | Descripton |
nAxis | Number | The 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
| Name | Type | Optional | Default | Descripton |
oArea | | The 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
| 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 OLAP grid 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 OLAP grid 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
setAxisDimensionVisible
Sets whether the dimension is visible
Syntax
object.setAxisDimensionVisible ( nAxis,nDim,bVisible ) Parameters
| Name | Type | Optional | Default | Descripton |
nAxis | Number | The axis that the dimension is part of | ||
nDim | Number | The index of the dimension | ||
bVisible | Boolean | Whether to show the dimension |
Return Type
void
setCellHeight
Sets the cell height for a given cell
Syntax
object.setCellHeight ( y,h ) Parameters
| Name | Type | Optional | Default | Descripton |
y | Number | The position of the cell | ||
h | Number | The new height |
Return Type
void
setCellWidth
Sets the cell width for a given cell
Syntax
object.setCellWidth ( x,w ) Parameters
| Name | Type | Optional | Default | Descripton |
x | Number | The position of the cell | ||
w | Number | The 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
| Name | Type | Optional | Default | Descripton |
nAxis | Number | The axis to set the cell visibility for | ||
nPos | Number | The position of the cell | ||
bVis | Boolean | Whether 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
| Name | Type | Optional | Default | Descripton |
nDim | Number | The dimension index | ||
nHeight | Number | The 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
| Name | Type | Optional | Default | Descripton |
nDim | Number | The dimension index | ||
nWidth | Number | The 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
| Name | Type | Optional | Default | Descripton |
nAxis | Number | The axis to get the cell for | ||
nPos | Number | The 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
| Name | Type | Optional | Default | Descripton |
nAxis | Number | The axis to get the cell for | ||
nPos | Number | The 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
| Name | Type | Optional | Default | Descripton |
nAxis | Number | The axis | ||
b | Boolean | Shown or not |
Return Type
Boolean
