Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » JFace need wrapper
JFace need wrapper [message #717792] Mon, 22 August 2011 11:39
kachwahed is currently offline kachwahedFriend
Messages: 1
Registered: August 2011
Junior Member
Hello everyone,
Is it possible to build JFace wrapper from ApplicationWindow, without hiding SWT and widgets, this may simplify using window, something like:
public class SimpleFace /*extends JFace*/ {
	public static void main(String[] args) {
		JFace f = new JFace(null);
//		JFace f = new JFace("Hello World");
		f.setTitle("Hello World!");//Optional
		f.setSize(300, 200);//Optional;
class JFace extends Window {
	private String title;
	private Point size;
	public String getTitle() {
		return title;
	public Point getSize() {
		return size;
	public void setSize(int width, int height) {
		setSize(new Point(width, height));
	public void setSize(Point size) {
		this.size = size;
	public void setTitle(String title) {
		this.title = title;
	public JFace(String title) {
		this(null, title);
	public JFace(Shell parentShell, String title) {
	protected void configureShell(Shell shell) {
		if (getSize() != null)
	public int open() {
	public int open(boolean shouldBlock) {
		return result;

and may add widgets to the Face/Composite using add() method, this can be easy to convert from Swing/AWT UI.
Previous Topic:Query on how to wrap text in a table viewer column & hot to wrap tooltip text
Next Topic:Model View Controler
Goto Forum:

Current Time: Tue Oct 06 10:38:17 GMT 2015

Powered by FUDForum. Page generated in 0.13806 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software