Class sap.gantt.shape.RectangleModule: sap/gantt/shape/Rectangle

known direct subclasses: Calendar, UbcTooltipRectangle, UlcRectangle

Rectangle shape class using SVG tag 'rect'. This shape is usually used to represent durations.

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

Rectangle sample in SVG specification 1.1:

Rectangle sample with rounded corner in SVG specification 1.1:

Constructor Summary
new sap.gantt.shape.Rectangle(sId?, mSettings?)Creates and initializes a new Rectangle class.
Method Summary
sap.gantt.shape.Rectangle.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.gantt.shape.Rectangle with name sClassName and enriches it with the information contained in oClassInfo.
sap.gantt.shape.Rectangle.getMetadata()Returns a metadata object for class sap.gantt.shape.Rectangle.
getHeight(oData, oRowInfo)Gets the value of property height.
getIsDuration(oData, oRowInfo)Gets the value of property isDuration.
getRx(oData, oRowInfo)Gets the value of property rx.
getRy(oData, oRowInfo)Gets the value of property ry.
getTag(oData, oRowInfo)Gets the value of property tag.
getWidth(oData, oRowInfo)Gets the value of property width.
getX(oData, oRowInfo)Gets the value of property x.
getY(oData, oRowInfo)Gets the value of property y.
setHeight(sHeight)Sets a new value for property height.
setIsDuration(bIsDuration)Sets a new value for property isDuration.
setRx(sRx)Sets a new value for property rx.
setRy(sRy)Sets a new value for property ry.
setTag(sTag)Sets a new value for property tag.
setWidth(sWidth)Sets a new value for property width.
setX(sX)Sets a new value for property x.
setY(sY)Sets a new value for property y.
Constructor Detail
new sap.gantt.shape.Rectangle(sId?, mSettings?)
Creates and initializes a new Rectangle 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: rect)
    • isDuration : boolean (default: true)
    • x : number
    • y : number
    • width : number
    • height : number (default: 15)
    • rx : string (default: 0)
    • ry : string (default: 0)
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.shape.Rectangle.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.gantt.shape.Rectangle 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.Rectangle.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.gantt.shape.Rectangle.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
getHeight(oData, oRowInfo): number
Gets the value of property height.

Height of the rectangle. See SVG 1.1 specification for 'height' attribute of 'rect'.

Parameters:
{object}oData Shape data.
{object}oRowInfo Information about the row and the row data.
Returns:
{number} Value of property height.
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.
getRx(oData, oRowInfo): number
Gets the value of property rx.

Rx of the rectangle. See SVG 1.1 specification for 'rx' attribute of 'rect'.

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

Ry of the rectangle. See SVG 1.1 specification for 'ry' attribute of 'rect'.

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

SVG tag name of the shape. See SVG 1.1 specification for shapes.
Note: TWe 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.
getWidth(oData, oRowInfo): number
Gets the value of property width.

Width of the rectangle. See SVG 1.1 specification for 'width' attribute of 'rect'.

Usually applications do not set this value. This getter carries out the calculation using properties time and endTime. If you override the default value calculated by the getter, proper rendering is not guaranteed.

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

x coordinate of the top-left corner of the rectangle. See SVG 1.1 specification for 'x' attribute of 'rect'.

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

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

y coordinate of the top-left corner of the rectangle. See SVG 1.1 specification for 'y' attribute of 'rect'.

Usually applications do not set this value. This getter carries out the calculation using parameter oRowInfo as a base and uses property height as an offset 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 y.
setHeight(sHeight): sap.gantt.shape.Rectangle
Sets a new value for property height.

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

Default value is 15.

Parameters:
{number}sHeight New value for property height
Returns:
{sap.gantt.shape.Rectangle} Reference to this in order to allow method chaining
setIsDuration(bIsDuration): sap.gantt.shape.Rectangle
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.Rectangle} Reference to this in order to allow method chaining
Sets a new value for property rx.

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

Default value is 0.

Parameters:
{string}sRx New value for property rx
Returns:
{sap.gantt.shape.Rectangle} Reference to this in order to allow method chaining
Sets a new value for property ry.

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

Default value is 0.

Parameters:
{string}sRy New value for property ry
Returns:
{sap.gantt.shape.Rectangle} Reference to this in order to allow method chaining
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 rect.

Parameters:
{string}sTag New value for property tag
Returns:
{sap.gantt.shape.Rectangle} Reference to this in order to allow method chaining
setWidth(sWidth): sap.gantt.shape.Rectangle
Sets a new value for property width.

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

Parameters:
{number}sWidth New value for property width
Returns:
{sap.gantt.shape.Rectangle} Reference to this in order to allow method chaining
Sets a new value for property x.

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

Parameters:
{number}sX New value for property x
Returns:
{sap.gantt.shape.Rectangle} Reference to this in order to allow method chaining
Sets a new value for property y.

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

Parameters:
{number}sY New value for property y
Returns:
{sap.gantt.shape.Rectangle} Reference to this in order to allow method chaining