站内搜索: 请输入搜索关键词
当前页面: 图书首页 > SWT: The Standard Widget Toolkit

5.17 Miscellaneous - SWT: The Standard Widget Toolkit

Previous Section  < Day Day Up >  Next Section

5.17 Miscellaneous

This section contains a few Display methods that did not fit elsewhere.

5.17.1 Beep

Some platforms have a simple way to make a short "warning" noise, which is frequently used to indicate an exceptional condition of some kind. This method will cause the platform hardware to generate such a noise.

beep() Causes the platform hardware to generate a short beep if it supports this capability.

5.17.2 Double-Click Time

Normally, SWT detects double-click events for you and passes them to your application using an SWT.MouseDoubleClick event (see the Events and Listeners section of the Widget Fundamentals chapter). However, it is also possible to identify double-clicks manually by detecting whether the length of time between clicks is below some threshold. Because most operating systems allow users to set their preferred threshold for double-clicks, SWT provides API that returns the platform double-click time.

getDoubleClickTime() Returns the maximum length of time, in milliseconds, that can occur between two mouse clicks in order for the operating system to treat them as a double-click.

    Previous Section  < Day Day Up >  Next Section