ThresholdSlider

Use

A ThresholdSlider is for the bar-like depiction of a state or an integer value. The color changes in accordance with defined threshold values. The interval between two of these Threshold values is a unit and the size of this interval is determined in pixels by the property unitWidth. A ThresholdSlider aggregates Thresholds or MultipleThresholds. The Thresholds determine the color changes of the ThresholdSlider for example.

The total tooltip of the ThresholdSlider is ThresholdSlider.tooltip plus tooltip of the active Threshold.

The small markings under a ThresholdSlider are TickMarks, which help the underside of the ThresholdSlider to look like a ruler. You can use the showTickmarks property to determine whether these TickMarks should be shown or not. The distance in units between two TickMarks is determined by the TickMarkSpacing property.

The width of a ThresholdSlider is determined by the number of TickMark intervals, which is set by the maxTickMarks property. The width of a ThresholdSlider in Pixels can therefore be calculated as follows:

maxTickMarks * TickMarkSpacing * unitWidth

Example of the Visual Display

Runtime Class

CL_WD_THRESHOLD_SLIDER

Properties in View Designer

Name

Type

Initial Value

Bindable

id

STRING

(automatic)

No

contextMenuBehaviour

WDUI_CONTEXT_MENU_BEHAVIOUR

inherit

No

contextMenuId

WDY_MD_UI_ELEMENT_REFERENCE

No

enabled

WDY_BOOLEAN

true

Yes

maxTickMarks

I

0

Yes

readOnly

WDY_BOOLEAN

false

Yes

state

WDUI_STATE

normal

Yes

styleClassName STRING Yes

showTickMarks

WDY_BOOLEAN

true

Yes

tickMarkSpacing

I

1

Yes

tooltip

Translatable text

Yes

unitWidth

I

5

Yes

value

I

Mandatory

visible

WDUI_VISIBILITY

visible

Yes

Aggregations in the View Designer

Name

Cardinality

Type

THRESHOLDS

0..n

Threshold

Events in View Designer

Dynamic Programming

For dynamic programming, the same properties, events, and aggregations as in the View Designer are available. But note that the spelling format and use of upper/lower case is different.

Dynamic Programming of Properties

View Designer Name

Runtime Name

Type

contextMenuBehaviour

CONTEXT_MENU_BEHAVIOUR

WDUI_CONTEXT_MENU_BEHAVIOUR

 contextMenuBehaviour: inherit

CL_WD_THRESHOLD_SLIDER=>E_CONTEXT_MENU_BEHAVIOUR-INHERIT

 contextMenuBehaviour: provide

CL_WD_THRESHOLD_SLIDER=>E_CONTEXT_MENU_BEHAVIOUR-PROVIDE

 contextMenuBehaviour: suppress

CL_WD_THRESHOLD_SLIDER=>E_CONTEXT_MENU_BEHAVIOUR-SUPPRESS

contextMenuId

CONTEXT_MENU_ID

WDY_MD_UI_ELEMENT_REFERENCE

enabled

ENABLED

WDY_BOOLEAN

maxTickMarks

MAX_TICK_MARKS

I

readOnly

READ_ONLY

WDY_BOOLEAN

showTickMarks

SHOW_TICK_MARKS

WDY_BOOLEAN

state

STATE

WDUI_STATE

state: normal

CL_WD_THRESHOLD_SLIDER=>E_STATE-NORMAL

state: required

CL_WD_THRESHOLD_SLIDER=>E_STATE-REQUIRED

styleClassName STYLE_CLASS_NAME STRING

tickMarkSpacing

TICK_MARK_SPACING

I

tooltip

TOOLTIP

WDY_MD_TRANSLATABLE_TEXT

unitWidth

UNIT_WIDTH

l

value

VALUE

l

visible

VISIBLE

WDUI_VISIBILITY

visible: none

CL_WD_THRESHOLD_SLIDER=>E_VISIBLE-NONE

l

visible: visible

CL_WD_THRESHOLD_SLIDER=>E_VISIBLE-VISIBLE

Dynamic Programming of Events

View Designer Name

Runtime Name

onAction

ON_ACTION

onChange

ON_CHANGE

Dynamic Programming of Aggregations

View Designer Name

Runtime Name

Cardinality

THRESHOLDS

THRESHOLDS

0..n

Example

You can find an example of this UI element in the system in the WDR_TEST_THRESHOLD_SLIDER component.