|
Re: "Folder" parts [message #192714 is a reply to message #192567] |
Mon, 22 August 2005 15:53 |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.03228 seconds