Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Drag&Drop Palette elements in a grid
Drag&Drop Palette elements in a grid [message #630353] Fri, 01 October 2010 17:30 Go to next message
Elhamlaoui Mahmoud is currently offline Elhamlaoui MahmoudFriend
Messages: 268
Registered: March 2010
Senior Member
Hi,

Im new with gef and i wonder if there is a way so i can have a grid in my editor in wich i could place some elements from the palette,

Any ideas
thanks
Mahmoud
Re: Drag&Drop Palette elements in a grid [message #630408 is a reply to message #630353] Fri, 01 October 2010 22:57 Go to previous messageGo to next message
rex is currently offline rexFriend
Messages: 9
Registered: September 2010
Junior Member
What is the grid you are referring to?

If you are talking about a grid-layer as a background, the GEF already have it included (in either FreeformGraphicalRootEditPart or ScalableRootEditPart). You just need to activate it by setting a flag in your viewer.

in a subclass of GraphicalEditor:

    protected void configureGraphicalViewer () {
        ......
        viewer.setProperty (SnapToGrid.PROPERTY_GRID_VISIBLE, Boolean.TRUE);
        ......
    }
Re: Drag&Drop Palette elements in a grid [message #630859 is a reply to message #630408] Tue, 05 October 2010 11:20 Go to previous messageGo to next message
Elhamlaoui Mahmoud is currently offline Elhamlaoui MahmoudFriend
Messages: 268
Registered: March 2010
Senior Member
HI,
thanks for the reply, yes im talking about a grid layout as a background, i will try your solution

thanks
Mahmoud
Re: Drag&Drop Palette elements in a grid [message #630920 is a reply to message #630859] Tue, 05 October 2010 15:01 Go to previous messageGo to next message
Elhamlaoui Mahmoud is currently offline Elhamlaoui MahmoudFriend
Messages: 268
Registered: March 2010
Senior Member
Hi Rex,

ive tried your silution, but what i was expecting is a layoutgrid as container in which i could place element inside their cell Rolling Eyes

is there a way to do so?
Re: Drag&Drop Palette elements in a grid [message #634064 is a reply to message #630920] Wed, 20 October 2010 12:13 Go to previous message
Udo Walker is currently offline Udo WalkerFriend
Messages: 81
Registered: July 2009
Member
Am 05.10.2010 17:01, schrieb elhamlaoui:
> Hi Rex,
>
> ive tried your silution, but what i was expecting is a layoutgrid as
> container in which i could place element inside their cell :roll:
> is there a way to do so?

Just use org.eclipse.draw2d.GridLayout as your layout manager.

Regards
Udo
Previous Topic:mouse-selecting nodes
Next Topic:How to disable the hover controls in GMF generated code
Goto Forum:
  


Current Time: Thu Apr 25 22:35:13 GMT 2024

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

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

Back to the top