English 中文(简体)
JFace WizardPage
原标题:Disable the window resize on JFace WizardPage

我想解说的是,在我的职位形象下,纽芬兰语的最大化/大米。

“entergraph

这是我的法典:

public class ProjectWizardPageOne extends WizardPage {

private String platform;

public ProjectWizardPageOne(String title) {
    super(title);
    this.setTitle(title);
    this.setMessage("Configure Project Name and Location");
}

@Override
public void createControl(Composite parent) {
    Composite container = new Composite(parent,SWT.NONE);
    setPageComplete(false);
    setControl(container);

    Canvas leftPanel = new Canvas(container, SWT.NONE);
    leftPanel.setBackgroundImage(new Image(leftPanel.getDisplay(), this
            .getClass().getClassLoader()
            .getResourceAsStream("/icons/mypicture.png")));
    leftPanel.setBounds(0, 0, 183, 282);

    Composite rightContainer = new Composite(container, SWT.NONE);
    rightContainer.setBackground(new Color(null, 255, 255, 255));
    rightContainer.setBounds(181, 0, 399, 282);
}

public String getPlatform() {
    return platform;
}

public void setPlatform(String platform) {
    this.platform = platform;
}
}

I tried to get the Composite s Shell like this "container.getShell();" but I don t understand How I can set these parameters "SWT.SHELL_TRIM | SWT.TOOL"! Thanks

最佳回答

它是一纸空文件,也是一纸空文,是按方案启动的。 如果是习俗的话,你必须创造出世人,然后将世人诉。 在创建WizardDialog时,你还将制造壳牌,你可以在没有SWT的情况下提出这一论点。 RESIZE。 因为不是由你创建的方言,我想你可以控制在那里的转选。 遗赠只能由壳牌的建筑商通过。

问题回答

控制<代码>window/ 壳牌不是<代码>WizardPage的责任,它不能这样做。 它负责<代码>WizardDialog或产生该编码的代码。 事实上,没有保障<代码>Wizard/code>及其<编码>。

关于方言,我已经指出,我必须明确表明,我需要高右角的敏度、最大纽子。 为此,我需要把以下方法称作构造者:

setShellStyle(getShellStyle() | SWT.MAX | SWT.MIN | SWT.RESIZE);

由于维萨德也是一位方言,我可以把上述方法称作重塑母体,使其不包含最大、最小和其他纽州(见上文代码)。 违约造成的担心可能会增加这些纽州。 但是,我认为,你可以在令人信服的创造结束时回顾这一点。 希望这一帮助。

public class InstallerWizard extends Wizard{
...
main()
{
WizardDialog dialog = new DisableMax(shell, new InstallerWizard());
dialog.open();
}

} public class DisableMax extends WizardDialog {

    public DisableMax(Shell parentShell, IWizard newWizard) {
        super(parentShell, newWizard);
        setShellStyle(SWT.CLOSE | SWT.MIN | SWT.RESIZE | getDefaultOrientation());
    }
}




相关问题
In Eclipse, why doesn t "Show In" appear for non-Java files?

If I have a *java file open, I can right click on the source, scroll down to "Show In (Alt-Shift-W)", and select Navigator. If I have an *xml, *jsp, or pretty much anything besides a Java source ...

Eclipse: Hover broken in debug perspective

Since upgrading Eclipse (Galileo build 20090920-1017), hover in debug no longer displays a variable s value. Instead, hover behaves as if I were in normal Java perspective: alt text http://...

Eclipse smart quotes - like in Textmate

Happy Friday — Does anyone know if eclipse has the notion of smart quotes like Textmate. The way it works is to select some words and quote them by simply hitting the " key? I m a newbie here so be ...

Indentation guide for the eclipse editor

Is there a setting or plugin for eclipse that can show indentation guides in the editor? Something like the Codekana plugin for visual studio (not so fancy is also OK). Important that it works with ...

Adding jar from Eclipse plugin runtime tab

I want to add .jar files for plugin from the Runtime tab of manifest file. When I use the Add... button, I can see only sub-directories of the plugin project. So if I want to add same .jar file to ...

How to copy multiple projects into single folder in eclipse

I have two projects, Project1 and Project2. Now i want to copy this projects into eclipse workspace but i want these projects to be in a single folder like below. Eclipse Workspace -> Project -> ...

Java: Finding out what is using all the memory

I have a java application that runs out of memory, but I have no idea which code is allocating the memory. Is there an application with which I can check this? I use Eclipse.

热门标签