Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 05:38 Go to next message
zhang wei is currently offline zhang weiFriend
Messages: 84
Registered: July 2009
Member
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 14:25 Go to previous messageGo to next message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
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] Fri, 08 April 2005 02:05 Go to previous messageGo to next message
zhang wei is currently offline zhang weiFriend
Messages: 84
Registered: July 2009
Member
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 15:17 Go to previous messageGo to next message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
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 15: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] Mon, 11 April 2005 03:47 Go to previous message
zhang wei is currently offline zhang weiFriend
Messages: 84
Registered: July 2009
Member
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: Wed Feb 08 08:36:13 GMT 2023

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

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

Back to the top