简体   繁体   中英

SWT/JFace : How to setFont on StatusLine? Windowbuilder broken?

I am a newbie to SWT. There are two problems which have taken up 3 days of resarch, trying, looking and searching. It's a good way to learn about new things, but I'm totally stumped by the following two persistent issues.

Question the first.

public class SWTMN extends ApplicationWindow
{
    public final static Display d = new Display() ;

    public SWTMN()
        {
            super(null);
            Util.getImageRegistry() ;

            addMenuBar();
            addStatusLine();

... and so on. Later on ...

'SetStatus("This works fine!") ;  // Works fine!!

I want to change the Font of the messages displayed by the statusline - and cannot find a way to do it.

Question the second.

Using a fresh Eclipse Indigo install (updated), creating a fresh (SWT/JFace- support) project, creating a New SWT ApplicationWindow all seems OK. The new file is available in the editor, and compiles - run produces a new, empty window, as it should.

Pressing the "Design" tab cause a modal progress dialogue to appear, with the message "Parsing...", which hangs at about 15% in. The editor windows underneath the progress message are replaced with a general message about a WindowsBuilder internal error - the last line of which is always

ClassCastException cannot cast org.eclipse.swt.shell.Shell to org.eclipse.swt.widget.Widget

(Because the "Parsing ..." progress bar is Application (buggering) modal , Eclipse is now stuffed, and I have to force a quit. Error message offers buttons to re-parse, switch to code which are tempting, and unusable).

Can you help me get Windowbuilder to start-up?

Many thanks for your help!

I'm going to ignore the built-in statusline, as being a solution only for those who are willing to have that exact and limited package of functionality.

It seems odd to me that a GUI-framework so focussed on looking good, would have something so poor as a statusline with a font that does not match the rest of the application.

Go figure.

I'm going to use panel as a custom toolbar, positioning it to the bottom of the frame.

Solution: Found, decided.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM