class sap.m.PlanningCalendarLegend

Visiblity: public
UX Guidelines:
Implements:
Available since: N/A
Module: sap/m/PlanningCalendarLegend
Application Component: CA-UI5-CTR

A legend for the sap.m.PlanningCalendar that displays the special dates and appointments in colors with their corresponding description. The PlanningCalendarLegend extends sap.ui.unified.CalendarLegend and overwrites the default value for property columnWidth to auto


Constructor

Constructor for a new PlanningCalendarLegend.

Accepts an object literal mSettings that defines initial property values, aggregated and associated objects as well as event handlers. See sap.ui.base.ManagedObject#constructor for a general description of the syntax of the settings object.

new sap.m.PlanningCalendarLegend(sId?, mSettings?)
Param Type Default Value Description
sId? string

ID for the new control, generated automatically if no ID is given

mSettings? object

Initial settings for the new control


Properties

Name Type Default Value Description
appointmentItemsHeader string Appointments

Defines the text displayed in the header of the appointment items list. It is commonly related to the calendar appointments.

Visibility: public
itemsHeader string Calendar

Defines the text displayed in the header of the items list. It is commonly related to the calendar days.

Visibility: public

Aggregations

Default Aggregation:

Name Cardinality Type Description
appointmentItems 0..n sap.ui.unified.CalendarLegendItem

The legend items which show color and type information about the calendar appointments.


Methods Overview

Method Description
addAppointmentItem

Adds some appointmentItem to the aggregation appointmentItems.

destroyAppointmentItems

Destroys all the appointmentItems in the aggregation appointmentItems.

sap.m.PlanningCalendarLegend.extend

Creates a new subclass of class sap.m.PlanningCalendarLegend with name sClassName and enriches it with the information contained in oClassInfo.

oClassInfo might contain the same kind of information as described in sap.ui.unified.CalendarLegend.extend.

getAppointmentItems

Gets content of aggregation appointmentItems.

The legend items which show color and type information about the calendar appointments.

getAppointmentItemsHeader

Gets current value of property appointmentItemsHeader.

Defines the text displayed in the header of the appointment items list. It is commonly related to the calendar appointments.

Default value is "Appointments".

getItemsHeader

Gets current value of property itemsHeader.

Defines the text displayed in the header of the items list. It is commonly related to the calendar days.

Default value is "Calendar".

sap.m.PlanningCalendarLegend.getMetadata

Returns a metadata object for class sap.m.PlanningCalendarLegend.

indexOfAppointmentItem

Checks for the provided sap.ui.unified.CalendarLegendItem in the aggregation appointmentItems. and returns its index if found or -1 otherwise.

insertAppointmentItem

Inserts a appointmentItem into the aggregation appointmentItems.

removeAllAppointmentItems

Removes all the controls from the aggregation appointmentItems.

Additionally, it unregisters them from the hosting UIArea.

removeAppointmentItem

Removes a appointmentItem from the aggregation appointmentItems.

setAppointmentItemsHeader

Sets a new value for property appointmentItemsHeader.

Defines the text displayed in the header of the appointment items list. It is commonly related to the calendar appointments.

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

Default value is "Appointments".

setItemsHeader

Sets a new value for property itemsHeader.

Defines the text displayed in the header of the items list. It is commonly related to the calendar days.

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

Default value is "Calendar".

addAppointmentItem

Adds some appointmentItem to the aggregation appointmentItems.

Param Type DefaultValue Description
oAppointmentItem sap.ui.unified.CalendarLegendItem

The appointmentItem to add; if empty, nothing is inserted

destroyAppointmentItems

Destroys all the appointmentItems in the aggregation appointmentItems.

sap.m.PlanningCalendarLegend.extend

Creates a new subclass of class sap.m.PlanningCalendarLegend with name sClassName and enriches it with the information contained in oClassInfo.

oClassInfo might contain the same kind of information as described in sap.ui.unified.CalendarLegend.extend.

Param Type DefaultValue Description
sClassName string

Name of the class being created

oClassInfo object

Object literal with information about the class

FNMetaImpl function

Constructor function for the metadata object; if not given, it defaults to the metadata implementation used by this class

getAppointmentItems

Gets content of aggregation appointmentItems.

The legend items which show color and type information about the calendar appointments.

getAppointmentItemsHeader

Gets current value of property appointmentItemsHeader.

Defines the text displayed in the header of the appointment items list. It is commonly related to the calendar appointments.

Default value is "Appointments".

getItemsHeader

Gets current value of property itemsHeader.

Defines the text displayed in the header of the items list. It is commonly related to the calendar days.

Default value is "Calendar".

sap.m.PlanningCalendarLegend.getMetadata

Returns a metadata object for class sap.m.PlanningCalendarLegend.

indexOfAppointmentItem

Checks for the provided sap.ui.unified.CalendarLegendItem in the aggregation appointmentItems. and returns its index if found or -1 otherwise.

Param Type DefaultValue Description
oAppointmentItem sap.ui.unified.CalendarLegendItem

The appointmentItem whose index is looked for

insertAppointmentItem

Inserts a appointmentItem into the aggregation appointmentItems.

Param Type DefaultValue Description
oAppointmentItem sap.ui.unified.CalendarLegendItem

The appointmentItem to insert; if empty, nothing is inserted

iIndex int

The 0-based index the appointmentItem should be inserted at; for a negative value of iIndex, the appointmentItem is inserted at position 0; for a value greater than the current size of the aggregation, the appointmentItem is inserted at the last position

removeAllAppointmentItems

Removes all the controls from the aggregation appointmentItems.

Additionally, it unregisters them from the hosting UIArea.

removeAppointmentItem

Removes a appointmentItem from the aggregation appointmentItems.

Param Type DefaultValue Description
vAppointmentItem int string sap.ui.unified.CalendarLegendItem

The appointmentItem to remove or its index or id

setAppointmentItemsHeader

Sets a new value for property appointmentItemsHeader.

Defines the text displayed in the header of the appointment items list. It is commonly related to the calendar appointments.

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

Default value is "Appointments".

Param Type DefaultValue Description
sAppointmentItemsHeader string "Appointments"

New value for property appointmentItemsHeader

setItemsHeader

Sets a new value for property itemsHeader.

Defines the text displayed in the header of the items list. It is commonly related to the calendar days.

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

Default value is "Calendar".

Param Type DefaultValue Description
sItemsHeader string "Calendar"

New value for property itemsHeader