FigureCanvas/Viewport size remains (0.0) when view is created [message #247590] |
Wed, 04 March 2009 06:42 |
vikas Messages: 10 Registered: July 2009 |
Junior Member |
|
|
Hi I have 2 views: Properties view and Diagram view. I want to display
certain figure and its property. When i start my Appliaction with Property
view on top and than move to Diagram view, diagram view is created (Canvas
of FigureCanvas type is created) and figure is not displayed initially as
viewPort/canvas/ composite size remains (0,0). Diagram selected after that
are displayed as canvas now has some size (width,height)... why diagram is
not displayed when view is created... and why viewport size remains (0,0)
initially.
I found that viewPort/canvas size is updated in setControl method of
LightWeightSystem class and also control listeners are there to listens
controlresized events.
What i am doing in createpartcontrol of my Diagram view
canvas = FigureCanvas(parent,style)
canvas.setViewPort(new viewport(true));
ls = new LightWeightSystem(canvas);
ls.setContents(canvas.getViewPort);
Is there anything missing.... How i can have value of viewport when view
is created itself instead of (0,0)
any pointers ???? I don't want to specify size explicitly (If i specify
size of canvas / Composite size, figure is drawn in Diagram view).... i
want to set size for canvas depending upon size available for Diagram
view.
|
|
|
Powered by
FUDForum. Page generated in 0.03207 seconds