Scrolling in a view [message #169957] |
Mon, 28 February 2005 10:49  |
Eclipse User |
|
|
|
Originally posted by: robbiec.gmail.com
i have created a diagram, similar to the uml diagram editor in draw2d
outlined in the articles section. instead of
LightweightSystem lws = new LightweightSystem(shell);
i use a canvas
LightweightSystem lws = new LightweightSystem(canvas);
i wish ti enable scrolling on this canvas, but cannot get it working
for all other examples of scroll bars they redraw the Image as needed
can i save the canvas as an image, of is there an easy way to redraw the
draw2d image as needed during scrolling
any help is appreciated
|
|
|
Re: Scrolling in a view [message #170552 is a reply to message #169957] |
Sat, 05 March 2005 06:26  |
Eclipse User |
|
|
|
Did you use the SWT.H_SCROLL and SWT.V_SCROLL style bits when creating the
canvas? Or you can just use a FigureCanvas.
As for painting onto an Image, just create an SWTGraphics obj for an image
and pass it to the figure's paint method. Search this newsgroup for more
details on how to do that. If you want to paint the Canvas itself, try the
SWT newsgroup. I am not sure if it's possible. Maybe by adding a
PaintListener.
"rob" <robbiec@gmail.com> wrote in message
news:cvvei8$a76$1@www.eclipse.org...
> i have created a diagram, similar to the uml diagram editor in draw2d
> outlined in the articles section. instead of
> LightweightSystem lws = new LightweightSystem(shell);
> i use a canvas
> LightweightSystem lws = new LightweightSystem(canvas);
> i wish ti enable scrolling on this canvas, but cannot get it working
> for all other examples of scroll bars they redraw the Image as needed
> can i save the canvas as an image, of is there an easy way to redraw the
> draw2d image as needed during scrolling
> any help is appreciated
>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03914 seconds