Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » GEF Layer Priorities
GEF Layer Priorities [message #180130] Tue, 03 May 2005 17:16 Go to next message
Eclipse UserFriend
Originally posted by: dnawrocki.prologic-inc.com

I'm having trouble determining what order each layer handled (ie,
painting, mouse/keyboard events, etc). What I need to do is have a set of
handles on an edit part that scale up or down with the zoom manager. It
makes the most sense to me to add my handles to the SCALABLE_LAYERS layer
so that I don't have to dynamically resize the handles on zoom changes.

Am I getting myself into trouble by directly adding handles to the
SCALABLE_LAYERS instead of the HANDLE_LAYER? If other
handles/figures/connections happened to be on top of my handle, will the
other handle/figure/connection grab mouse events?
Re: GEF Layer Priorities [message #180244 is a reply to message #180130] Tue, 03 May 2005 20:58 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

Why do you want handles to scale? Scalable_Layers is not a layer but a
group of layers. Only more layers should be added to it.

Usually, you want handles to be on top of everything else, or at least the
contents of diagram. Can you post more details?

"Dan Nawrocki" <dnawrocki@prologic-inc.com> wrote in message
news:767dd74db23310f34c4332c119ca453b$1@www.eclipse.org...
> I'm having trouble determining what order each layer handled (ie,
> painting, mouse/keyboard events, etc). What I need to do is have a set of
> handles on an edit part that scale up or down with the zoom manager. It
> makes the most sense to me to add my handles to the SCALABLE_LAYERS layer
> so that I don't have to dynamically resize the handles on zoom changes.
>
> Am I getting myself into trouble by directly adding handles to the
> SCALABLE_LAYERS instead of the HANDLE_LAYER? If other
> handles/figures/connections happened to be on top of my handle, will the
> other handle/figure/connection grab mouse events?
>
Re: GEF Layer Priorities [message #180339 is a reply to message #180244] Wed, 04 May 2005 13:59 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dnawrocki.prologic-inc.com

Randy Hudson wrote:

> Why do you want handles to scale? Scalable_Layers is not a layer but a
> group of layers. Only more layers should be added to it.

> Usually, you want handles to be on top of everything else, or at least the
> contents of diagram. Can you post more details?

Sure. I am trying to come up with a schematic editor (think Simulink). I
would like the user to be able to create connections by moving the mouse
over a block's input/ouput "port", clicking, and dragging to a new
location. When the user zooms in, the figure becomes bigger and I need
the area that can start a new connection to be bigger to compensate.

I've already implemented it and it seems to work OK. I tried adding the
handles to the primary layer but they seemed to be hidden behind the other
figures. Is there a way to specify the z-order of figures in a layer?
That should also give me the needed functionality.

BTW, I'm doing this so that I don't have a palette showing - my
application's usage doesn't justify the screen real estate for one.
Re: GEF Layer Priorities [message #180346 is a reply to message #180339] Wed, 04 May 2005 15:23 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

The palette can be made very small. You can display icons only, and not use
any drawers, just groups.

BTW, it is possible for the editpart's figure itself to be a handle, or to
contain handles.

"Dan Nawrocki" <dnawrocki@prologic-inc.com> wrote in message
news:e933052f5fe5510add19e3317d5e83b2$1@www.eclipse.org...
> Randy Hudson wrote:
>
>> Why do you want handles to scale? Scalable_Layers is not a layer but a
>> group of layers. Only more layers should be added to it.
>
>> Usually, you want handles to be on top of everything else, or at least
>> the contents of diagram. Can you post more details?
>
> Sure. I am trying to come up with a schematic editor (think Simulink). I
> would like the user to be able to create connections by moving the mouse
> over a block's input/ouput "port", clicking, and dragging to a new
> location. When the user zooms in, the figure becomes bigger and I need
> the area that can start a new connection to be bigger to compensate.
>
> I've already implemented it and it seems to work OK. I tried adding the
> handles to the primary layer but they seemed to be hidden behind the other
> figures. Is there a way to specify the z-order of figures in a layer?
> That should also give me the needed functionality.
>
> BTW, I'm doing this so that I don't have a palette showing - my
> application's usage doesn't justify the screen real estate for one.
>
Re: GEF Layer Priorities [message #180350 is a reply to message #180346] Wed, 04 May 2005 17:32 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dnawrocki.prologic-inc.com

Randy Hudson wrote:

> The palette can be made very small. You can display icons only, and not use
> any drawers, just groups.

Interesting...I didn't know this. May look into it in the future.

> BTW, it is possible for the editpart's figure itself to be a handle, or to
> contain handles.

That's the more correct solution I was looking for. The way I did it
before really felt hackish. Thanks!
Re: GEF Layer Priorities [message #180373 is a reply to message #180350] Wed, 04 May 2005 19:20 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

Hmm, maybe I spoke too soon. That bug has not been fixed, but is is
possible to override findHandleAt() in GraphicalViewerImpl (or subclass),
and get the behavior you want.

"Dan Nawrocki" <dnawrocki@prologic-inc.com> wrote in message
news:073ded9e78fbcd6377f8c73f63eeac60$1@www.eclipse.org...
> Randy Hudson wrote:
>
>> The palette can be made very small. You can display icons only, and not
>> use any drawers, just groups.
>
> Interesting...I didn't know this. May look into it in the future.
>
>> BTW, it is possible for the editpart's figure itself to be a handle, or
>> to contain handles.
>
> That's the more correct solution I was looking for. The way I did it
> before really felt hackish. Thanks!
>
>
Previous Topic:XSL-FO/tables in text flow/insets
Next Topic:Adding a graphicaleditorwithpalette to ViewerPane
Goto Forum:
  


Current Time: Sat Feb 04 03:42:23 GMT 2023

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

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

Back to the top