Skip to main content
summaryrefslogtreecommitdiffstats
blob: 638c140a760a1dbbb39041a322852572159033d9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package org.eclipse.fx.testcases.dnd.app;

import javafx.scene.control.Label;
import javafx.scene.control.TextField;
import javafx.scene.layout.BorderPane;
import javafx.scene.text.Font;

import javax.annotation.PostConstruct;

import org.eclipse.e4.ui.di.Focus;
import org.eclipse.e4.ui.model.application.ui.basic.MPart;

public class PartImpl {
	private TextField f;

	@PostConstruct
	void init(BorderPane parent, MPart part) {
		Label l = new Label(part.getLabel());
		l.setFont(Font.font(30));
		
		parent.setCenter(l);
		
		f = new TextField();
		parent.setBottom(f);
	}
	
	@Focus
	void focus() {
		f.requestFocus();
	}
}

Back to the top