List Legend is a legend template that contains a list of shapes. You can use this class to define a list legend.
Event Summary
checkBoxChange(oControlEvent)Event fired when the check box of a certain legend item is selected. Method Summary
sap.gantt.legend.ListLegend.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.gantt.legend.ListLegend with name sClassName
and enriches it with the information contained in oClassInfo
. attachCheckBoxChange(oData?, fnFunction, oListener?)Attaches event handler fnFunction
to the checkBoxChange
event of this sap.gantt.legend.ListLegend
. detachCheckBoxChange(fnFunction, oListener)Detaches event handler fnFunction
from the checkBoxChange
event of this sap.gantt.legend.ListLegend
. getShapes()Gets current value of property shapes
. setShapes(sShapes)Sets a new value for property shapes
. getFontSize,
getLegendHeight,
getLegendWidth,
getSapUiSizeClass,
getScaledLegendHeight,
getScaledLegendWidth,
getSvgDefs,
setFontSize,
setLegendHeight,
setLegendWidth,
setSvgDefs addStyleClass,
allowTextSelection,
attachBrowserEvent,
attachValidateFieldGroup,
checkFieldGroupIds,
clone,
detachBrowserEvent,
detachValidateFieldGroup,
fireValidateFieldGroup,
getAccessibilityInfo,
getBusy,
getBusyIndicatorDelay,
getControlsByFieldGroupId,
getFieldGroupIds,
getIdForLabel,
getRenderer,
getVisible,
hasStyleClass,
invalidate,
isBusy,
onAfterRendering,
onBeforeRendering,
placeAt,
removeStyleClass,
rerender,
setBusy,
setBusyIndicatorDelay,
setFieldGroupIds,
setVisible,
toggleStyleClass,
triggerValidateFieldGroup $,
addCustomData,
addDependent,
addEventDelegate,
applyFocusInfo,
bindElement,
data,
destroy,
destroyCustomData,
destroyDependents,
destroyLayoutData,
destroyTooltip,
enhanceAccessibilityState,
exit,
findElements,
fireEvent,
focus,
getCustomData,
getDependents,
getDomRef,
getElementBinding,
getFocusDomRef,
getFocusInfo,
getInterface,
getLayoutData,
getMetadata,
getTooltip,
getTooltip_AsString,
getTooltip_Text,
indexOfCustomData,
indexOfDependent,
init,
insertCustomData,
insertDependent,
prop,
removeAllCustomData,
removeAllDependents,
removeCustomData,
removeDependent,
removeEventDelegate,
setLayoutData,
setTooltip,
toString,
unbindElement addAggregation,
addAssociation,
applySettings,
attachFormatError,
attachModelContextChange,
attachParseError,
attachValidationError,
attachValidationSuccess,
bindAggregation,
bindContext,
bindObject,
bindProperty,
destroyAggregation,
detachFormatError,
detachModelContextChange,
detachParseError,
detachValidationError,
detachValidationSuccess,
findAggregatedObjects,
fireFormatError,
fireModelContextChange,
fireParseError,
fireValidationError,
fireValidationSuccess,
getAggregation,
getAssociation,
getBinding,
getBindingContext,
getBindingInfo,
getBindingPath,
getEventingParent,
getId,
getModel,
getObjectBinding,
getOriginInfo,
getParent,
getProperty,
hasModel,
indexOfAggregation,
insertAggregation,
isBound,
isInvalidateSuppressed,
isTreeBinding,
propagateMessages,
removeAggregation,
removeAllAggregation,
removeAllAssociation,
removeAssociation,
setAggregation,
setAssociation,
setBindingContext,
setModel,
setProperty,
unbindAggregation,
unbindContext,
unbindObject,
unbindProperty,
validateAggregation,
validateProperty Constructor Detail
new sap.gantt.legend.ListLegend(sId?, mSettings?)
Creates and initializes a new List Legend 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
- Events
- checkBoxChange : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
In addition, all settings applicable to the base type sap.gantt.legend.LegendBase can be used as well.
Parameters:
{string} | sId? | ID of the new control, generated automatically if no ID is given |
{object} | mSettings? | Initial settings for the new control |
Event Detail
checkBoxChange(oControlEvent)
Event fired when the check box of a certain legend item is selected.
Parameters:
{sap.ui.base.Event} | oControlEvent | |
{sap.ui.base.EventProvider} | oControlEvent.getSource | |
{object} | oControlEvent.getParameters | |
{string} | oControlEvent.getParameters.legendType | The shape that is checked or unchecked. |
{boolean} | oControlEvent.getParameters.value | The value of the check box. |
Method Detail
sap.gantt.legend.ListLegend.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.gantt.legend.ListLegend 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.legend.LegendBase.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.legend.ListLegend.
Returns:
Attaches event handler
fnFunction
to the
checkBoxChange
event of this
sap.gantt.legend.ListLegend
.
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.gantt.legend.ListLegend
itself.
Event fired when the check box of a certain legend item is selected.
Parameters:
{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.gantt.legend.ListLegend itself |
Returns:
Detaches event handler
fnFunction
from the
checkBoxChange
event of this
sap.gantt.legend.ListLegend
.
The passed function and listener object must match the ones used for event registration.
Parameters:
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
Returns:
Fires event
checkBoxChange
to attached listeners.
Expects the following event parameters:
legendType
of type string
The shape that is checked or unchecked.value
of type boolean
The value of the check box.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
getShapes(): array
Gets current value of property
shapes
.
Shapes for legend items. These shapes are used in the Gantt chart.
Returns:
{array} | Value of property shapes |
Sets a new value for property
shapes
.
Shapes for legend items. These shapes are used in the Gantt chart.
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
{array} | sShapes | New value for property shapes |
Returns: