使用跷跷板启用全屏?

发布于 2025-01-04 08:51:28 字数 617 浏览 1 评论 0原文

当按下 F11 时,如何使我的 seesaw 程序全屏显示? (不仅仅是最大化)

我目前有这样的:

(defn toggle-full-screen [e]
  (-> (to-root e)
    magic!)

(def full-screen-action  (action  :name "Full Screen" :tip "Full Screen"     
                                  :mnemonic \f        :key (keystroke "F11")
                                  :handler toggle-full-screen))
(def view-menu (menu  :text "View"
                      :mnemonic \v
                      :items [full-screen-action]))

(def top-menubar (menubar :items [view-menu]))
[...]

按下 F11 时 toggle-full-screen 运行,但是我不知道如何使框架全屏显示。

How can I make my seesaw program full screen when F11 is pressed? (not just maximized)

I currently have this:

(defn toggle-full-screen [e]
  (-> (to-root e)
    magic!)

(def full-screen-action  (action  :name "Full Screen" :tip "Full Screen"     
                                  :mnemonic \f        :key (keystroke "F11")
                                  :handler toggle-full-screen))
(def view-menu (menu  :text "View"
                      :mnemonic \v
                      :items [full-screen-action]))

(def top-menubar (menubar :items [view-menu]))
[...]

toggle-full-screen runs when F11 is pressed however I can't figure out how to make the frame fullscreen.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

比忠 2025-01-11 08:51:28

警告脚本者,我还没有在跷跷板中尝试过这个,但我认为这主要是直接利用 Swing 中可用的东西。

下面建议了可以使用 swing API 执行哪些操作:
http://weblogs.java.net/blog /mkarg/archive/2010/01/03/fullscreen-mode-cool

另外:
http://docs.oracle.com/javase/tutorial/extra/fullscreen /index.html

至少部分技巧是在框架上调用 setUndecorated

我还没有研究如何在跷跷板上获得必要的摆动物体。

Caveat scriptor, I haven't tried this in seesaw but I think this is mostly about directly leveraging what is available in swing.

The following suggests what can be done with the swing API:
http://weblogs.java.net/blog/mkarg/archive/2010/01/03/fullscreen-mode-cool

Also:
http://docs.oracle.com/javase/tutorial/extra/fullscreen/index.html

At least part of the trick is to call setUndecorated on the frame.

I haven't investigated how you get at the necessary swing objects within seesaw yet.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文