Class sap.gantt.GanttChartWithTableModule: sap/gantt/GanttChartWithTable


Embed a sap.ui.table.TreeTable and a sap.gantt.GanttChart side-by-side.

This class defines: The TreeTable part provide a column view of data with sorting/filtering functions available. The svg chart part provide graphic Gantt chart view of data. Both width can be adjusted by a splitter bar, and row scrolling are always synchronized.3

Constructor Summary
new sap.gantt.GanttChartWithTable(sId?, mSettings?)Creates and initializes a new Gantt Chart with a TreeTable control on the left and a svg chart area on the right.
Events borrowed from class sap.ui.core.Control
Method Summary
sap.gantt.GanttChartWithTable.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.gantt.GanttChartWithTable with name sClassName and enriches it with the information contained in oClassInfo.
sap.gantt.GanttChartWithTable.getMetadata()Returns a metadata object for class sap.gantt.GanttChartWithTable.
addColumn(oColumn)Adds some column to the aggregation columns.
addCustomToolbarItem(oCustomToolbarItem)Adds some customToolbarItem to the aggregation customToolbarItems.
autoResizeColumn(iColId)Triggers automatic resizing of a column to the widest content.
bindCustomToolbarItems(oBindingInfo)Binds aggregation customToolbarItems to model data.
collapse(iRowIndex)Collapses the row for the given row index in the selection panel
deselectRelationships(aIds?)Deselects relationships and returns a success code.
deselectRows(aIds?)Deselects rows and returns a success code.
deselectShapes(aIds?)Deselects in-row shapes and returns a success code.
destroyColumns()Destroys all the columns in the aggregation columns.
destroyCustomToolbarItems()Destroys all the customToolbarItems in the aggregation customToolbarItems.
expand(iRowIndex)Expands the row for the given row index in the selection panel
expandToLevel(iLevel)Expands the selection panel to the given level
getAllSelections()Gets all selected rows, shapes, and relationships
getCellCallback()Gets current value of property cellCallback.
getColumns()Gets content of aggregation columns.
getCustomToolbarItems()Gets content of aggregation customToolbarItems.
getFirstVisibleRow()Gets the first visible row of the selection panel.
getFixedColumnCount()Gets current value of property fixedColumnCount.
getRowByShapeUid(sShapeUid?)Get row object by shape uid
getSelectedIndex()Retrieves the lead selection index.
getSelectedRelationships()Gets selected relationships.
getSelectedRows()Gets selected rows.
getSelectedShapes()Gets selected in-row shapes.
getToolbarSchemeKey()Returns the effective toolbar scheme key.
getVisibleRowCount()Gets the number of visible rows in the selection panel.
indexOfColumn(oColumn)Checks for the provided sap.ui.table.Column in the aggregation columns.
indexOfCustomToolbarItem(oCustomToolbarItem)Checks for the provided sap.ui.core.Control in the aggregation customToolbarItems.
insertColumn(oColumn, iIndex)Inserts a column into the aggregation columns.
insertCustomToolbarItem(oCustomToolbarItem, iIndex)Inserts a customToolbarItem into the aggregation customToolbarItems.
jumpToPosition(oDate)Scrolls the visible chart area to a certain time.
removeAllColumns()Removes all the controls from the aggregation columns.
removeAllCustomToolbarItems()Removes all the controls from the aggregation customToolbarItems.
removeColumn(vColumn)Removes a column from the aggregation columns.
removeCustomToolbarItem(vCustomToolbarItem)Removes a customToolbarItem from the aggregation customToolbarItems.
selectRelationships(aIds?, isExclusive?)Selects relationships and returns a success code.
selectRows(aIds?, isExclusive?)Selects rows and returns a success code.
selectRowsAndShapes(aIds?, bIsExclusive?)Selects rows and all in-row shapes contained in the rows.
selectShapes(aIds?, isExclusive?)Selects in-row shapes and returns a success code.
setCellCallback(oCellCallback)Sets a new value for property cellCallback.
setFirstVisibleRow(iRowIndex)Sets the first visible row in the selection panel.
setFixedColumnCount(iFixedColumnCount)Sets a new value for property fixedColumnCount.
setSelectedIndex(iRowIndex)Selects a row in the selection panel.
unbindCustomToolbarItems()Unbinds aggregation customToolbarItems from model data.
Methods borrowed from class sap.gantt.GanttChartBase
addRelationship, addRow, attachChartClick, attachChartDoubleClick, attachChartDragEnter, attachChartDragLeave, attachChartMouseOver, attachChartRightClick, attachGanttChartSwitchRequested, attachHorizontalScroll, attachRelationshipSelectionChange, attachRowSelectionChange, attachShapeDragEnd, attachShapeSelectionChange, attachSplitterResize, attachTreeTableToggleEvent, attachVerticalScroll, bindCalendarDef, bindRelationships, bindRows, destroyCalendarDef, destroyRelationships, destroyRows, detachChartClick, detachChartDoubleClick, detachChartDragEnter, detachChartDragLeave, detachChartMouseOver, detachChartRightClick, detachGanttChartSwitchRequested, detachHorizontalScroll, detachRelationshipSelectionChange, detachRowSelectionChange, detachShapeDragEnd, detachShapeSelectionChange, detachSplitterResize, detachTreeTableToggleEvent, detachVerticalScroll, fireChartClick, fireChartDoubleClick, fireChartDragEnter, fireChartDragLeave, fireChartMouseOver, fireChartRightClick, fireGanttChartSwitchRequested, fireHorizontalScroll, fireRelationshipSelectionChange, fireRowSelectionChange, fireShapeDragEnd, fireShapeSelectionChange, fireSplitterResize, fireTreeTableToggleEvent, fireVerticalScroll, getAxisOrdinal, getAxisTime, getBaseRowHeight, getCalendarDef, getChartSchemes, getEnableCursorLine, getEnableNowLine, getEnableVerticalLine, getHeight, getHierarchies, getHierarchyKey, getLocale, getMode, getModes, getObjectTypes, getRelationships, getRows, getSelectionMode, getSelectionPanelSize, getShapeDataNames, getShapes, getSvgDefs, getTimeAxis, getTimeZoomRate, getToolbarSchemes, getWidth, handleExpandChartChange, indexOfRelationship, indexOfRow, init, insertRelationship, insertRow, notifySourceChange, removeAllRelationships, removeAllRows, removeRelationship, removeRow, setBaseRowHeight, setCalendarDef, setChartSchemes, setEnableCursorLine, setEnableNowLine, setEnableVerticalLine, setHeight, setHierarchies, setHierarchyKey, setLocale, setMode, setModes, setObjectTypes, setSelectionMode, setSelectionPanelSize, setShapeDataNames, setShapes, setSvgDefs, setTimeAxis, setTimeZoomRate, setToolbarSchemes, setWidth, unbindCalendarDef, unbindRelationships, unbindRows
Constructor Detail
new sap.gantt.GanttChartWithTable(sId?, mSettings?)
Creates and initializes a new Gantt Chart with a TreeTable control on the left and a svg chart area on the right.

