Java Swing:Alt-tab 样式菜单(上下文切换菜单)
Java Swing 当前是否有包含上下文切换菜单功能的实现或框架?
更详细:
在我们的应用程序中,我们有应用程序的几个子部分,并且一次只显示其中一个。目前有多种方法可以在它们之间进行切换,包括工具栏按钮和通过View
菜单。我们想添加另一种方法,可以通过键盘快捷键访问。这将弹出一个上下文切换菜单,其概念与现代操作系统中可用的菜单类似。
如果您按 Alt+Tab
并释放 Tab
,同时仍按住 Alt
,您将在屏幕中间看到一个小窗口,显示当前正在运行的各种应用程序。在 Ubuntu 中,您可以获得每个应用程序的屏幕截图及其窗口管理器图标。在 Windows 中,您可以获得窗口管理器图标等。
Are there any current implementations or frameworks for Java Swing that include functionality for a context-switcher menu?
More detail:
In our application, we have several sub-parts of the application, and only one of them is displayed at once. Presently there are several ways to switch between them, including tool bar buttons and via the View
menu. We would like to add another means, that is accessible via a keyboard shortcut. This would bring up a context-switch menu, similar in concept to those available in modern OS'es.
If you press Alt+Tab
and release the Tab
while still holding down Alt
, you will get a little window in the middle of the screen, displaying the various applications that are running at the moment. In Ubuntu, you get a screenshot of each application, plus its window manager icon. In Windows you get the window manager icons, and so on.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为这是可能的。您可以将转换应用于传递给每个
JFrame
的Graphics
选项,并让它在其上绘制自身的小版本。然后拍摄这些图像并将它们放置在应用程序顶部的GlassPane
上。所选窗口的突出显示可能很棘手,但我认为它会很好用。I think this is possible. You could apply a transformation to a
Graphics
option that you pass to eachJFrame
and have it paint a small version of itself on it. Then take those images and place them on aGlassPane
on top of your application. The highlighting of the selected window might be tricky, but I think it would work nicely.