Tables with draggable cell constraints [message #167735] |
Thu, 10 February 2005 09:45 |
Eclipse User |
|
|
|
Originally posted by: schedenig.marian.gft.com
I'm trying to create a table object in GEF. Users should be able to simply
draw a table in the editor, add columnds and rows and drag other elements
into the implicitly created table cells.
The basic system already works. I have a table model class which contains
table rows, which in turn contain table cells. Each of this three models
has a corresponding edit part and a figure. Rows are positioned vertically
inside a table using a custom layout manager similar to ToolbarLayout,
which gets the desired relative column dimensions from the table model.
Using the same mechanism, cells are positioned horizontally inside their
respective rows. Changing column widths and row heights dynamically
currently works by selecting a cell and changing a "virtual" property
which in turn affects the list of column/row dimensions stored in the
table model.
What I now need is the following: Users should be able to move the mouse
(e.g. the selection tool) over a horizontal or vertical line between two
rows or columns, and by clicking and dragging immediately resize the rows
or columns next to it. However, I'm not sure where to start. Would
creating a custom figure class for these "drag lines" and placing
instances of it in the connection layer be an adequate solution? Or is
there a way to get GEF's ruler system to do what I need?
Thanks in advance,
Marian.
|
|
|
Powered by
FUDForum. Page generated in 0.25200 seconds