Provides an implementation of selected shapes, allowing you to create a highlighting effect by drawing the selected shapes with red and thicker strokes.
Method Summary
sap.gantt.shape.SelectedShape.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.gantt.shape.SelectedShape with name sClassName
and enriches it with the information contained in oClassInfo
. getD(oData, oRowInfo)Gets the value of property d
. getEnableDnD(oData, oRowInfo)Gets the value of property enableDnD
. getFill(oData, oRowInfo)Gets current value of property fill
. getHeight(oData)Gets the value of property height
. getIsDuration(oData, oRowInfo)Gets current value of property isDuration
. getStroke(oData, oRowInfo)Gets the value of property stroke
. getStrokeWidth(oData, oRowInfo)Gets the value of property strokeWidth
. getTransform(oData, oRowInfo)Gets the value of property transform
. setFill(sFill)Sets a new value for property fill
. setFillOpacity(fFillOpacity)Sets a new value for property fillOpacity
. setHeight(iHeight)Sets a new value for property height
. Constructor Detail
new sap.gantt.shape.SelectedShape(sId?, mSettings?)
Constructor for a new SelectedShape.
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:
In addition, all settings applicable to the base type sap.gantt.shape.Path can be used as well.
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.SelectedShape.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.gantt.shape.SelectedShape 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.shape.Path.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 |
Returns a metadata object for class sap.gantt.shape.SelectedShape.
Returns:
getD(oData, oRowInfo): string
Gets the value of property
d
.
d attribute of the path element. See SVG 1.1 specification for 'd' attribute of 'path'.
Usually applications do not set this value. This getter carries out the calculation using properties time
, endTime
, tailLength
, headLength
, and height
.
Parameters:
{object} | oData | Shape data. |
{object} | oRowInfo | Information about the row and the row data. |
Returns:
{string} | Value of property d . |
getEnableDnD(oData, oRowInfo): boolean
Gets the value of property
enableDnD
.
This value determines whether the selectedShape of a shape is enabled for drag-and-drop.
Parameters:
{object} | oData | Shape data. |
{object} | oRowInfo | Information about the row and the row data. |
Returns:
{boolean} | Value of property enableDnD . |
getEnableSelection(oData, oRowInfo): boolean
Gets the value of property
enableSelection
.
This value determines whether the selectedShape of a shape is enabled for selection.
Parameters:
{object} | oData | Shape data. |
{object} | oRowInfo | Information about the row and the row data. |
Returns:
{boolean} | Value of property enableSelection . |
getFill(oData, oRowInfo): string
Parameters:
{object} | oData | Shape data. |
{object} | oRowInfo | Information of the row and row data. |
Returns:
{string} | Value of property fill . |
getFillOpacity(): float
Gets current value of property
fillOpacity
.
Default value is 0
.
Returns:
{float} | Value of property fillOpacity |
getHeight(oData): number
Gets the value of property
height
.
This value determines the height of the selectedShape.
Parameters:
{object} | oData | Shape data. |
Returns:
{number} | Value of property height . |
getIsDuration(oData, oRowInfo): boolean
Gets current value of property
isDuration
.
When this flag is set to true, the shape is called 'duration shape'. And time
stands for startTime, endTime
stands for end time. When this flag is set to be false, the shape is called 'transient shape'. And only time
is used. Usually these 3 properties are used to determine x position of one shape.
Parameters:
{object} | oData | Shape data. |
{object} | oRowInfo | Information of the row and row data. |
Returns:
{boolean} | Value of property isDuration . |
getStroke(oData, oRowInfo): string
Parameters:
{object} | oData | Shape data. |
{object} | oRowInfo | Information about the row and the row data. |
Returns:
{string} | Value of property stroke . |
getStrokeOpacity(): float
Gets current value of property
strokeOpacity
.
Default value is 0
.
Returns:
{float} | Value of property strokeOpacity |
getStrokeWidth(oData, oRowInfo): number
Parameters:
{object} | oData | Shape data. |
{object} | oRowInfo | Information about the row and the row data. |
Returns:
{number} | Value of property strokeWidth . |
getTransform(oData, oRowInfo): string
Gets the value of property
transform
.
Standard SVG 'transform' attribute. See SVG 1.1 specifica6tion for 'transform'. The implementation of getTransform() provides some logic to enable properties rotationCenter
and rotationAngle
. If you override the default value calculated by the getter, proper rotation is not guaranteed.
Parameters:
{object} | oData | Shape data. |
{object} | oRowInfo | Information about the row and the row data. |
Returns:
{string} | Value of property transform . |
Sets a new value for property
fill
.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is none
.
Parameters:
{string} | sFill | New value for property fill |
Returns:
Sets a new value for property
fillOpacity
.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 0
.
Parameters:
{float} | fFillOpacity | New value for property fillOpacity |
Returns:
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:
{int} | iHeight | New value for property height |
Returns:
Sets a new value for property
strokeOpacity
.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 0
.
Parameters:
{float} | fStrokeOpacity | New value for property strokeOpacity |
Returns: