Skip to main content



      Home
Home » Eclipse Projects » GEF » How to use arrow key to adjust figure's position slightly
How to use arrow key to adjust figure's position slightly [message #175961] Thu, 07 April 2005 01:38 Go to next message
Eclipse UserFriend
Hi all,

When I use GEF's logic example, I found the figure only can moved by mouse.
If two figure connect by a connection, and I want to make the connection
horizontal, then I must move one figure many times to make this.
Is there a way to register some keys(arrow key), to adjust figure's
position slightly?
Just like Photoshop, can use mouse to move the figure position, and also
can use arrow key to move figure slightly.

Thanks
Re: How to use arrow key to adjust figure's position slightly [message #176031 is a reply to message #175961] Thu, 07 April 2005 10:25 Go to previous messageGo to next message
Eclipse UserFriend
GEF is completely accessible. Select an EditPart and hit '.' -- the
period/fullstop key.

"wei zhang" <zhang-wei@sinocom.cn> wrote in message
news:156c467415e028515422f96947821cab$1@www.eclipse.org...
> Hi all,
>
> When I use GEF's logic example, I found the figure only can moved by
mouse.
> If two figure connect by a connection, and I want to make the connection
> horizontal, then I must move one figure many times to make this.
> Is there a way to register some keys(arrow key), to adjust figure's
> position slightly?
> Just like Photoshop, can use mouse to move the figure position, and also
> can use arrow key to move figure slightly.
>
> Thanks
>
Re: How to use arrow key to adjust figure's position slightly [message #176115 is a reply to message #176031] Thu, 07 April 2005 22:05 Go to previous messageGo to next message
Eclipse UserFriend
Oh, I see.
Thanks a lot.

But I had another questions.

I found when I put a "Circuit" EditPart to "emptyModel1.logic",
and select this EditPart, then hit '.' key,
the period/fullstop key appeared.
The period/fullstop keys contain 8 resize keys(can resize EditPart)
and 1 move key(can move the EditPart's position).

But put a "Or Gate" EditPart to "emptyModel1.logic",
and do the same operation.
The period/fullstop keys only contain 5 move key.

Why different EditPart get different kinds of period/fullstop key?
Is there a way to disable the resize key from period/fullstop keys?
Re: How to use arrow key to adjust figure's position slightly [message #176190 is a reply to message #176115] Fri, 08 April 2005 11:17 Go to previous messageGo to next message
Eclipse UserFriend
Gates and LEDs can't be resized, hence the resize handles don't show up on
them. Look at ResizableEditPolicy.

"wei zhang" <zhang-wei@sinocom.cn> wrote in message
news:ce8e404bb00446bad5e9d0a2de4b0eca$1@www.eclipse.org...
> Oh, I see.
> Thanks a lot.
>
> But I had another questions.
>
> I found when I put a "Circuit" EditPart to "emptyModel1.logic",
> and select this EditPart, then hit '.' key,
> the period/fullstop key appeared.
> The period/fullstop keys contain 8 resize keys(can resize EditPart)
> and 1 move key(can move the EditPart's position).
>
> But put a "Or Gate" EditPart to "emptyModel1.logic",
> and do the same operation.
> The period/fullstop keys only contain 5 move key.
>
> Why different EditPart get different kinds of period/fullstop key?
> Is there a way to disable the resize key from period/fullstop keys?
>
>
Re: How to use arrow key to adjust figure's position slightly [message #176195 is a reply to message #176115] Fri, 08 April 2005 11:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

Yes, you can customize all of this using AccessibleHandleProvider interface
Gates are not resizable


"wei zhang" <zhang-wei@sinocom.cn> wrote in message
news:ce8e404bb00446bad5e9d0a2de4b0eca$1@www.eclipse.org...
> Oh, I see.
> Thanks a lot.
>
> But I had another questions.
> I found when I put a "Circuit" EditPart to "emptyModel1.logic", and select
> this EditPart, then hit '.' key, the period/fullstop key appeared. The
> period/fullstop keys contain 8 resize keys(can resize EditPart)
> and 1 move key(can move the EditPart's position).
>
> But put a "Or Gate" EditPart to "emptyModel1.logic", and do the same
> operation.
> The period/fullstop keys only contain 5 move key.
>
> Why different EditPart get different kinds of period/fullstop key?
> Is there a way to disable the resize key from period/fullstop keys?
>
>
Re: How to use arrow key to adjust figure's position slightly [message #176598 is a reply to message #176195] Sun, 10 April 2005 23:47 Go to previous message
Eclipse UserFriend
Thanks a lot

I also found just overwrite
XYLayoutEditPolicy#createChildEditPolicy(EditPart) will be disable resize
action.

code just like this
protected EditPolicy createChildEditPolicy(EditPart child) {
ResizableEditPolicy policy = new ResizableEditPolicy();
policy.setResizeDirections(0);
return policy;
}
Previous Topic:Anchor Problem or Router Problem??
Next Topic:Switch figure of a model
Goto Forum:
  


Current Time: Sun Jul 06 15:43:36 EDT 2025

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

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

Back to the top