Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » How to gain gridlayout like functionality
How to gain gridlayout like functionality [message #92965] Mon, 08 September 2003 14:29 Go to next message
Eclipse UserFriend
Originally posted by: anders.soderman.home.se

Hi
I am trying to make it possible to add children to a parent container in a
gridlayout type of style.
The parent container should have rows and columns which makes a coordinate
system so if for example
we have rows=2 columns = 2 the figure should look like this

---------------------
| 0,0 | 0,1 |
|---------------------
| 1,0 | 1,1 |
---------------------

When you drag a palette item and drop it on e.g 1,0 that square should size
if needed and
the model should be able to know where it was dropped.

This is almost like a flowlayout with one more dimension.

What is the preferred way of designing this behaviour. I would prefer a
solution that affects the model the least
since this is a presentaion thing. I have tried going the editpart way but
it seems to me that it shouldn't have to be this complicated.

Thanks Anders
Re: How to gain gridlayout like functionality [message #93334 is a reply to message #92965] Wed, 10 September 2003 14:25 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

To do this, you need to write your own draw2d layoutmanager, and GEF
constrainedLayoutEditPolicy which interpret's drop locations and generates
the right commands for placing the objects in the corresponding row/column.
You also need to store the row/column data in your model somewhere.

"Anders S
Previous Topic:GEF Articles
Next Topic:A question for GEF developer: GEF and pure java?
Goto Forum:
  


Current Time: Sat Jul 27 17:18:13 GMT 2024

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

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

Back to the top