YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
de.yaacc.yxc.YxcGroupDrag Class Reference

The state of one drag on the group volume slider. More...

Collaboration diagram for de.yaacc.yxc.YxcGroupDrag:
Collaboration graph

Public Member Functions

synchronized int begin (int progress)
 A touch began at this position; returns the id of the drag (for levelsArrived).
 
synchronized Map< String, Integer > moved (int progress)
 The slider moved.
 
synchronized Map< String, Integer > levelsArrived (int dragId, Map< String, Integer > read)
 The start levels of drag dragId were read.
 
synchronized void end ()
 The finger was lifted; later reads of this drag are dropped.
 
synchronized boolean isActive ()
 

Detailed Description

The state of one drag on the group volume slider.

It lives outside the row's listener: the row is rebound while the finger is down (a status poll, a change of the group), and a new listener must go on with the drag it did not see begin.

The members' levels at the start are read from the devices after the touch began; the movement until they are there is only remembered and then applied once. A drag that ended or was replaced by a newer one does not apply late reads. Thread-safe: the touch comes on the main thread, the levels on a worker.

Member Function Documentation

◆ levelsArrived()

synchronized Map< String, Integer > de.yaacc.yxc.YxcGroupDrag.levelsArrived ( int dragId,
Map< String, Integer > read )

The start levels of drag dragId were read.

Returns
the levels to send now (for the latest position), or null if that drag is no longer the current one

◆ moved()

synchronized Map< String, Integer > de.yaacc.yxc.YxcGroupDrag.moved ( int progress)

The slider moved.

Returns
the level to send to each member, or null while the start levels are not there yet or no drag is going on

The documentation for this class was generated from the following file: