Skip to main content



      Home
Home » Eclipse Projects » GEF » PaletteViewerKeyHandler
PaletteViewerKeyHandler [message #101610] Wed, 22 October 2003 16:46 Go to next message
Eclipse UserFriend
Hello,

If you have the following palette entries in a palette viewer:

Group1
+ Group2
+ Item1
+ Item2
+ Group3
+ Item3
+ Item4
Drawer1
+ Item5

And the focus is currently on Item4 and you press "down" key to go to
Drawer1, it will won't. Any ideas?

Thanks,
Maged Elaasar
Re: PaletteViewerKeyHandler [message #101710 is a reply to message #101610] Thu, 23 October 2003 09:56 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

Groups are not intended to be nested inside each other. I know this isn't
exactly restricted in the API, but the intention is that there always be 3
levels (counting the PaletteRoot as the first). Your model has 4 levels.
They KeyHandler doesn't expect this.

To fix this, you must do either:

Group1
+ Item1
+ Item2
+ ----Separator----
+ Item3
+ Item4

OR:

Group2
+ Item1
+ Item2
Group3
+ Item3
+ Item4


"Maged Elaasar" <melaasar@ca.ibm.com> wrote in message
news:bn6q9g$s8n$1@eclipse.org...
> Hello,
>
> If you have the following palette entries in a palette viewer:
>
> Group1
> + Group2
> + Item1
> + Item2
> + Group3
> + Item3
> + Item4
> Drawer1
> + Item5
>
> And the focus is currently on Item4 and you press "down" key to go to
> Drawer1, it will won't. Any ideas?
>
> Thanks,
> Maged Elaasar
>
>
Re: PaletteViewerKeyHandler [message #101723 is a reply to message #101610] Thu, 23 October 2003 10:05 Go to previous message
Eclipse UserFriend
More Info:

By looking at this method from PaletteViewerKeyHandler:

List getNavigationSiblings() {

ArrayList siblingsList = new ArrayList();

if (getFocus().getParent() instanceof GroupEditPart)

buildNavigationList( getFocus().getParent().getParent(),
getFocus().getParent().getParent(), siblingsList);

else

buildNavigationList(getFocus().getParent(), getFocus().getParent(),
siblingsList);

return siblingsList;

}

You will notice that in case the parent was a group, the navigation
sibliings were built starting from "2" levels up in the hierarchy. In the
LogicDesign example, that would return the SliderPaletteEditPart (and
therefore Drawer1 will be among the siblings), but in my case that returns
Group1 (which means Drawer1 will not be among the siblings).

I appreciate any feedback on this and if I should be logging a Bugzilla..

Maged


"Maged Elaasar" <melaasar@ca.ibm.com> wrote in message
news:bn6q9g$s8n$1@eclipse.org...
> Hello,
>
> If you have the following palette entries in a palette viewer:
>
> Group1
> + Group2
> + Item1
> + Item2
> + Group3
> + Item3
> + Item4
> Drawer1
> + Item5
>
> And the focus is currently on Item4 and you press "down" key to go to
> Drawer1, it will won't. Any ideas?
>
> Thanks,
> Maged Elaasar
>
>
Previous Topic:Associating label and connection EditParts
Next Topic:newbie question
Goto Forum:
  


Current Time: Thu Jul 17 19:58:52 EDT 2025

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

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

Back to the top