Add min/max handle to node with compartment [message #150847] |
Fri, 14 September 2007 18:11 |
Eclipse User |
|
|
|
Originally posted by: arvinder.birdi.ca.com
We have nested diagram nodes with compartments. Im trying to create a
minimize/maximize handle for our diagram nodes. The effect should be just
like the user manually expanded the top level shape with the compartment
and stretched it to fill the visible canvas area. I would really
appreciate it if someone could guide me in the right direction.
1) Should I add the handle to the top level node which inherits from
ShapeNodeEditPart or should I add the handle to the compartment which
inherits from ShapeCompartmentEditPart. The compartment also has a
CompartmentCollapseHandle.
2) Can I reuse certain EditPolicies like ResizeableEditPolicy or
ResizableCompartmentEditPolicy with the PRIMARY_DRAG_ROLE?
3) If I dont want the min/max state to be persisted does it make it any
easier? Im assuming the location and size info are stored in SizeImpl and
LocationImpl notational model objects. Should I add a model object called
minimized to keep track of the state?
4) Would it be easier to add a decorator and make this a style instead? To
me the handles seem to be easy enough. The hard part is the rest of it.
5) Is there a way to determine the size of the viewable canvas?
Thanks in advance,
-Arvinder Birdi
|
|
|
|
Re: Add min/max handle to node with compartment [message #151972 is a reply to message #150848] |
Fri, 21 September 2007 19:29 |
Eclipse User |
|
|
|
Originally posted by: arvinder.birdi.ca.com
Thanks for your reply. You have a good point. My team wants to bale able
to add more functionality in the future and this maximize is viewed as a
stepping stone!
I found out where the expand/collapse figure logic lives:
org.eclipse.gmf.runtime.draw2d.ui.internal.figures
AnimatableScrollPane.getPreferredSize(int wHint, int hHint)
-Arvinder
|
|
|
Re: Add min/max handle to node with compartment [message #152032 is a reply to message #151972] |
Mon, 24 September 2007 10:23 |
Eclipse User |
|
|
|
Originally posted by: sandip.sahoo1980.gmail.com
Hi Arvinder,
But I want to change the triangle figure which handles the collapse and
expand of the compartment,
instead of that I need to put max and min images so that it will look good
and also on the top right of the compartment.
Would you plz reflect on the above?
Regards
Sandip
"Arvinder Birdi" <arvinder.birdi@ca.com> wrote in message
news:a84f94db7c3e3cbdfccb435e81ada534$1@www.eclipse.org...
> Thanks for your reply. You have a good point. My team wants to bale able
> to add more functionality in the future and this maximize is viewed as a
> stepping stone!
>
> I found out where the expand/collapse figure logic lives:
> org.eclipse.gmf.runtime.draw2d.ui.internal.figures
> AnimatableScrollPane.getPreferredSize(int wHint, int hHint)
> -Arvinder
>
>
>
|
|
|
Re: Add min/max handle to node with compartment [message #152159 is a reply to message #152032] |
Tue, 25 September 2007 15:54 |
Eclipse User |
|
|
|
Originally posted by: arvinder.birdi.ca.com
To add Min/Max icons look at:
org.eclipse.gmf.runtime.diagram.ui.internal.figures.Collapse Figure.fillShape()
You also have to create your own CollapseHandle.
I had many side effects when I tried to add the handle to a compartment.
I'll try and add it to the outer node.
-Arvinder
|
|
|
Powered by
FUDForum. Page generated in 0.03018 seconds