Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » FigureCanvas/Viewport size remains (0.0) when view is created
FigureCanvas/Viewport size remains (0.0) when view is created [message #247590] Wed, 04 March 2009 06:42
vikas  is currently offline vikas Friend
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.
Previous Topic:Animation on PolylineConnection
Next Topic:Layout policy with non-resizeable children
Goto Forum:
  


Current Time: Wed Jul 17 18:29:51 GMT 2024

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

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

Back to the top