Class sap.gantt.shape.ImageModule: sap/gantt/shape/Image


Image shape class using SVG tag 'image'. This shape is usually used to represent points in time.

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

Constructor Summary
new sap.gantt.shape.Image(sId?, mSettings?)Creates and initializes a new Image class.
Method Summary
sap.gantt.shape.Image.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.gantt.shape.Image with name sClassName and enriches it with the information contained in oClassInfo.
sap.gantt.shape.Image.getMetadata()Returns a metadata object for class sap.gantt.shape.Image.
getHeight(oData, oRowInfo)Gets the value of property height.
getImage(oData, oRowInfo)Gets the value of property image.
getTag(oData, oRowInfo)Gets the value of property tag.
getWidth(oData, oRowInfo)Gets the value of property width.
getX(oData, oRowInfo)Gets the current value of property x.
getY(oData, oRowInfo)Gets the current value of property y.
setHeight(sHeight)Sets a new value for property height.
setImage(sImage)Sets a new value for property image.
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.Image(sId?, mSettings?)
Creates and initializes a new Image 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: image)
    • image : string
    • x : number
    • y : number
    • width : number (default: 20)
    • height : number (default: 20)
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.Image.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.gantt.shape.Image 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.Image.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.gantt.shape.Image.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
getHeight(oData, oRowInfo): number
Gets the value of property height.

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

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

IRI reference of the image. See SVG 1.1 specification for 'xlink:href' attribute of 'image'.

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

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

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 current value of property x.

x coordinate of the image rectangle. See SVG 1.1 specification for 'x' attribute of 'image'.

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 x.
getY(oData, oRowInfo): number
Gets the current value of property y.

y coordinate of the image rectangle. See SVG 1.1 specification for 'y' attribute of 'image'.

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. 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.Image
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 20.

Parameters:
{number}sHeight New value for property height
Returns:
{sap.gantt.shape.Image} Reference to this in order to allow method chaining
setImage(sImage): sap.gantt.shape.Image
Sets a new value for property image.

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

Parameters:
{string}sImage New value for property image
Returns:
{sap.gantt.shape.Image} Reference to this in order to allow method chaining
setTag(sTag): sap.gantt.shape.Image
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 image.

Parameters:
{string}sTag New value for property tag
Returns:
{sap.gantt.shape.Image} Reference to this in order to allow method chaining
setWidth(sWidth): sap.gantt.shape.Image
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.

Default value is 20.

Parameters:
{number}sWidth New value for property width
Returns:
{sap.gantt.shape.Image} 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.Image} 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.Image} Reference to this in order to allow method chaining