Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Scaling & Scrolling
Scaling & Scrolling [message #208524] Sat, 04 February 2006 12:58 Go to next message
Eclipse UserFriend
Originally posted by: ebay.ievolve.com.au

Hi,

I've got a FigureCanvas containing a ScalableFreeformLayeredPane.

When I scale the ScalableFreeformLayeredPane and its children are no
longer fully visible, no scrollbars appear. How can I make the
scrollbars appear?

Thanks,
Sam



composite = new Composite(parent, SWT.BORDER);
composite.setLayout(new FillLayout());

canvas = new FigureCanvas(composite);

parentLayer = new ScalableFreeformLayeredPane();

parentLayer.setLayoutManager(new FreeformLayout());

RoundedRectangle test = new RoundedRectangle();
test.setBackgroundColor(ColorConstants.blue);
parentLayer.add(test);
parentLayer.setConstraint(test,new Rectangle(100,100,300,200));

canvas.setContents(parentLayer);
Re: Scaling & Scrolling (Scrollbars won't appear) [message #208685 is a reply to message #208524] Wed, 08 February 2006 05:49 Go to previous message
Eclipse UserFriend
Originally posted by: ebay.ievolve.com.au

Nobody has any ideas?

This seems like it should be pretty straight-forward.
There must be something simple I'm doing wrong.

To clarify, I'm using Draw2D.

When I scale the ScalableFreeformLayeredPane, the extents of its
children grow beyond that of the FigureCanvas.

However, this does not trigger the scrollbars to appear.

How can I make the scrollbars appear in this situation.

I experimented with adding an extentListener to the
ScalableFreeformLayeredPane, in which I tried to change the preferred
size of the FigureCanvas's viewport. I couldn't get this working.

Any advice is appreciated.

Thanks,
Sam


Sam wrote:
> Hi,
>
> I've got a FigureCanvas containing a ScalableFreeformLayeredPane.
>
> When I scale the ScalableFreeformLayeredPane and its children are no
> longer fully visible, no scrollbars appear. How can I make the
> scrollbars appear?
>
> Thanks,
> Sam
>
>
>
> composite = new Composite(parent, SWT.BORDER);
> composite.setLayout(new FillLayout());
>
> canvas = new FigureCanvas(composite);
>
> parentLayer = new ScalableFreeformLayeredPane();
>
> parentLayer.setLayoutManager(new FreeformLayout());
>
> RoundedRectangle test = new RoundedRectangle();
> test.setBackgroundColor(ColorConstants.blue);
> parentLayer.add(test);
> parentLayer.setConstraint(test,new Rectangle(100,100,300,200));
>
> canvas.setContents(parentLayer);
Previous Topic:TreeFigure
Next Topic:delete Node and Connections
Goto Forum:
  


Current Time: Fri Jan 17 05:00:38 GMT 2025

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

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

Back to the top