Class Index | File Index

Classes


Class links.TreeGrid.Grid


Defined in: treegrid.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
links.TreeGrid.Grid(data, options)
Method Summary
Method Attributes Method Name and Description
 
collapse(items)
 
eventListener(event, params)
 
expand(items)
 
findItem(itemData)
Find an Item by its data
 
Retrieve the available columns from the given fields
 
getItem(index)
retrieve item at given index.
 
Get the number of items
 
onDrop(event)
Event handler for drop event
 
Recalculate the size of all elements in the Grid (the width and height of header, items, fields)
 
Add an item to the list with expanded grids.
 
Redraw the grid this will recursively the header, the items, and the childs of items
 
setColumns(columns)
Update the columns of the header
 
setData(data)
Set or change the data or dataconnector for the grid
 
setItemCount(itemCount)
Set the number of items
 
Add an item to the list with expanded items This list is used to update all grids.
 
update the data: update items in the visible range, and update the item count
 
updateHeight(child, diffHeight)
Update the height of this grid, because a child's height has been changed.
Class Detail
links.TreeGrid.Grid(data, options)
Parameters:
{links.DataConnector} data
{Object} options
A key-value map with options
Method Detail
collapse(items)
Parameters:
items

eventListener(event, params)
Parameters:
event
params

expand(items)
Parameters:
items

{links.TreeGrid.Item | null} findItem(itemData)
Find an Item by its data
Parameters:
{Object} itemData
Returns:
{links.TreeGrid.Item | null}

getColumnsFromFields(fields)
Retrieve the available columns from the given fields
Parameters:
{Object} fields
example object containing field names/values

{links.TreeGrid.Item} getItem(index)
retrieve item at given index. If the node doesn't exist, it will be created The node will also be created when the index is out of range
Parameters:
{Number} index
Returns:
{links.TreeGrid.Item} item

{Number} getItemCount()
Get the number of items
Returns:
{Number} itemCount

onDrop(event)
Event handler for drop event
Parameters:
event

{Boolean} reflow()
Recalculate the size of all elements in the Grid (the width and height of header, items, fields)
Returns:
{Boolean} resized True if some elements are resized In that case, a redraw is required

registerExpandedItem(item)
Add an item to the list with expanded grids. This list is used to update all grids.
Parameters:
item

repaint()
Redraw the grid this will recursively the header, the items, and the childs of items

setColumns(columns)
Update the columns of the header
Parameters:
{Object[]} columns
Column names and additional information The object contains parameters 'name', and optionally 'text', 'title'

setData(data)
Set or change the data or dataconnector for the grid
Parameters:
{Array | links.DataConnector} data

setItemCount(itemCount)
Set the number of items
Parameters:
{Number} itemCount

unregisterExpandedItem(item)
Add an item to the list with expanded items This list is used to update all grids.
Parameters:
item

update()
update the data: update items in the visible range, and update the item count

updateHeight(child, diffHeight)
Update the height of this grid, because a child's height has been changed. This will not cause any repaints, but just updates the height of this node. updateHeight() is called via an onUpdateHeight() from a child node.
Parameters:
{links.TreeGrid.Node} child
{Number} diffHeight
change in height

Documentation generated by JsDoc Toolkit 2.3.2 on Fri Nov 20 2015 11:10:07 GMT+0100 (CET)