Skip to main content



      Home
Home » Eclipse Projects » GEF » Scrolling in a view
Scrolling in a view [message #169957] Mon, 28 February 2005 10:49 Go to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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
>
>
>
Previous Topic:Figure toggle not receiving selected/button down events
Next Topic:GEF in a view?
Goto Forum:
  


Current Time: Mon Jun 02 16:12:12 EDT 2025

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

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

Back to the top