Accepts an object literal mSettings that defines initial property values, aggregated and associated objects as well as event handlers. See sap.ui.base.ManagedObject for a general description of the syntax of the settings object.

The supported settings are:

In addition, all settings applicable to the base type sap.gantt.GanttChartBase can be used as well.

Parameters:
{string}sId? id for the new control, generated automatically if no id is given
{object}mSettings? initial settings for the new control
Method Detail
sap.gantt.GanttChartWithTable.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.gantt.GanttChartWithTable with name sClassName and enriches it with the information contained in oClassInfo.

oClassInfo might contain the same kind of information as described in sap.gantt.GanttChartBase.extend.

Parameters:
{string}sClassName Name of the class being created
{object}oClassInfo? Object literal with information about the class
{function}FNMetaImpl? Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata
Returns:
{function} Created class / constructor function
sap.gantt.GanttChartWithTable.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.gantt.GanttChartWithTable.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
addColumn(oColumn): sap.gantt.GanttChartWithTable
Adds some column to the aggregation columns.
Parameters:
{sap.ui.table.Column}oColumn the column to add; if empty, nothing is inserted
Returns:
{sap.gantt.GanttChartWithTable} Reference to this in order to allow method chaining
addCustomToolbarItem(oCustomToolbarItem): sap.gantt.GanttChartWithTable
Adds some customToolbarItem to the aggregation customToolbarItems.
Parameters:
{sap.ui.core.Control}oCustomToolbarItem the customToolbarItem to add; if empty, nothing is inserted
Returns:
{sap.gantt.GanttChartWithTable} Reference to this in order to allow method chaining
autoResizeColumn(iColId)
Triggers automatic resizing of a column to the widest content.(experimental!)
Parameters:
{int}iColId column id
See:
sap.ui.table.Table.autoResizeColumn
bindCustomToolbarItems(oBindingInfo): sap.gantt.GanttChartWithTable
Binds aggregation customToolbarItems to model data.

