Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Best way to add Draw2d to a GraphicalEditorWithFlyoutPalette?
Best way to add Draw2d to a GraphicalEditorWithFlyoutPalette? [message #885915] Wed, 13 June 2012 21:24 Go to next message
Harald Mueller is currently offline Harald MuellerFriend
Messages: 3
Registered: June 2012
Junior Member
Hi everyone,

for an University project, I have to create a GraphicalEditor in GEF (it should display some grid-like Figure). I have to add numerous buttons to this Editor which have to change various properties in an underlying EMF model. What is the best way to add these buttons? I tested it with a class which extends ScrollingGraphicalViewer and adds the view to the left of the Editor (I'm using a Palette on the right side, with the content in the center). The problem is, the ScrollingGraphicalViewer takes half the size of the Editor view which isn't that great, so can I change the width of this ScrollingGraphicalViewer? Or is there a better way to add buttons to the Editor?

Thanks in advance.
Re: Best way to add Draw2d to a GraphicalEditorWithFlyoutPalette? [message #887289 is a reply to message #885915] Sat, 16 June 2012 10:45 Go to previous messageGo to next message
Jan Krakora is currently offline Jan KrakoraFriend
Messages: 477
Registered: December 2009
Location: Prague
Senior Member
Hi, why don't you put those buttons into the menu or toolbar?
Or if you really need them inside the editor area you have to change the editor layout in some way. Could you ScrollingGraphicalViewer implementation code here?
Re: Best way to add Draw2d to a GraphicalEditorWithFlyoutPalette? [message #887898 is a reply to message #885915] Sun, 17 June 2012 10:20 Go to previous messageGo to next message
Harald Mueller is currently offline Harald MuellerFriend
Messages: 3
Registered: June 2012
Junior Member
Hi Jan,

first of all, thanks for your answer! Yes, it would be best if I could add the buttons directly to the Editor area. The ScrollingGraphicalViewer was just a test implementation of mine, the code I wrote for it isn't really fancy or useful either (I basically just added a few Draw2d components to it for testing, that's it). Do you think it could work by adding a new LayeredPane to my ScalableRootEditPart on which I could add the buttons? Sorry if my questions sound a bit dumb or ignorant, but I'm only working with GEF for about a week and I'm currently learning it beside my usual studying schedule.

Thanks in advance
Re: Best way to add Draw2d to a GraphicalEditorWithFlyoutPalette? [message #888581 is a reply to message #887898] Mon, 18 June 2012 10:11 Go to previous messageGo to next message
Jan Krakora is currently offline Jan KrakoraFriend
Messages: 477
Registered: December 2009
Location: Prague
Senior Member
Yeah, I think the GEF is very hard to learn and even harder to understand Confused

It depends on your needs.

If you would like to have the buttons outside of the GEF editor, but still inside the EditoPart, you would have to change the EditorPart layout to get those buttons on the left side (in one column for example), then the GEF editor in the middle of the editor part end then the palette on the right side.

If you want the buttons inside the GEF editor, so they will be draw2d components, you can do that by adding a new layer in the root figure as you said.
Re: Best way to add Draw2d to a GraphicalEditorWithFlyoutPalette? [message #888936 is a reply to message #885915] Mon, 18 June 2012 20:09 Go to previous message
Harald Mueller is currently offline Harald MuellerFriend
Messages: 3
Registered: June 2012
Junior Member
Alright, I think I'll try it this way, then. If I encounter any problems, I might post here again.

Thanks again and greetings.
Previous Topic:Maximize Graph Width to View Width
Next Topic:Zest Bug - Small Nodes
Goto Forum:
  


Current Time: Tue Nov 25 00:52:03 GMT 2014

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

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