Class sap.gantt.config.ShapeModule: sap/gantt/config/Shape

extends Element

Configuration object for Shape.

This configuration specifies the Shape class used to represent specific data and how the Shape class is constructed. Some properties of Shape can be directly configured by setting property shapeProperties.

A Shape class may come from the shape library provided in namespace sap.gantt.shape or from any extended shape you've created. Shape classes are instantiated according to the structure described in this configuration class inside sap.gantt.Gantt. The aggregation structure is described by properties groupAggregation, clippathAggregation, and selectedClassName.

The root shape is called 'top shape'. Some properties are only top shape relevant such as key, level, and selectedClassName.

Constructor Summary
new sap.gantt.config.Shape(sId?, mSettings?)Creates and initializes a shape configuration.
Method Summary
sap.gantt.config.Shape.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.gantt.config.Shape with name sClassName and enriches it with the information contained in oClassInfo.
sap.gantt.config.Shape.getMetadata()Returns a metadata object for class sap.gantt.config.Shape.
getClippathAggregation()Gets current value of property clippathAggregation.
getGroupAggregation()Gets current value of property groupAggregation.
getKey()Gets current value of property key.
getLevel()Gets current value of property level.
getModeKeys()Gets current value of property modeKeys.
getSelectedClassName()Gets current value of property selectedClassName.
getShapeClassName()Gets current value of property shapeClassName.
getShapeDataName()Gets current value of property shapeDataName.
getShapeProperties()Gets current value of property shapeProperties.
getShapeProperty(sPropertyName)Get a pre-configured property from shapeProperties.
getSwitchOfCheckBox()Gets current value of property switchOfCheckBox.
hasShapeProperty(sPropertyName)Checks if a property is pre-configured in shapeProperties.
setClippathAggregation(sClippathAggregation)Sets a new value for property clippathAggregation.
setGroupAggregation(sGroupAggregation)Sets a new value for property groupAggregation.
setKey(sKey)Sets a new value for property key.
setLevel(sLevel)Sets a new value for property level.
setModeKeys(sModeKeys)Sets a new value for property modeKeys.
setSelectedClassName(sSelectedClassName)Sets a new value for property selectedClassName.
setShapeClassName(sShapeClassName)Sets a new value for property shapeClassName.
setShapeDataName(sShapeDataName)Sets a new value for property shapeDataName.
setShapeProperties(oShapeProperties)Sets a new value for property shapeProperties.
setSwitchOfCheckBox(sSwitchOfCheckBox)Sets a new value for property switchOfCheckBox.
Constructor Detail
new sap.gantt.config.Shape(sId?, mSettings?)
Creates and initializes a shape configuration.

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.ui.core.Element 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.config.Shape.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.gantt.config.Shape with name sClassName and enriches it with the information contained in oClassInfo.

oClassInfo might contain the same kind of information as described in sap.ui.core.Element.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.config.Shape.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.gantt.config.Shape.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
getClippathAggregation(): array
Gets current value of property clippathAggregation.

Aggregation path classes for sap.gantt.shape.Clippath class. This aggregation is only valid for shape classes with tag='clippath'.

Returns:
{array} Value of property clippathAggregation
getGroupAggregation(): array
Gets current value of property groupAggregation.

Aggregation shapes for sap.gantt.shape.Group class. This aggregation is only valid for shape classes with tag='g'.

Returns:
{array} Value of property groupAggregation
getKey(): string
Gets current value of property key.

Primary key of the shape configuration. This property can be referenced from other configuration object, such as sap.gantt.config.ChartScheme. This property is only relevant to top Shape configuration.

Returns:
{string} Value of property key
getLevel(): string
Gets current value of property level.

Level of shapes. Shapes closer to the top shape have a smaller value in level. This property is only relevant to top shape configuration (non aggregated shape configuration).

Returns:
{string} Value of property level
getModeKeys(): array
Gets current value of property modeKeys.

Specifies the key of modes in which the shape is drawn. If you leave this property empty, the shape is drawn in all modes.

Default value is [].

Returns:
{array} Value of property modeKeys
getSelectedClassName(): string
Gets current value of property selectedClassName.

Aggregation class for drawing selection of this shape. If nothing is assigned to this property, sap.gantt.Gantt instantiates the default selected shape class.

Returns:
{string} Value of property selectedClassName
getShapeClassName(): string
Gets current value of property shapeClassName.

Specifies the shape class to be used for data representation. Both shapes from sap.gantt.shape and extended shapes can be used here.

Returns:
{string} Value of property shapeClassName
getShapeDataName(): string
Gets current value of property shapeDataName.

Specifies the name of the data name to be represented. This is for the top shape only.

Returns:
{string} Value of property shapeDataName
getShapeProperties(): object
Gets current value of property shapeProperties.

Pre-configured values for Shape. The values specified in this object have a higher priority than values coded in the Shape class.

Default value is sap.gantt.config.DEFAULT_EMPTY_OBJECT.

