Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Deleting connections in the standalone GEF sample
Deleting connections in the standalone GEF sample [message #188559] Thu, 21 July 2005 14:36 Go to next message
Eclipse UserFriend
Originally posted by: ahn.iie.cnam.Fr

Hello,

I am trying to reuse this sample for my work :

http://www13.plala.or.jp/observe/GEF/GEF_Tool_StandAlone.htm l

You may have see this Japanese page if you tried to make your own GEF
standalone application.

The source is here :
http://www13.plala.or.jp/observe/GEF/standGEFToolExample.zip

I am trying to implement the deleting command (and also the connection
deleting command); Could someone help me if he managed to ? It must be
possible since on the same page (http://www13.plala.or.jp/observe/GEF/)
, there is a tutorial showing the Hello_World plug in application where
the deleting command is implemented.

Thanks !
Re: Deleting connections in the standalone GEF sample [message #188580 is a reply to message #188559] Thu, 21 July 2005 15:20 Go to previous message
Eclipse UserFriend
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);

...
Previous Topic:Gradient
Next Topic:scripting an editor in a JUnit test
Goto Forum:
  


Current Time: Mon Dec 02 20:26:40 GMT 2024

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

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

Back to the top