See ManagedObject.bindAggregation for a detailed description of the possible properties of oBindingInfo.

Parameters:
{object}oBindingInfo The binding information
Returns:
{sap.gantt.GanttChartWithTable} Reference to this in order to allow method chaining
collapse(iRowIndex): sap.gantt.GanttChartWithTable
Collapses the row for the given row index in the selection panel
Parameters:
{int}iRowIndex index of the row to expand
Returns:
{sap.gantt.GanttChartWithTable} A reference to the GanttChartWithTable control, which can be used for chaining
See:
sap.ui.table.Table.collapse
deselectRelationships(aIds?): boolean
Deselects relationships and returns a success code.
Parameters:
{array}aIds? List of the relationships that you want to deselect
Returns:
{boolean} - If any selection change is applied, returns true.
deselectRows(aIds?): boolean
Deselects rows and returns a success code.
Parameters:
{array}aIds? List of the rows that you want to deselect
Returns:
{boolean} - If any selection change is applied, returns true.
deselectShapes(aIds?): boolean
Deselects in-row shapes and returns a success code.
Parameters:
{array}aIds? List the shapes that you want to deselect
Returns:
{boolean} If any selection change is applied, returns true.
Destroys all the columns in the aggregation columns.
Returns:
{sap.gantt.GanttChartWithTable} Reference to this in order to allow method chaining
destroyCustomToolbarItems(): sap.gantt.GanttChartWithTable
Destroys all the customToolbarItems in the aggregation customToolbarItems.
Returns:
{sap.gantt.GanttChartWithTable} Reference to this in order to allow method chaining
expand(iRowIndex): sap.gantt.GanttChartWithTable
Expands the row for the given row index in the selection panel
Parameters:
{int}iRowIndex Index of the row to expand
Returns:
{sap.gantt.GanttChartWithTable} A reference to the GanttChartWithTable control, which can be used for chaining
See:
sap.ui.table.Table.expand
expandToLevel(iLevel): sap.gantt.GanttChartWithTable
Expands the selection panel to the given level
Parameters:
{int}iLevel Level of the selection panel to expand
Returns:
{sap.gantt.GanttChartWithTable} A reference to the GanttChartWithTable control, which can be used for chaining
See:
sap.ui.table.TreeTable.expandToLevel
getAllSelections(): object
Gets all selected rows, shapes, and relationships
Returns:
{object} The returned object contains "rows" for all selected rows, "shapes" for all selected shapes, and "relationships" for all selected relationships
getCellCallback(): object
Gets current value of property cellCallback.

A customized cell callback function.

This property is used in combination with configuration property hierarchies. If aggregation columns is provided, property hierarchies and cellCallback is ignored. Otherwise property hierarchies must provide column configurations that cellCallback can consume. And if cellCallback is not provided, a default cellCallback adds sap.m.Label to fill cells.

Returns:
{object} Value of property cellCallback
getColumns(): sap.ui.table.Column[]
Gets content of aggregation columns.

Aggregation delegated to sap.ui.table.Table.

If this aggregation is provided, call back property cellCallBack and column configuration in property hierarchies will be ignored.

Returns:
{sap.ui.table.Column[]}
getCustomToolbarItems(): sap.ui.core.Control[]
Gets content of aggregation customToolbarItems.

Controls to be place in Gantt chart toolbar.

