expand/collapse the Container EditPart in "flow" example [message #176340] |
Sat, 09 April 2005 11:01  |
Eclipse User |
|
|
|
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 12:31  |
Eclipse User |
|
|
|
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 ?
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03165 seconds