collapsing a figure [message #195246] |
Thu, 08 September 2005 16:30  |
Eclipse User |
|
|
|
Originally posted by: pbeagan.yahoo_dontspamme_.com
I want to implement windowshades like functionality in my editor, that is ,
have a toggle that lets me collapse or expand the figure. I am
accomplishing this by returning an empty list in the figure's
getModelChildren() depending on a setting in the model.
I want to have an expand/collapse Label on the figure which the user would
click on to trigger this. I added a MouseListener to the Label and can
capture the mouse down event. How do I determine which EditPart is being
clicked? Figures don't know about EditParts. Am I going about this the
wrong way?
|
|
|
|
|
|
|
Re: collapsing a figure [message #195440 is a reply to message #195396] |
Fri, 09 September 2005 14:31  |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
The only difficulty in figure collapse is that editparts aren't very smart
about their figures being hidden, and they may remain selected even though
the figure is clipped or hidden.
It's still MVC, the view is displaying a toggle button, which flips a bit in
the controller, which owns the view, so it can do whatever it wants. Some
applications may save expansion state in the model, but without the use of a
command, or at least without dirtying the command stack.
"Sapna George" <sgeorge@vt.edu> wrote in message
news:2f9762d57d542d5b47d6ef0f1d6dd593$1@www.eclipse.org...
> Hmmm... But, wouldn't that be a violation of MVC? Shouldn't the view be
> responsible for displaying the figures whichever way it wants and the
> Controller be responsible for creation of the View and passing on the
> appropriate 'data'?
|
|
|
Powered by
FUDForum. Page generated in 0.05670 seconds