|
Re: Deleting connections in the standalone GEF sample [message #188580 is a reply to message #188559] |
Thu, 21 July 2005 15:20 |
Eclipse User |
|
|
|
Originally posted by: ahn.iie.cnam.Fr
I must precise my request.
I know why my try to implement this deleting command doesn't work.
Indeed here my main class extends an ApplicationWindow and in this
application a part of it uses GEF and a CanvasModel to build a diagram.
But I use a ScrollingGraphicalviewer to receive all the commands. Thus I
ca only create nodes and connect them.
How could I implement deleting ( in fact how could i set keyHandlers ?)
You will find the beginning of my "CreateContents" method of my
ApplicationWindow.
Thanks
protected Control createContents(Composite parent)
{
Composite composite = new Composite(parent, SWT.BORDER);
composite.setLayout(new FormLayout());
parent.getShell().setText("OGEAR");
Composite arbre = new Composite(composite, SWT.BORDER | SWT.HORIZONTAL);
arbre.setLayout(new FillLayout());
viewer = new ScrollingGraphicalViewer();
viewer.setEditDomain(editDomain);
viewer.createControl(arbre);
viewer.setEditPartFactory(new MyEditPartFactory());
CanvasModel model = new CanvasModel();
viewer.setContents(model);
FormData formArbre= new FormData();
formArbre.top = new FormAttachment(0,10);
formArbre.left = new FormAttachment(0,10);
formArbre.right = new FormAttachment(100,-10);
formArbre.bottom = new FormAttachment(50,-10);
arbre.setLayoutData(formArbre);
...
|
|
|
Powered by
FUDForum. Page generated in 0.03313 seconds