Class sap.ui.vbm.LegendItemModule: sap/ui/vbm/LegendItem
Aggregation element for the Legend. A LegendItem consists of marker and an associated text. The marker is either a rectangle in the given color or the given image or a semantic spot type. If no marker but only a text is provided then it is shown in italic letters and can be regarded as a header.
sClassName and enriches it with the information contained in oClassInfo.fnFunction to the click event of this sap.ui.vbm.LegendItem.fnFunction from the click event of this sap.ui.vbm.LegendItem. 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
- color : string (default: )
- image : string
- semanticSpotType : sap.ui.vbm.SemanticType
- text : string
- Events
- click : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
In addition, all settings applicable to the base type sap.ui.core.Element can be used as well.
| {string} | sId? | id for the new control, generated automatically if no id is given |
| {object} | mSettings? | initial settings for the new control |
| {sap.ui.base.Event} | oControlEvent | |
| {sap.ui.base.EventProvider} | oControlEvent.getSource | |
| {object} | oControlEvent.getParameters | |
| {object} | oControlEvent.getParameters.data | Event data object |
| {boolean} | oControlEvent.getParameters.ctrlKey | key modifier Ctrl pressed |
| {boolean} | oControlEvent.getParameters.shiftKey | key modifier Shift pressed |
| {boolean} | oControlEvent.getParameters.metaKey | key modifier Meta pressed |
| {boolean} | oControlEvent.getParameters.altKey | key modifier Alt pressed |
sClassName and enriches it with the information contained in oClassInfo. oClassInfo might contain the same kind of information as described in sap.ui.core.Element.extend.
| {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 |
| {function} | Created class / constructor function |
| {sap.ui.base.Metadata} | Metadata object describing this class |
fnFunction to the click event of this sap.ui.vbm.LegendItem. When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui.vbm.LegendItem itself.
The event is raised when there is a click action on a legend item.
| {object} | oData? | An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
| {function} | fnFunction | The function to be called when the event occurs |
| {object} | oListener? | Context object to call the event handler with. Defaults to this sap.ui.vbm.LegendItem itself |
| {sap.ui.vbm.LegendItem} | Reference to this in order to allow method chaining |
fnFunction from the click event of this sap.ui.vbm.LegendItem. The passed function and listener object must match the ones used for event registration.
| {function} | fnFunction | The function to be called, when the event occurs |
| {object} | oListener | Context object on which the given function had to be called |
| {sap.ui.vbm.LegendItem} | Reference to this in order to allow method chaining |
click to attached listeners. Expects the following event parameters:
dataof typeobjectEvent data objectctrlKeyof typebooleankey modifier Ctrl pressedshiftKeyof typebooleankey modifier Shift pressedmetaKeyof typebooleankey modifier Meta pressedaltKeyof typebooleankey modifier Alt pressed
| {Map} | mArguments? | The arguments to pass along with the event |
| {sap.ui.vbm.LegendItem} | Reference to this in order to allow method chaining |
color. The color of the legend marker.
Default value is .
| {string} | Value of property color |
image. The image for the legend marker.
| {string} | Value of property image |
semanticSpotType. The semantic spot type for the legend marker.
| {sap.ui.vbm.SemanticType} | Value of property semanticSpotType |
text. The text of the legend item.
| {string} | Value of property text |
color. The color of the legend marker.
When called with a value of null or undefined, the default value of the property will be restored.
Default value is .
| {string} | sColor | New value for property color |
| {sap.ui.vbm.LegendItem} | Reference to this in order to allow method chaining |
image. The image for the legend marker.
When called with a value of null or undefined, the default value of the property will be restored.
| {string} | sImage | New value for property image |
| {sap.ui.vbm.LegendItem} | Reference to this in order to allow method chaining |
semanticSpotType. The semantic spot type for the legend marker.
When called with a value of null or undefined, the default value of the property will be restored.
| {sap.ui.vbm.SemanticType} | sSemanticSpotType | New value for property semanticSpotType |
| {sap.ui.vbm.LegendItem} | Reference to this in order to allow method chaining |
text. The text of the legend item.
When called with a value of null or undefined, the default value of the property will be restored.
| {string} | sText | New value for property text |
| {sap.ui.vbm.LegendItem} | Reference to this in order to allow method chaining |