Class sap.gantt.def.cal.CalendarModule: sap/gantt/def/cal/Calendar

extends DefBase

A calendar that contains a list of time interval definitions.

A pattern definition is generated per calendar key.

Constructor Summary
new sap.gantt.def.cal.Calendar(sId?, mSettings?)Creates and initializes a calendar defined and embedded in a 'defs' tag for later reuse.
Method Summary
sap.gantt.def.cal.Calendar.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.gantt.def.cal.Calendar with name sClassName and enriches it with the information contained in oClassInfo.
sap.gantt.def.cal.Calendar.getMetadata()Returns a metadata object for class sap.gantt.def.cal.Calendar.
addTimeInterval(oTimeInterval)Adds some timeInterval to the aggregation timeIntervals.
bindTimeIntervals(oBindingInfo)Binds aggregation timeIntervals to model data.
destroyTimeIntervals()Destroys all the timeIntervals in the aggregation timeIntervals.
getBackgroundColor()Gets current value of property backgroundColor.
getKey()Gets current value of property key.
getTimeIntervals()Gets content of aggregation timeIntervals.
indexOfTimeInterval(oTimeInterval)Checks for the provided sap.gantt.def.cal.TimeInterval in the aggregation timeIntervals.
insertTimeInterval(oTimeInterval, iIndex)Inserts a timeInterval into the aggregation timeIntervals.
removeAllTimeIntervals()Removes all the controls from the aggregation timeIntervals.
removeTimeInterval(vTimeInterval)Removes a timeInterval from the aggregation timeIntervals.
setBackgroundColor(sBackgroundColor)Sets a new value for property backgroundColor.
setKey(sKey)Sets a new value for property key.
unbindTimeIntervals()Unbinds aggregation timeIntervals from model data.
Constructor Detail
new sap.gantt.def.cal.Calendar(sId?, mSettings?)
Creates and initializes a calendar defined and embedded in a 'defs' tag for later reuse.

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:

  • Properties
    • key : string (default: calendar)
    • backgroundColor : sap.gantt.ValueSVGPaintServer (default: #e5e5e5)
  • Aggregations

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

Parameters:
{string}sId? ID of the new control, generated automatically if no ID is given
{object}mSettings? Initial settings for the new control
Method Detail
sap.gantt.def.cal.Calendar.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.gantt.def.cal.Calendar 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.def.DefBase.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.def.cal.Calendar.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.gantt.def.cal.Calendar.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
addTimeInterval(oTimeInterval): sap.gantt.def.cal.Calendar
Adds some timeInterval to the aggregation timeIntervals.
Parameters:
{sap.gantt.def.cal.TimeInterval}oTimeInterval the timeInterval to add; if empty, nothing is inserted
Returns:
{sap.gantt.def.cal.Calendar} Reference to this in order to allow method chaining
bindTimeIntervals(oBindingInfo): sap.gantt.def.cal.Calendar
Binds aggregation timeIntervals 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.def.cal.Calendar} Reference to this in order to allow method chaining
destroyTimeIntervals(): sap.gantt.def.cal.Calendar
Destroys all the timeIntervals in the aggregation timeIntervals.
Returns:
{sap.gantt.def.cal.Calendar} Reference to this in order to allow method chaining
getBackgroundColor(): sap.gantt.ValueSVGPaintServer
Gets current value of property backgroundColor.

Background color of time intervals.

Default value is #e5e5e5.

Returns:
{sap.gantt.ValueSVGPaintServer} Value of property backgroundColor
getKey(): string
Gets current value of property key.

Key of the calendar. Note that this value is used to generate the referencing string of the calendar pattern.

Default value is calendar.

Returns:
{string} Value of property key
getTimeIntervals(): sap.gantt.def.cal.TimeInterval[]
Gets content of aggregation timeIntervals.

Time intervals that should be painted with the value of backgroundColor.

Returns:
{sap.gantt.def.cal.TimeInterval[]}
indexOfTimeInterval(oTimeInterval): int
Checks for the provided sap.gantt.def.cal.TimeInterval in the aggregation timeIntervals. and returns its index if found or -1 otherwise.
Parameters:
{sap.gantt.def.cal.TimeInterval}oTimeInterval The timeInterval whose index is looked for
Returns:
{int} The index of the provided control in the aggregation if found, or -1 otherwise
insertTimeInterval(oTimeInterval, iIndex): sap.gantt.def.cal.Calendar
Inserts a timeInterval into the aggregation timeIntervals.
Parameters:
{sap.gantt.def.cal.TimeInterval}oTimeInterval the timeInterval to insert; if empty, nothing is inserted
{int}iIndex the 0-based index the timeInterval should be inserted at; for a negative value of iIndex, the timeInterval is inserted at position 0; for a value greater than the current size of the aggregation, the timeInterval is inserted at the last position
Returns:
{sap.gantt.def.cal.Calendar} Reference to this in order to allow method chaining
removeAllTimeIntervals(): sap.gantt.def.cal.TimeInterval[]
Removes all the controls from the aggregation timeIntervals.

Additionally, it unregisters them from the hosting UIArea.

Returns:
{sap.gantt.def.cal.TimeInterval[]} An array of the removed elements (might be empty)
removeTimeInterval(vTimeInterval): sap.gantt.def.cal.TimeInterval
Removes a timeInterval from the aggregation timeIntervals.
Parameters:
{int|string|sap.gantt.def.cal.TimeInterval}vTimeInterval The timeIntervalto remove or its index or id
Returns:
{sap.gantt.def.cal.TimeInterval} The removed timeInterval or null
setBackgroundColor(sBackgroundColor): sap.gantt.def.cal.Calendar
Sets a new value for property backgroundColor.

Background color of time intervals.

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

Default value is #e5e5e5.

Parameters:
{sap.gantt.ValueSVGPaintServer}sBackgroundColor New value for property backgroundColor
Returns:
{sap.gantt.def.cal.Calendar} Reference to this in order to allow method chaining
Sets a new value for property key.

Key of the calendar. Note that this value is used to generate the referencing string of the calendar pattern.

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

Default value is calendar.

Parameters:
{string}sKey New value for property key
Returns:
{sap.gantt.def.cal.Calendar} Reference to this in order to allow method chaining
unbindTimeIntervals(): sap.gantt.def.cal.Calendar
Unbinds aggregation timeIntervals from model data.
Returns:
{sap.gantt.def.cal.Calendar} Reference to this in order to allow method chaining