SnapToGrid, SnapToGeometry or .... [message #171208] |
Thu, 10 March 2005 13:36 |
Eclipse User |
|
|
|
Originally posted by: J_ML.netcabo.pt
Hi guys, i need some help here. I'am building an editor using GEF and a
SWT view that has nothing to do with my question. Everything is doing fine
except for one thing. Imagine i need to build a table just like an HTML
table (not in the swt view) and that the user is supposed to drag-n-drop
stuff into it. I need some kind of snap-to-*** to make the objects dragged
aply/expand over the "cols and rows". My problem is that i have no
documentation over SnapToGrid, SnapToGeometry or SnapToHelper.... What i
have is the reference that somehow seems quite confusing...
It would be a HUGE help for any comments from anyone... feel free to
propose other solutions...
(sorry about my english)
josé
|
|
|
|
Re: SnapToGrid, SnapToGeometry or .... [message #171242 is a reply to message #171219] |
Thu, 10 March 2005 16:32 |
Eclipse User |
|
|
|
Originally posted by: J_ML.netcabo.pt
Randy Hudson wrote:
> ""José"" <J_ML@netcabo.pt> wrote in message
> news:d0pihk$jto$1@www.eclipse.org...
>>
>> Hi guys, i need some help here. I'am building an editor using GEF and a
>> SWT view that has nothing to do with my question. Everything is doing fine
>> except for one thing. Imagine i need to build a table just like an HTML
>> table (not in the swt view) and that the user is supposed to drag-n-drop
>> stuff into it. I need some kind of snap-to-*** to make the objects dragged
>> aply/expand over the "cols and rows". My problem is that i have no
>> documentation over SnapToGrid, SnapToGeometry or SnapToHelper.... What i
>> have is the reference that somehow seems quite confusing...
> What do yo umean you have a reference? JavaDoc? SnapToHelper is pretty
> small API that can adapt to many situations, including table cell snapping.
hi again, i ment examples, samples or tutorials. Anyways, i found how to
understand SnapToHelper and i have some code working for now. But i have
another problem, imagine this:
Problem: I want to make the grid visible in a certain area (it can still
force snap outside the visual "grid", no prob with that) but i can seem to
ajust the size! i can resize the with and heith of the cells but clipping
doesnt seem to work... i've tryed the "size" atribbute.
How it is untill now: I have all the initialization on my editor class and
i've set the contents viewer.setContents(EditPartXXX). That EditPartXXX is
building a gridlayer on it's createfigure, were i have defined the cell
sizes (that work) and were i'am trying to clip the grid using SIZE but
it's not working.
This questions may seem simple.. i don't know, the problem is that i had
no contact with GEF until now and i'm supposed to learn and use it for
"yesterday".
Thanks for any answers, thanks Randy
|
|
|
Powered by
FUDForum. Page generated in 0.02833 seconds