Class sap.gantt.legend.ListLegendModule: sap/gantt/legend/ListLegend

extends LegendBase

List Legend is a legend template that contains a list of shapes. You can use this class to define a list legend.

Constructor Summary
new sap.gantt.legend.ListLegend(sId?, mSettings?)Creates and initializes a new List Legend class.
Event Summary
checkBoxChange(oControlEvent)Event fired when the check box of a certain legend item is selected.
Events borrowed from class sap.ui.core.Control
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.
sap.gantt.legend.ListLegend.getMetadata()Returns a metadata object for class sap.gantt.legend.ListLegend.
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.
fireCheckBoxChange(mArguments?)Fires event checkBoxChange to attached listeners.
getShapes()Gets current value of property shapes.
setShapes(sShapes)Sets a new value for property shapes.
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
sap.gantt.legend.ListLegend.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.gantt.legend.ListLegend.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
attachCheckBoxChange(oData?, fnFunction, oListener?): sap.gantt.legend.ListLegend
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:
{sap.gantt.legend.ListLegend} Reference to this in order to allow method chaining
detachCheckBoxChange(fnFunction, oListener): sap.gantt.legend.ListLegend
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:
{sap.gantt.legend.ListLegend} Reference to this in order to allow method chaining
fireCheckBoxChange(mArguments?): sap.gantt.legend.ListLegend
Fires event checkBoxChange to attached listeners.

Expects the following event parameters:

  • legendType of type stringThe shape that is checked or unchecked.
  • value of type booleanThe value of the check box.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.gantt.legend.ListLegend} Reference to this in order to allow method chaining
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
setShapes(sShapes): sap.gantt.legend.ListLegend
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:
{sap.gantt.legend.ListLegend} Reference to this in order to allow method chaining