Class sap.gantt.shape.LineModule: sap/gantt/shape/Line

known direct subclasses: UlcMiddleLine

Line shape class using SVG tag 'line'. This shape is usually used to represent durations.

See SVG specification 1.1 for 'line' element for more information about the HTML tag.

Line samples in SVG specification 1.1:

Constructor Summary
new sap.gantt.shape.Line(sId?, mSettings?)Creates and initializes a new Line class.
Method Summary
sap.gantt.shape.Line.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.gantt.shape.Line with name sClassName and enriches it with the information contained in oClassInfo.
sap.gantt.shape.Line.getMetadata()Returns a metadata object for class sap.gantt.shape.Line.
getIsDuration(oData, oRowInfo)Gets the value of property isDuration.
getTag(oData, oRowInfo)Gets the value of property tag.
getX1(oData, oRowInfo)Gets the value of property x1.
getX2(oData, oRowInfo)Gets the value of property x2.
getY1(oData, oRowInfo)Gets the value of property y1.
getY2(oData, oRowInfo)Gets the value of property y2.
setIsDuration(bIsDuration)Sets a new value for property isDuration.
setTag(sTag)Sets a new value for property tag.
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.shape.Line(sId?, mSettings?)
Creates and initializes a new Line class.

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
    • tag : string (default: line)
    • isDuration : boolean (default: true)
    • x1 : number
    • y1 : number
    • x2 : number
    • y2 : number
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.shape.Line.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.gantt.shape.Line with name sClassName and enriches it with the information contained in oClassInfo.

oClassInfo might contain the same kind of information as described in Object.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.shape.Line.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.gantt.shape.Line.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
getIsDuration(oData, oRowInfo): boolean
Gets the value of property isDuration.
Parameters:
{object}oData Shape data.
{object}oRowInfo Information about the row and the row data.
Returns:
{boolean} Value of property isDuration.
getTag(oData, oRowInfo): string
Gets the value of property tag.

SVG tag name of the shape. See SVG 1.1 specification for shapes.
Note: We do not recommend that you change this value using a configuration or coding.

Parameters:
{object}oData Shape data.
{object}oRowInfo Information about the row and the row data.
Returns:
{string} Value of property tag.
getX1(oData, oRowInfo): number
Gets the value of property x1.

x coordinate of the start of the line. See SVG 1.1 specification for 'x1' attribute of 'line'.

Usually applications do not set this value. This getter carries out the calculation using property time as a base and makes some adjustments.

Parameters:
{object}oData Shape data.
{object}oRowInfo Information about the row and the row data.
Returns:
{number} Value of property x1.
getX2(oData, oRowInfo): number
Gets the value of property x2.

x coordinate of the end of the line. See SVG 1.1 specification for 'x2' attribute of 'line'.

Usually applications do not set this value. This getter carries out the calculation using property endTime as a base and makes some adjustments.

Parameters:
{object}oData Shape data.
{object}oRowInfo Information about the row and the row data.
Returns:
{number} Value of property x2.
getY1(oData, oRowInfo): number
Gets the value of property y1.

y coordinate of the start of the line. See SVG 1.1 specification for 'y1' attribute of 'line'.

Usually applications do not set this value. This getter carries out the calculation using parameter oRowInfo, and makes some adjustments to align the center of the row rectangle along the y axis. If you override the default value calculated by the getter, the alignment of the center is not guaranteed.

Parameters:
{object}oData Shape data.
{object}oRowInfo Information about the row and the row data.
Returns:
{number} Value of property y1.
getY2(oData, oRowInfo): number
Gets the value of property y2.

y coordinate of the end of the line. See SVG 1.1 specification for 'y2' attribute of 'line'.

Usually applications do not set this value. This getter carries out the calculation using parameter oRowInfo as a base and makes some adjustments to align the center of the row rectangle along the y axis. f you override the default value calculated by the getter, the alignment of the center is not guaranteed.

Parameters:
{object}oData Shape data.
{object}oRowInfo Information about the row and the row data.
Returns:
{number} Value of property y2.
setIsDuration(bIsDuration): sap.gantt.shape.Line
Sets a new value for property isDuration.

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

Default value is true.

Parameters:
{boolean}bIsDuration New value for property isDuration
Returns:
{sap.gantt.shape.Line} Reference to this in order to allow method chaining
setTag(sTag): sap.gantt.shape.Line
Sets a new value for property tag.

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

Default value is line.

Parameters:
{string}sTag New value for property tag
Returns:
{sap.gantt.shape.Line} Reference to this in order to allow method chaining
Sets a new value for property x1.

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

Parameters:
{number}sX1 New value for property x1
Returns:
{sap.gantt.shape.Line} Reference to this in order to allow method chaining
Sets a new value for property x2.

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

Parameters:
{number}sX2 New value for property x2
Returns:
{sap.gantt.shape.Line} Reference to this in order to allow method chaining
Sets a new value for property y1.

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

Parameters:
{number}sY1 New value for property y1
Returns:
{sap.gantt.shape.Line} Reference to this in order to allow method chaining
Sets a new value for property y2.

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

Parameters:
{number}sY2 New value for property y2
Returns:
{sap.gantt.shape.Line} Reference to this in order to allow method chaining