Class sap.gantt.shape.TextModule: sap/gantt/shape/Text


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

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

Text sample in SVG specification 1.1:
Hello, out there

Decorated text sample in SVG specification 1.1:
Normal textText with line-throughUnderlined textOne word has different underlining

Constructor Summary
new sap.gantt.shape.Text(sId?, mSettings?)Creates and initializes a new Text class.
Method Summary
sap.gantt.shape.Text.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.gantt.shape.Text with name sClassName and enriches it with the information contained in oClassInfo.
sap.gantt.shape.Text.getMetadata()Returns a metadata object for class sap.gantt.shape.Text.
getEllipsisWidth(oData, oRowInfo)Gets the value of property ellipsisWidth.
getFontFamily(oData, oRowInfo)Gets the value of property fontFamily.
getFontSize(oData, oRowInfo)Gets the value of property fontSize.
getTag(oData, oRowInfo)Gets the value of property tag.
getText(oData, oRowInfo)Gets the value of property text.
getTextAnchor(oData, oRowInfo)Gets the value of property textAnchor.
getTruncateWidth(oData, oRowInfo)Gets the value of property truncateWidth.
getX(oData, oRowInfo)Gets the value of property x.
getY(oData, oRowInfo)Gets the value of property y.
setEllipsisWidth(sEllipsisWidth)Sets a new value for property ellipsisWidth.
setFontFamily(sFontFamily)Sets a new value for property fontFamily.
setFontSize(sFontSize)Sets a new value for property fontSize.
setTag(sTag)Sets a new value for property tag.
setText(sText)Sets a new value for property text.
setTextAnchor(sTextAnchor)Sets a new value for property textAnchor.
setTruncateWidth(sTruncateWidth)Sets a new value for property truncateWidth.
setWrapDy(sWrapDy)Sets a new value for property wrapDy.
setWrapWidth(sWrapWidth)Sets a new value for property wrapWidth.
setX(sX)Sets a new value for property x.
setY(sY)Sets a new value for property y.
Constructor Detail
new sap.gantt.shape.Text(sId?, mSettings?)
Creates and initializes a new Text 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:

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.Text.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.gantt.shape.Text 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.Text.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.gantt.shape.Text.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
getEllipsisWidth(oData, oRowInfo): number
Gets the value of property ellipsisWidth.

Ellipsis width if truncate happens. Default value 12 indicates 12px length reserved for ellipsis. If the value is -1, no ellipsis appears even truncate happens. If the value is bigger than -1, ellipsis will be 3 dots in length of this value.

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

Text font family. See SVG 1.1 specification for 'font-family' property of 'text'.

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

Text font size. See SVG 1.1 specification for 'font-size' property of 'text'.

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

Text string.

Parameters:
{object}oData Shape data.
{object}oRowInfo Information about the row and the row data.
Returns:
{string} Value of property text.
getTextAnchor(oData, oRowInfo): string
Gets the value of property textAnchor.

Text anchor. Possible values are 'start', 'middle', and 'end'. See SVG 1.1 specification for 'text-anchor' property of 'text'.

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

Truncating width. Default value -1 indicates truncating function is not activated. To enable truncating, give a truncate width here. If text length exceeds truncate width, text is truncated.

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

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

Usually applications do not set this value. This getter carries out the calculation using property time. 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 x.
getY(oData, oRowInfo): number
Gets the value of property y.

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

Usually applications do not set this value. This getter carries out the calculation using parameter oRowInfo and property height 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.
setEllipsisWidth(sEllipsisWidth): sap.gantt.shape.Text
Sets a new value for property ellipsisWidth.

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

Default value is 12.

Parameters:
{number}sEllipsisWidth New value for property ellipsisWidth
Returns:
{sap.gantt.shape.Text} Reference to this in order to allow method chaining
setFontFamily(sFontFamily): sap.gantt.shape.Text
Sets a new value for property fontFamily.

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

Parameters:
{string}sFontFamily New value for property fontFamily
Returns:
{sap.gantt.shape.Text} Reference to this in order to allow method chaining
setFontSize(sFontSize): sap.gantt.shape.Text
Sets a new value for property fontSize.

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

Default value is 10.

Parameters:
{number}sFontSize New value for property fontSize
Returns:
{sap.gantt.shape.Text} Reference to this in order to allow method chaining
setTag(sTag): sap.gantt.shape.Text
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 text.

Parameters:
{string}sTag New value for property tag
Returns:
{sap.gantt.shape.Text} Reference to this in order to allow method chaining
setText(sText): sap.gantt.shape.Text
Sets a new value for property text.

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

Parameters:
{string}sText New value for property text
Returns:
{sap.gantt.shape.Text} Reference to this in order to allow method chaining
setTextAnchor(sTextAnchor): sap.gantt.shape.Text
Sets a new value for property textAnchor.

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

Default value is start.

Parameters:
{string}sTextAnchor New value for property textAnchor
Returns:
{sap.gantt.shape.Text} Reference to this in order to allow method chaining
setTruncateWidth(sTruncateWidth): sap.gantt.shape.Text
Sets a new value for property truncateWidth.

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

Default value is -1.

Parameters:
{number}sTruncateWidth New value for property truncateWidth
Returns:
{sap.gantt.shape.Text} Reference to this in order to allow method chaining
setWrapDy(sWrapDy): sap.gantt.shape.Text
Sets a new value for property wrapDy.

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

Default value is 20.

Parameters:
{number}sWrapDy New value for property wrapDy
Returns:
{sap.gantt.shape.Text} Reference to this in order to allow method chaining
setWrapWidth(sWrapWidth): sap.gantt.shape.Text
Sets a new value for property wrapWidth.

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

Default value is -1.

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