class sap.m.ResponsiveScale

Control sample: sap.m.ResponsiveScale
Visiblity: public
UX Guidelines:
Implements: sap.m.IScale
Available since: N/A
Module: sap/m/ResponsiveScale
Application Component: CA-UI5-CTR

Overview

A sap.m.Slider element represents a scale with tickmarks and labels. The purpose of the element is to decouple the scale logic from other controls i.e. Slider / RangeSlider

The most important properties of the ResponsiveScale are:


Constructor

Constructor for a new ResponsiveScale.

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.ResponsiveScale(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
tickmarksBetweenLabels int 0

Put a label on every N-th tickmark.

Visibility: public

Methods Overview

Method Description
calcNumberOfTickmarks

How many tickmarks could be placed on the axis/scale?

sap.m.ResponsiveScale.extend

Creates a new subclass of class sap.m.ResponsiveScale 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.Element.extend.

sap.m.ResponsiveScale.getMetadata

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

getTickmarksBetweenLabels

Gets current value of property tickmarksBetweenLabels.

Put a label on every N-th tickmark.

Default value is 0.

handleResize

Shows/hides tickmarks when some size limits are met. Implements responsiveness of the tickmarks.

setTickmarksBetweenLabels

Sets a new value for property tickmarksBetweenLabels.

Put a label on every N-th tickmark.

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

Default value is 0.

calcNumberOfTickmarks

How many tickmarks could be placed on the axis/scale?

Param Type DefaultValue Description
fSize float

Size of the scale. This is the distance between the start and end point i.e. 0..100

fStep float

The step walking from start to end.

iTickmarksThreshold int

Limits the number of tickmarks.

sap.m.ResponsiveScale.extend

Creates a new subclass of class sap.m.ResponsiveScale 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.Element.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

sap.m.ResponsiveScale.getMetadata

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

getTickmarksBetweenLabels

Gets current value of property tickmarksBetweenLabels.

Put a label on every N-th tickmark.

Default value is 0.

handleResize

Shows/hides tickmarks when some size limits are met. Implements responsiveness of the tickmarks.

Param Type DefaultValue Description
oEvent jQuery.Event

The event object passed.

setTickmarksBetweenLabels

Sets a new value for property tickmarksBetweenLabels.

Put a label on every N-th tickmark.

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

Default value is 0.

Param Type DefaultValue Description
iTickmarksBetweenLabels int 0

New value for property tickmarksBetweenLabels