A legend for the Calendar Control. Displays special dates colors with their corresponding description. The aggregation specialDates can be set herefor.
Constructor for a new CalendarLegend.
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.ui.unified.CalendarLegend(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 |
Name | Type | Default Value | Description |
---|---|---|---|
columnWidth | sap.ui.core.CSSSize | 120px | Defines the width of the created columns in which the items are arranged. Visibility: public |
standardItems | string[] | Today, Selected, WorkingDay, NonWorkingDay | Determines the standard items related to the calendar days, such as, today, selected, working and non-working. Values must be one of |
Default Aggregation:
Name | Cardinality | Type | Description |
---|---|---|---|
_standardItems | 0..n | sap.ui.unified.CalendarLegendItem | |
items | 0..n | sap.ui.unified.CalendarLegendItem |
Items to be displayed. |
Method | Description |
---|---|
addItem |
Adds some item to the aggregation items. |
destroyItems |
Destroys all the items in the aggregation items. |
sap.ui.unified.CalendarLegend.extend |
Creates a new subclass of class sap.ui.unified.CalendarLegend with name
|
getColumnWidth |
Gets current value of property columnWidth. Defines the width of the created columns in which the items are arranged. Default value is |
getItems |
Gets content of aggregation items. Items to be displayed. |
sap.ui.unified.CalendarLegend.getMetadata |
Returns a metadata object for class sap.ui.unified.CalendarLegend. |
getStandardItems |
Gets current value of property standardItems. Determines the standard items related to the calendar days, such as, today, selected, working and non-working. Values must be one of Default value is |
indexOfItem |
Checks for the provided |
insertItem |
Inserts a item into the aggregation items. |
removeAllItems |
Removes all the controls from the aggregation items. Additionally, it unregisters them from the hosting UIArea. |
removeItem |
Removes a item from the aggregation items. |
setColumnWidth |
Sets a new value for property columnWidth. Defines the width of the created columns in which the items are arranged. When called with a value of Default value is |
setStandardItems |
Sets a new value for property standardItems. Determines the standard items related to the calendar days, such as, today, selected, working and non-working. Values must be one of When called with a value of Default value is |
Adds some item to the aggregation items.
Param | Type | DefaultValue | Description |
---|---|---|---|
oItem | sap.ui.unified.CalendarLegendItem |
The item to add; if empty, nothing is inserted |
Creates a new subclass of class sap.ui.unified.CalendarLegend 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.core.Control.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 |
Gets current value of property columnWidth.
Defines the width of the created columns in which the items are arranged.
Default value is '120px'
.
Returns a metadata object for class sap.ui.unified.CalendarLegend.
Gets current value of property standardItems.
Determines the standard items related to the calendar days, such as, today, selected, working and non-working. Values must be one of sap.ui.unified.StandardCalendarLegendItem
. Note: for versions 1.50 and 1.52, this property was defined in the subclass sap.m.PlanningCalendarLegend
Default value is ['Today', 'Selected', 'WorkingDay', 'NonWorkingDay']
.
Checks for the provided sap.ui.unified.CalendarLegendItem
in the aggregation items. and returns its index if found or -1 otherwise.
Param | Type | DefaultValue | Description |
---|---|---|---|
oItem | sap.ui.unified.CalendarLegendItem |
The item whose index is looked for |
Inserts a item into the aggregation items.
Param | Type | DefaultValue | Description |
---|---|---|---|
oItem | sap.ui.unified.CalendarLegendItem |
The item to insert; if empty, nothing is inserted |
|
iIndex | int |
The |
Removes all the controls from the aggregation items.
Additionally, it unregisters them from the hosting UIArea.
Removes a item from the aggregation items.
Param | Type | DefaultValue | Description |
---|---|---|---|
vItem | int string sap.ui.unified.CalendarLegendItem |
The item to remove or its index or id |
Sets a new value for property columnWidth.
Defines the width of the created columns in which the items are arranged.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is '120px'
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sColumnWidth | sap.ui.core.CSSSize | '120px' |
New value for property |
Sets a new value for property standardItems.
Determines the standard items related to the calendar days, such as, today, selected, working and non-working. Values must be one of sap.ui.unified.StandardCalendarLegendItem
. Note: for versions 1.50 and 1.52, this property was defined in the subclass sap.m.PlanningCalendarLegend
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is ['Today', 'Selected', 'WorkingDay', 'NonWorkingDay']
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sStandardItems | string[] | ['Today', 'Selected', 'WorkingDay', 'NonWorkingDay'] |
New value for property |