[ JFace ] StatusLineManager Ausrichtung

Wyatt

Erfahrenes Mitglied
Aloha!

Ich versuche einen StatusLineManager in mein Programm einzufügen, leider will der nicht so ganz an die Position, an die ich ihn haben will ;)

Java:
// Konstruktor
public TableJFaceView(Shell parentShell) {
		super(parentShell);	
		super.addMenuBar();
		super.addStatusLine();
		//super.setShellStyle(SWT.MIN);
	}

Java:
// configure Shell
protected void configureShell(Shell shell) {
		super.configureShell(shell);
        shell.setText("[ JFace ] Adressbuch");
        shell.setSize(new Point(360, 240));
        shell.setFocus();
    }

Java:
// Status Line Manager erzeugen
protected StatusLineManager createStatusLineManager(){
		return new StatusLineManager();
	}

Java:
protected Control createContents(Composite content) {   	
    	RowLayout rowLayout = new RowLayout();
    	rowLayout.marginLeft = 5;
        rowLayout.marginTop = 5;
        rowLayout.marginRight = 5;
        rowLayout.marginBottom = 5;
        rowLayout.spacing = 5;
    	content.setLayout(rowLayout);

    	createDataPanel(content);
    	createListPanel(content);
        
    	super.setStatus("Here I am!");	
        return super.createContents(content);
    }

Vielleicht kennt ja jemand von euch die Lösung!
Nochmal das Problem: der StatusLineManager wird an der falschen Stelle angezeigt.

Gruß
Felix
 

Anhänge

  • slm.JPG
    slm.JPG
    16 KB · Aufrufe: 41
Zuletzt bearbeitet von einem Moderator:
Aloha!

Für alle, die ähnliche Probleme haben sollten, hier ist meine Lösung:

Java:
protected Control createContents(Composite parent) {
    	Composite content = new Composite(parent, SWT.NONE);
    	
        RowLayout rowLayout = new RowLayout();
    	rowLayout.marginLeft = 5;
        rowLayout.marginTop = 5;
        rowLayout.marginRight = 5;
        rowLayout.marginBottom = 5;
        rowLayout.spacing = 5;
    	content.setLayout(rowLayout);

    	createDataPanel(content);
    	createListPanel(content);
        
    	super.setStatus("Here I am!");	
        return super.createContents(parent);
    }

Ich erstelle eine Composite auf dem Parent und gebe dann das parent wieder zurück ... und *voila* ... es funktioniert :)
Weshalb nun allerdings genau es nur so funktioniert, verstehe ich nicht...

Gruß
Felix
 
Zurück