Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » "Folder" parts
"Folder" parts [message #192567] Fri, 19 August 2005 19:35 Go to next message
Alberto Ricart is currently offline Alberto RicartFriend
Messages: 33
Registered: July 2009
Member
Hello,

I am wondering what the correct approach for managing different visual
representations of a group.

My groups can be:

*) collapsed (icon with a label)
*) inline (a box containing other icons with labels or other groups)
*) expanded, where the entire graphical viewer only shows the contents
of the group.

I am wondering if the correct approach is to implement different figures
for the different states. So for example, the collapsed could simply be
a Label figure, the inline a FreeformLayer.

My questions are:

1) Should I be implementing different figures?
2) if so, do I simply replace the figures as the state changes:
getFigure().getParent().remove(getFigure())
setFigure(someNewFigure)

3) I am not quite sure how to handle the expanded group to take over the
viewer



Feedback appreciated.

Thanks,


/a
Re: "Folder" parts [message #192714 is a reply to message #192567] Mon, 22 August 2005 15:53 Go to previous message
Eclipse UserFriend
Originally posted by: none.unknown.com

"Alberto Ricart" <aricart@tibco.com> wrote in message
news:de5caf$380$1@news.eclipse.org...
> Hello,
>
> I am wondering what the correct approach for managing different visual
> representations of a group.
>
> My groups can be:
>
> *) collapsed (icon with a label)
> *) inline (a box containing other icons with labels or other groups)
> *) expanded, where the entire graphical viewer only shows the contents
> of the group.
>
> I am wondering if the correct approach is to implement different figures
> for the different states. So for example, the collapsed could simply be
> a Label figure, the inline a FreeformLayer.
>
> My questions are:
>
> 1) Should I be implementing different figures?
> 2) if so, do I simply replace the figures as the state changes:
> getFigure().getParent().remove(getFigure())
> setFigure(someNewFigure)

The palette (which is just another graphical viewer) does this. It has
drawers that can be collapsed and expanded. So you might want to study that
a bit as an example (see DrawerEditPart). As for the figures, if you can
avoid having separate figures, you should take that approach (this is what
the palette does). Otherwise, the easiest way is to have an empty
"container" figure with a stack layout as the figure that you return in your
getFigure() method. You can then place your real figure inside that figure
and replace it at will.

>
> 3) I am not quite sure how to handle the expanded group to take over the
> viewer
>
>
>
> Feedback appreciated.
>
> Thanks,
>
>
> /a
Previous Topic:One ToggleGridAction for several GraphicalViewers
Next Topic:Synch 2 scolling viewer set on composite
Goto Forum:
  


Current Time: Fri Jan 24 04:51:07 GMT 2025

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

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

Back to the top