【问题标题】:Adding title to window border for Eclipse RCP detached view为 Eclipse RCP 分离视图的窗口边框添加标题
【发布时间】:2010-12-20 01:32:24
【问题描述】:

我正在开发一个具有可分离视图的 Eclipse RCP 项目。我希望能够在视图分离后将一些文本放在围绕视图的窗口边框上。有人对这个有经验么?开发环境是Windows上的Eclipse 3.4。 谢谢。

【问题讨论】:

    标签: eclipse view rcp detach


    【解决方案1】:

    我不确定是否可以通过常规更新触发updateTitle():
    如果你看一下org.eclipse.ui.internal.DetachedWindow的代码,你会看到一个令人不安的方法updateTitle()

    private void updateTitle() {
        if (activePart != null) {
            // Uncomment to set the shell title to match the title of the active part
            // String text = activePart.getTitle();
            //
            // if (!text.equals(s.getText())) {
            //     s.setText(text);
            // }
        }
    }
    

    所有评论!

    【讨论】:

      【解决方案2】:

      你不能。分离出来的是一个工具窗口而不是主窗口,所以上面有标题是不好的

      【讨论】:

        猜你喜欢
        • 2023-03-24
        • 1970-01-01
        • 2023-03-31
        • 2018-04-22
        • 1970-01-01
        • 2011-10-22
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多