Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Problems with scrolling
Problems with scrolling [message #238322] Wed, 05 September 2007 11:29 Go to next message
Eclipse User
Originally posted by: abraham8331.gmail.com

Hi

I'm developing a flowchart diagram using draw2d.

I wish to make the view scrollable.The scrollbars are appearing on my window.But when scrolling, it will scroll only a few pixels though my figure is larger than that.

This is the code I am using :


Display display = new Display();

Shell shell=new Shell();
shell.open();
shell.setText("FlowDiagram");

LightweightSystem lws = new LightweightSystem(shell);

ScrollPane scrollpane = new ScrollPane();
scrollpane.setBounds(new Rectangle(90,90,310,300));

final Figure view = new Figure();
scrollpane.setLayoutManager(new ScrollPaneLayout());
Figure simulationFigure = new Figure();

Adding all the figures.....
simulationFigure.add(...);

scrollpane.setContents(simulationFigure);

lws.setContents(scrollpane);



Have anyone got an idea about that.

Please help....

Thanks
Abraham
Re: Problems with scrolling [message #238394 is a reply to message #238322] Sat, 08 September 2007 11:11 Go to previous messageGo to next message
René is currently offline René
Messages: 45
Registered: July 2009
Member
which layout manager do you use? you also use a gef editor or just draw2d?


Regards
René


Abraham wrote:
> Hi
>
> I'm developing a flowchart diagram using draw2d.
>
> I wish to make the view scrollable.The scrollbars are appearing on my window.But when scrolling, it will scroll only a few pixels though my figure is larger than that.
>
> This is the code I am using :
>
>
> Display display = new Display();
>
> Shell shell=new Shell();
> shell.open();
> shell.setText("FlowDiagram");
>
> LightweightSystem lws = new LightweightSystem(shell);
>
> ScrollPane scrollpane = new ScrollPane();
> scrollpane.setBounds(new Rectangle(90,90,310,300));
>
> final Figure view = new Figure();
> scrollpane.setLayoutManager(new ScrollPaneLayout());
> Figure simulationFigure = new Figure();
>
> Adding all the figures.....
> simulationFigure.add(...);
>
> scrollpane.setContents(simulationFigure);
>
> lws.setContents(scrollpane);
>
>
>
> Have anyone got an idea about that.
>
> Please help....
>
> Thanks
> Abraham
Re: Problems with scrolling [message #238411 is a reply to message #238322] Mon, 10 September 2007 05:38 Go to previous messageGo to next message
Eclipse User
Originally posted by: abraham8331.gmail.com

Hi

I'm using draw2d now.I may migrate to gef later.

Thanks
Abraham
Re: Problems with scrolling [message #238416 is a reply to message #238411] Mon, 10 September 2007 05:40 Go to previous messageGo to next message
Eclipse User
Originally posted by: abraham8331.gmail.com

Hi


I'm not using any layoutmanager now.


Thanks
Abraham
Re: Problems with scrolling [message #238425 is a reply to message #238322] Mon, 10 September 2007 05:52 Go to previous message
Eclipse User
Originally posted by: puneet82sri.sify.com

simulationFigure.add(...);

i hope you are using add(Ifigure fig, Rectangle rec) method to add the figures.
and set bounds to each figure you add.
Hope this all helps you.
Previous Topic:saving figure into file
Next Topic:How to get Graphics object in Draw2d?
Goto Forum:
  


Current Time: Wed Oct 22 23:14:35 GMT 2014

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

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