Class sap.gantt.def.gradient.LinearGradientModule: sap/gantt/def/gradient/LinearGradient

extends DefBase

Linear gradient defined by SVG tag 'linearGradient'.

See Linear Gradient in SVG 1.1 specification for detail.
Linear gradient sample in SVG specification 1.1:

Constructor Summary
new sap.gantt.def.gradient.LinearGradient(sId?, mSettings?)Creates and initializes a linear gradient defined for later reuse.
Method Summary
sap.gantt.def.gradient.LinearGradient.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.gantt.def.gradient.LinearGradient with name sClassName and enriches it with the information contained in oClassInfo.
sap.gantt.def.gradient.LinearGradient.getMetadata()Returns a metadata object for class sap.gantt.def.gradient.LinearGradient.
addStop(oStop)Adds some stop to the aggregation stops.
destroyStops()Destroys all the stops in the aggregation stops.
getStops()Gets content of aggregation stops.
getX1()Gets current value of property x1.
getX2()Gets current value of property x2.
getY1()Gets current value of property y1.
getY2()Gets current value of property y2.
indexOfStop(oStop)Checks for the provided sap.gantt.def.gradient.Stop in the aggregation stops.
insertStop(oStop, iIndex)Inserts a stop into the aggregation stops.
removeAllStops()Removes all the controls from the aggregation stops.
removeStop(vStop)Removes a stop from the aggregation stops.
setX1(sX1)Sets a new value for property x1.
setX2(sX2)Sets a new value for property x2.
setY1(sY1)Sets a new value for property y1.
setY2(sY2)Sets a new value for property y2.
Constructor Detail
new sap.gantt.def.gradient.LinearGradient(sId?, mSettings?)
Creates and initializes a linear gradient defined 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
    • x1 : string (default: 0)
    • y1 : string (default: 0)
    • x2 : string (default: 100)
    • y2 : string (default: 15)
  • Aggregations
    • stops : sap.gantt.def.gradient.Stop[]

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.gradient.LinearGradient.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.gantt.def.gradient.LinearGradient 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.gradient.LinearGradient.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.gantt.def.gradient.LinearGradient.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
Adds some stop to the aggregation stops.
Parameters:
{sap.gantt.def.gradient.Stop}oStop the stop to add; if empty, nothing is inserted
Returns:
{sap.gantt.def.gradient.LinearGradient} Reference to this in order to allow method chaining
Destroys all the stops in the aggregation stops.
Returns:
{sap.gantt.def.gradient.LinearGradient} Reference to this in order to allow method chaining
Gets content of aggregation stops.

'stop' elements in the 'linearGradient' element. See 'stop' element in SVG 1.1 specification for detail.

Returns:
{sap.gantt.def.gradient.Stop[]}
getX1(): string
Gets current value of property x1.

Attribute 'x1' of SVG tag 'linearGradient'. See 'x1' attribute of 'linearGradient' element in SVG 1.1 specification for detail.

Default value is 0.

Returns:
{string} Value of property x1
getX2(): string
Gets current value of property x2.

Attribute 'x2' of SVG tag 'linearGradient'. See 'x2' attribute of 'linearGradient' element in SVG 1.1 specification for detail.

Default value is 100.

Returns:
{string} Value of property x2
getY1(): string
Gets current value of property y1.

Attribute 'y1' of SVG tag 'linearGradient'. See 'y1' attribute of 'linearGradient' element in SVG 1.1 specification for detail.

Default value is 0.

Returns:
{string} Value of property y1
getY2(): string
Gets current value of property y2.

Attribute 'y2' of SVG tag 'linearGradient'. See 'y2' attribute of 'linearGradient' element in SVG 1.1 specification for detail.

Default value is 15.

Returns:
{string} Value of property y2
indexOfStop(oStop): int
Checks for the provided sap.gantt.def.gradient.Stop in the aggregation stops. and returns its index if found or -1 otherwise.
Parameters:
{sap.gantt.def.gradient.Stop}oStop The stop whose index is looked for
Returns:
{int} The index of the provided control in the aggregation if found, or -1 otherwise
insertStop(oStop, iIndex): sap.gantt.def.gradient.LinearGradient
Inserts a stop into the aggregation stops.
Parameters:
{sap.gantt.def.gradient.Stop}oStop the stop to insert; if empty, nothing is inserted
{int}iIndex the 0-based index the stop should be inserted at; for a negative value of iIndex, the stop is inserted at position 0; for a value greater than the current size of the aggregation, the stop is inserted at the last position
Returns:
{sap.gantt.def.gradient.LinearGradient} Reference to this in order to allow method chaining
removeAllStops(): sap.gantt.def.gradient.Stop[]
Removes all the controls from the aggregation stops.

Additionally, it unregisters them from the hosting UIArea.

Returns:
{sap.gantt.def.gradient.Stop[]} An array of the removed elements (might be empty)
removeStop(vStop): sap.gantt.def.gradient.Stop
Removes a stop from the aggregation stops.
Parameters:
{int|string|sap.gantt.def.gradient.Stop}vStop The stopto remove or its index or id
Returns:
{sap.gantt.def.gradient.Stop} The removed stop or null
Sets a new value for property x1.

Attribute 'x1' of SVG tag 'linearGradient'. See 'x1' attribute of 'linearGradient' element in SVG 1.1 specification for detail.

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

Default value is 0.

Parameters:
{string}sX1 New value for property x1
Returns:
{sap.gantt.def.gradient.LinearGradient} Reference to this in order to allow method chaining
Sets a new value for property x2.

Attribute 'x2' of SVG tag 'linearGradient'. See 'x2' attribute of 'linearGradient' element in SVG 1.1 specification for detail.

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

Default value is 100.

Parameters:
{string}sX2 New value for property x2
Returns:
{sap.gantt.def.gradient.LinearGradient} Reference to this in order to allow method chaining
Sets a new value for property y1.

Attribute 'y1' of SVG tag 'linearGradient'. See 'y1' attribute of 'linearGradient' element in SVG 1.1 specification for detail.

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

Default value is 0.

Parameters:
{string}sY1 New value for property y1
Returns:
{sap.gantt.def.gradient.LinearGradient} Reference to this in order to allow method chaining
Sets a new value for property y2.

Attribute 'y2' of SVG tag 'linearGradient'. See 'y2' attribute of 'linearGradient' element in SVG 1.1 specification for detail.

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

Default value is 15.

Parameters:
{string}sY2 New value for property y2
Returns:
{sap.gantt.def.gradient.LinearGradient} Reference to this in order to allow method chaining