Returns:
{object} Value of property shapeProperties
getShapeProperty(sPropertyName): string
Get a pre-configured property from shapeProperties.

This method together with method hasShapeProperty is frequently used in sap.gantt.shape classes to make sure the principle of 'configuration first' is applied. .

Parameters:
{string}sPropertyName Name of the shape property.
Returns:
{string} - Pre-configured value.
getSwitchOfCheckBox(): string
Gets current value of property switchOfCheckBox.

Switch of shape's checkbox value in list legend, its value can be "noShow", "checked" and "unchecked".

Default value is noShow.

Returns:
{string} Value of property switchOfCheckBox
hasShapeProperty(sPropertyName): boolean
Checks if a property is pre-configured in shapeProperties.

This method together with method getShapeProperty() is frequently used in sap.gantt.shape classes to make sure the principle of 'configuration first' is applied. .

Parameters:
{string}sPropertyName Name of the shape property.
Returns:
{boolean} - Whether the property is pre-configured.
setClippathAggregation(sClippathAggregation): sap.gantt.config.Shape
Sets a new value for property clippathAggregation.

Aggregation path classes for sap.gantt.shape.Clippath class. This aggregation is only valid for shape classes with tag='clippath'.

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

Parameters:
{array}sClippathAggregation New value for property clippathAggregation
Returns:
{sap.gantt.config.Shape} Reference to this in order to allow method chaining
setGroupAggregation(sGroupAggregation): sap.gantt.config.Shape
Sets a new value for property groupAggregation.

Aggregation shapes for sap.gantt.shape.Group class. This aggregation is only valid for shape classes with tag='g'.

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

Parameters:
{array}sGroupAggregation New value for property groupAggregation
Returns:
{sap.gantt.config.Shape} Reference to this in order to allow method chaining
setKey(sKey): sap.gantt.config.Shape
Sets a new value for property key.

Primary key of the shape configuration. This property can be referenced from other configuration object, such as sap.gantt.config.ChartScheme. This property is only relevant to top Shape configuration.

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

Parameters:
{string}sKey New value for property key
Returns:
{sap.gantt.config.Shape} Reference to this in order to allow method chaining
setLevel(sLevel): sap.gantt.config.Shape
Sets a new value for property level.

Level of shapes. Shapes closer to the top shape have a smaller value in level. This property is only relevant to top shape configuration (non aggregated shape configuration).

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

Parameters:
{string}sLevel New value for property level
Returns:
{sap.gantt.config.Shape} Reference to this in order to allow method chaining
setModeKeys(sModeKeys): sap.gantt.config.Shape
Sets a new value for property modeKeys.

Specifies the key of modes in which the shape is drawn. If you leave this property empty, the shape is drawn in all modes.

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

Default value is [].

Parameters:
{array}sModeKeys New value for property modeKeys
Returns:
{sap.gantt.config.Shape} Reference to this in order to allow method chaining
setSelectedClassName(sSelectedClassName): sap.gantt.config.Shape
Sets a new value for property selectedClassName.

Aggregation class for drawing selection of this shape. If nothing is assigned to this property, sap.gantt.Gantt instantiates the default selected shape class.

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

Parameters:
{string}sSelectedClassName New value for property selectedClassName
Returns:
{sap.gantt.config.Shape} Reference to this in order to allow method chaining
setShapeClassName(sShapeClassName): sap.gantt.config.Shape
Sets a new value for property shapeClassName.

Specifies the shape class to be used for data representation. Both shapes from sap.gantt.shape and extended shapes can be used here.

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

Parameters:
{string}sShapeClassName New value for property shapeClassName
Returns:
{sap.gantt.config.Shape} Reference to this in order to allow method chaining
setShapeDataName(sShapeDataName): sap.gantt.config.Shape
Sets a new value for property shapeDataName.

Specifies the name of the data name to be represented. This is for the top shape only.

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

Parameters:
{string}sShapeDataName New value for property shapeDataName
Returns:
{sap.gantt.config.Shape} Reference to this in order to allow method chaining
setShapeProperties(oShapeProperties): sap.gantt.config.Shape
Sets a new value for property shapeProperties.

Pre-configured values for Shape. The values specified in this object have a higher priority than values coded in the Shape class.

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

Default value is sap.gantt.config.DEFAULT_EMPTY_OBJECT.

Parameters:
{object}oShapeProperties New value for property shapeProperties
Returns:
{sap.gantt.config.Shape} Reference to this in order to allow method chaining
setSwitchOfCheckBox(sSwitchOfCheckBox): sap.gantt.config.Shape
Sets a new value for property switchOfCheckBox.

Switch of shape's checkbox value in list legend, its value can be "noShow", "checked" and "unchecked".

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

Default value is noShow.

Parameters:
{string}sSwitchOfCheckBox New value for property switchOfCheckBox
Returns:
{sap.gantt.config.Shape} Reference to this in order to allow method chaining