|
Re: Snap to grid on creation? [message #167772 is a reply to message #167764] |
Thu, 10 February 2005 20:29 |
Eclipse User |
|
|
|
Originally posted by: no.mail.please
You could add a layout editpolicy to the parent editpart and do the
stuff in createChangeConstraintCommand method.
I think this should work.
--
Arnaud
|
|
|
|
Re: Snap to grid on creation? [message #168223 is a reply to message #167800] |
Mon, 14 February 2005 16:47 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
Pratik, size-on-create snaps, but accepting the default size on create does
not snap.
"Pratik Shah" <ppshah@us.ibm.com> escreveu na mensagem
news:cuhhok$sr$1@www.eclipse.org...
> You should do this in CreationTool#updateTargetRequest(). Look at how
> DragEditPartsTracker#updateTargetRequest() does that.
>
> "Sean Neeley" <sean.neeley@dbcsoftware.com> wrote in message
> news:cug7lk$sds$1@www.eclipse.org...
>> I noticed in the logic example, that parts snap to the grid when they
>> are moved or resized. What changes would be involved to make it so
>> that new parts snap to the grid when they are dropped onto the figure
>> canvas? I can't figure out how to do this.
>>
>> - Sean
>
>
|
|
|
|
Re: Snap to grid on creation? [message #168450 is a reply to message #168397] |
Wed, 16 February 2005 04:43 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
You'll have to send that request through the SnapToHelper. See how other
tools work with that interface.
"Sean Neeley" <sean.neeley@dbcsoftware.com> escreveu na mensagem
news:cutjuk$sud$1@www.eclipse.org...
> So how do I do it? BTW, I'm not using a Palette. I add a part by
> listening for a mouse click on the figure canvas, then I instantiate my
> own CreateRequest and CreateCommand.
>
|
|
|
Powered by
FUDForum. Page generated in 0.03349 seconds