Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Add SWT button to a GEF diagram
Add SWT button to a GEF diagram [message #241125] Tue, 29 January 2008 16:21 Go to next message
Eclipse UserFriend
Originally posted by: juavizga.hotmail.com

Does anybody know if it is possible to add SWT elements within a GEF diagram?


thanks in advance
Re: Add SWT button to a GEF diagram [message #241161 is a reply to message #241125] Thu, 31 January 2008 13:25 Go to previous messageGo to next message
Manuel Selva is currently offline Manuel SelvaFriend
Messages: 189
Registered: July 2009
Location: Grenoble, France
Senior Member
Hi,

I think it's not possible.

Manu
http://manuelselva.wordpress.com


Re: Add SWT button to a GEF diagram [message #241183 is a reply to message #241161] Fri, 01 February 2008 13:32 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: juavizga.hotmail.com

It is possible to include SWT widgets in a canvas, since GEF the creates elements upon a canvas it should be also possible, isn't it?



Can somebody to help me or recommend me a solution to embed SWT widgets in a GEF diagram.



Thanks in advance
Re: Add SWT button to a GEF diagram [message #241342 is a reply to message #241183] Thu, 07 February 2008 14:48 Go to previous message
Eclipse UserFriend
Originally posted by: none.ibm.com

Try this for starters. Note that SWT controls are always on top of any
other figure, including handles, feedback, etc.

ControlProxy extends Figure {
....
ControlProxy(Control control) {
this.control = control;
}

public Dimension getPreferredSize(int wHint, int hHint) {
Point p = control.computeSize(wHint, hHint);
return new Dimension(p.x, p.y);
}

public void setBounds(Rectangle rect) {
super.setBounds(rect);
rect = rect.getCopy();
translateToAbsolute(rect);
control.setBounds(rect.x, rect.y, rect.width, rect.height);
}

}
Previous Topic:Model / Domain Relationship Question
Next Topic:Memory Leak
Goto Forum:
  


Current Time: Tue Apr 23 10:54:14 GMT 2024

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

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

Back to the top