This aggregation is only used when custom toolbar item group is configured to be shown in Gantt chart toolbar. Different from the build-in buttons which are configured to be shown or hidden, these are free controls created by application, only they are placed in container toolbar by sap.gantt.GanttChartWithTable.

A common recommendation is, if the source select group is enabled and application wants to pre-configure container layouts, the chance to change custom toolbar items is in event handler to event ganttChartSwitchRequested.

Returns:
{sap.ui.core.Control[]}
getFirstVisibleRow(): int
Gets the first visible row of the selection panel.
Returns:
{int} the first visible row index
See:
sap.ui.table.Table.getFirstVisibleRow
getFixedColumnCount(): int
Gets current value of property fixedColumnCount.

Property propagated from sap.ui.table.Table.

Returns:
{int} Value of property fixedColumnCount
getRowByShapeUid(sShapeUid?): object
Get row object by shape uid
Parameters:
{string}sShapeUid? shape uid
Returns:
{object} row object
getSelectedIndex(): int[]
Retrieves the lead selection index. The lead selection index is, among other things, used to determine the start and end of a selection range, when using Shift-Click to select multiple entries.
Returns:
{int[]} An array containing all selected indexes (ascending ordered integers)
See:
sap.ui.table.Table.getSelectedIndex
getSelectedRelationships(): array
Gets selected relationships.
Returns:
{array} Returns all selected relationships in the chart
getSelectedRows(): array
Gets selected rows.
Returns:
{array} Returns all selected rows
getSelectedShapes(): array
Gets selected in-row shapes.
Returns:
{array} Returns all selected shapes in the chart
getToolbarSchemeKey(): string
Returns the effective toolbar scheme key.
Returns:
{string} - Toolbar scheme key.
getVisibleRowCount(): int
Gets the number of visible rows in the selection panel.
Returns:
{int} The first visible row index
See:
sap.ui.table.Table.getVisibleRowCount
indexOfColumn(oColumn): int
Checks for the provided sap.ui.table.Column in the aggregation columns. and returns its index if found or -1 otherwise.
Parameters:
{sap.ui.table.Column}oColumn The column whose index is looked for
Returns:
{int} The index of the provided control in the aggregation if found, or -1 otherwise
indexOfCustomToolbarItem(oCustomToolbarItem): int
Checks for the provided sap.ui.core.Control in the aggregation customToolbarItems. and returns its index if found or -1 otherwise.
Parameters:
{sap.ui.core.Control}oCustomToolbarItem The customToolbarItem whose index is looked for
Returns:
{int} The index of the provided control in the aggregation if found, or -1 otherwise
insertColumn(oColumn, iIndex): sap.gantt.GanttChartWithTable
Inserts a column into the aggregation columns.
Parameters:
{sap.ui.table.Column}oColumn the column to insert; if empty, nothing is inserted
{int}iIndex the 0-based index the column should be inserted at; for a negative value of iIndex, the column is inserted at position 0; for a value greater than the current size of the aggregation, the column is inserted at the last position
Returns:
{sap.gantt.GanttChartWithTable} Reference to this in order to allow method chaining
insertCustomToolbarItem(oCustomToolbarItem, iIndex): sap.gantt.GanttChartWithTable
Inserts a customToolbarItem into the aggregation customToolbarItems.
Parameters:
{sap.ui.core.Control}oCustomToolbarItem the customToolbarItem to insert; if empty, nothing is inserted
{int}iIndex the 0-based index the customToolbarItem should be inserted at; for a negative value of iIndex, the customToolbarItem is inserted at position 0; for a value greater than the current size of the aggregation, the customToolbarItem is inserted at the last position
Returns:
{sap.gantt.GanttChartWithTable} Reference to this in order to allow method chaining
jumpToPosition(oDate)
Scrolls the visible chart area to a certain time.

It can be used to implement the function of 'Jump To First', 'Jump To Last' and 'Jump To Current'.

Parameters:
{Date}oDate The date object to which the user wants the visible area to scroll.
removeAllColumns(): sap.ui.table.Column[]
Removes all the controls from the aggregation columns.

Additionally, it unregisters them from the hosting UIArea.

