Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Collapseable contentPane of an edit part
Collapseable contentPane of an edit part [message #147499] Thu, 12 August 2004 10:30 Go to next message
Marion Schmid is currently offline Marion SchmidFriend
Messages: 35
Registered: July 2009
Member
Hello!

I want to develop a feature to collapse/expand the content pane (where the
child edit parts are located) of my edit parts.
I wonder how to implement this or if this feature is maybe already
available.

One possibility I was thinking about is to override the
AbstractGraphicalEditPart's addVisual(childEditPart, index).

protected void addChildVisual(EditPart childEditPart, int index) {
IFigure child = ((GraphicalEditPart)childEditPart).getFigure();
getContentPane().add(child, index);
}

and just add

child.setVisible(false)
and change the parent container's size to the mininum size

for the cases of collapsing.

Does anyone of you have a better idea to solve this?

Thanks and best regards,
Marion
Re: Collapseable contentPane of an edit part [message #147551 is a reply to message #147499] Thu, 12 August 2004 13:37 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

You could simply remove the contentspane from the editpart's mane figure,
assuming they are two different figures. You'll also have to make sure that
the children don't remain selected.

"Marion Schmid" <marion.schmid@sap.com> wrote in message
news:cffgnd$1b2$1@eclipse.org...
> Hello!
>
> I want to develop a feature to collapse/expand the content pane (where the
> child edit parts are located) of my edit parts.
> I wonder how to implement this or if this feature is maybe already
> available.
>
> One possibility I was thinking about is to override the
> AbstractGraphicalEditPart's addVisual(childEditPart, index).
>
> protected void addChildVisual(EditPart childEditPart, int index) {
> IFigure child = ((GraphicalEditPart)childEditPart).getFigure();
> getContentPane().add(child, index);
> }
>
> and just add
>
> child.setVisible(false)
> and change the parent container's size to the mininum size
>
> for the cases of collapsing.
>
> Does anyone of you have a better idea to solve this?
>
> Thanks and best regards,
> Marion
>
>
Previous Topic:open dialog on click on palette entry
Next Topic:about project path
Goto Forum:
  


Current Time: Fri Apr 26 14:03:34 GMT 2024

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

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

Back to the top