Distinguish once short clicked from twice click and once longer pressed

Is it possible to distinguish on the same control if mouse click was:

  • pressed one time short (<400ms) → Action 1
  • pressed one time and it is still pressed → Action 2
  • pressed twice inside 1 sec. → Action 3

the first click of the doubleclick gives an clicked-event, the second one gives another click-event and then the doubleclick-event :frowning:
What is the best way to do? With Counter and reading an “LastTimeClicked”?

In Button Java API, the click event gives you just method to check the click count, which allows you to distinguish double click from single click. But there is no method to check how long the mouse button was down.