Returns:
{sap.ui.table.Column[]} An array of the removed elements (might be empty)
removeAllCustomToolbarItems(): sap.ui.core.Control[]
Removes all the controls from the aggregation customToolbarItems.

Additionally, it unregisters them from the hosting UIArea.

Returns:
{sap.ui.core.Control[]} An array of the removed elements (might be empty)
removeColumn(vColumn): sap.ui.table.Column
Removes a column from the aggregation columns.
Parameters:
{int|string|sap.ui.table.Column}vColumn The columnto remove or its index or id
Returns:
{sap.ui.table.Column} The removed column or null
removeCustomToolbarItem(vCustomToolbarItem): sap.ui.core.Control
Removes a customToolbarItem from the aggregation customToolbarItems.
Parameters:
{int|string|sap.ui.core.Control}vCustomToolbarItem The customToolbarItemto remove or its index or id
Returns:
{sap.ui.core.Control} The removed customToolbarItem or null
selectRelationships(aIds?, isExclusive?): boolean
Selects relationships and returns a success code.
Parameters:
{array}aIds? List of the relationships that you want to select
{boolean}isExclusive? Whether all other selected relationships are deselected
Returns:
{boolean} - If any selection change is applied, returns true.
selectRows(aIds?, isExclusive?): boolean
Selects rows and returns a success code.
Parameters:
{array}aIds? List of the rows that you want to select
{boolean}isExclusive? Whether all other selected elements are deselected
Returns:
{boolean} - If any selection change is applied, returns true.
selectRowsAndShapes(aIds?, bIsExclusive?): boolean
Selects rows and all in-row shapes contained in the rows.
Parameters:
{array}aIds? Row uids
{boolean}bIsExclusive? Whether all other selected rows and shapes are deselected
Returns:
{boolean} - If any selection change is applied, returns true.
selectShapes(aIds?, isExclusive?): boolean
Selects in-row shapes and returns a success code.
Parameters:
{array}aIds? List of the shapes that you want to select
{boolean}isExclusive? Whether all other selected shapes are deselected
Returns:
{boolean} If any selection change is applied, returns true.
setCellCallback(oCellCallback): sap.gantt.GanttChartWithTable
Sets a new value for property cellCallback.

A customized cell callback function.

This property is used in combination with configuration property hierarchies. If aggregation columns is provided, property hierarchies and cellCallback is ignored. Otherwise property hierarchies must provide column configurations that cellCallback can consume. And if cellCallback is not provided, a default cellCallback adds sap.m.Label to fill cells.

When called with a value of null or undefined, the default value of the property will be restored.

Parameters:
{object}oCellCallback New value for property cellCallback
Returns:
{sap.gantt.GanttChartWithTable} Reference to this in order to allow method chaining
setFirstVisibleRow(iRowIndex): sap.gantt.GanttChartWithTable
Sets the first visible row in the selection panel.
Parameters:
{int}iRowIndex The row index to be set as the first visible row
Returns:
{sap.gantt.GanttChartWithTable} A reference to the GanttChartWithTable control, which can be used for chaining
See:
sap.ui.table.Table.setFirstVisibleRow
setFixedColumnCount(iFixedColumnCount): sap.gantt.GanttChartWithTable
Sets a new value for property fixedColumnCount.

Property propagated from sap.ui.table.Table.

When called with a value of null or undefined, the default value of the property will be restored.

Parameters:
{int}iFixedColumnCount New value for property fixedColumnCount
Returns:
{sap.gantt.GanttChartWithTable} Reference to this in order to allow method chaining
setSelectedIndex(iRowIndex): sap.gantt.GanttChartWithTable
Selects a row in the selection panel.
Parameters:
{int}iRowIndex The row index to be selected (if any exists)
Returns:
{sap.gantt.GanttChartWithTable} A reference to the GanttChartWithTable control, which can be used for chaining
See:
sap.ui.table.Table.setSelectedIndex
unbindCustomToolbarItems(): sap.gantt.GanttChartWithTable
Unbinds aggregation customToolbarItems from model data.
Returns:
{sap.gantt.GanttChartWithTable} Reference to this in order to allow method chaining