【问题标题】:Enable full screen using seesaw?使用跷跷板启用全屏?
【发布时间】:2012-02-10 00:16:12
【问题描述】:

按F11如何让我的跷跷板程序全屏? (不仅仅是最大化)

我目前有这个:

(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 在按下 F11 时运行,但我不知道如何使框架全屏显示。

【问题讨论】:

  • 为什么这被否决了?我很好奇,因为这是一个很老的问题。虽然仍然相关,而不是重复、措辞不当等。

标签: swing clojure fullscreen seesaw


【解决方案1】:

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

以下建议可以使用 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

我还没有调查你是如何在跷跷板中获得必要的摆动物体的。

【讨论】:

  • 这似乎是对的。 Seesaw 根本不包装 Swing 对象,因此您可以直接在 toggle-full-screen 中的 (to-root e) 的结果上调用 setUndecorated
  • 是的,链接的文章与 Seesaw 配合得很好。事实上,最前沿的 Seesaw 现在直接支持它:github.com/daveray/seesaw/blob/develop/test/seesaw/test/…
猜你喜欢
  • 1970-01-01
  • 2016-05-31
  • 1970-01-01
  • 2014-03-18
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-03-06
相关资源
最近更新 更多