Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » expand/collapse the Container EditPart in "flow" example
expand/collapse the Container EditPart in "flow" example [message #176340] Sat, 09 April 2005 15:01 Go to next message
Eclipse UserFriend
Originally posted by: eric_guoyi.hotmail.com

Hello,
This is my case. I want to modify the "flow" example of GEF3.0 to implement
functions that can expand/collapse the StructuredActivityEditPart by
double-click or ContextMenu.
Here is my step:
1.add the attribute named "isExpand" on the StructuredActivity Model;
2.add the command "ControlUnfoldCommand" to control the model's attribute;
3.add the EditPolicy to get that command,then install that EditPolicy
mapping DIRECT_EDIT_ROLE;
How should I do next ?
Re: expand/collapse the Container EditPart in "flow" example [message #176424 is a reply to message #176340] Sun, 10 April 2005 16:31 Go to previous message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
Override performRequest() in your EditPart to launch the direct edit
manager. If you're not sure how to do this, look at our several examples or
just search this newsgroup.

Lastly, when your command changes the model, your EditPart will be notified
of this change. At that point, you'll have to update your figure to look
like it's expanded/collapsed.

"Eric Guo" <eric_guoyi@hotmail.com> wrote in message
news:d38ngn$g9$1@news.eclipse.org...
> Hello,
> This is my case. I want to modify the "flow" example of GEF3.0 to
implement
> functions that can expand/collapse the StructuredActivityEditPart by
> double-click or ContextMenu.
> Here is my step:
> 1.add the attribute named "isExpand" on the StructuredActivity Model;
> 2.add the command "ControlUnfoldCommand" to control the model's attribute;
> 3.add the EditPolicy to get that command,then install that EditPolicy
> mapping DIRECT_EDIT_ROLE;
> How should I do next ?
>
>
Previous Topic:PolygonDecoration: widget disposed
Next Topic:Anchor Problem or Router Problem??
Goto Forum:
  


Current Time: Fri Apr 19 22:58:27 GMT 2024

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

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

Back to the top