Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » autoscrolling support?
autoscrolling support? [message #183711] Tue, 07 June 2005 05:43 Go to next message
Eclipse UserFriend
Originally posted by: clmind.yahoo.com

Is there currently any support for controlling autoscrolling?

I am using an extension of GraphicalEditorWithFlyoutPalette that has a bunch
of parts and associated figures, and am looking for a way to autoscroll the
window if I drag a figure near the edge of the view. Imagine something like
dragging some cells around in Excel - as you get near the edge, the
spreadsheet starts to scroll in that direction...

Also, is there a way to disable the mousewheel while dragging an object? It
seems that when scrolling using the mouse wheel and dragging an object, the
coordinates don't update as expected (ie: if I start dragging something and
scroll down with the mouse wheel, the figure I'm dragging is still relative
to the same co-ordinates it was, and the mouse pointer is now way off from
the object, effectively making the scrolling more harmful than helpful in
placing the object further down.

Any help on this at all would be appreciated. Thanks!

Christine
Re: autoscrolling support? [message #183758 is a reply to message #183711] Tue, 07 June 2005 14:51 Go to previous messageGo to next message
Hao Zhang is currently offline Hao ZhangFriend
Messages: 161
Registered: July 2009
Senior Member
Christine:
Try using ViewportAutoexposeHelper as an adapter for your rootEditPart, like
this:

getGraphicalViewer().setRootEditPart(new ScalableRootEditPart() {
public Object getAdapter(Class key) {
if (key == AutoexposeHelper.class)
return new ViewportAutoexposeHelper(this);
return super.getAdapter(key);
}
});


Hao

"Christine Lee" <clmind@yahoo.com> д
Re: autoscrolling support? [message #183838 is a reply to message #183758] Wed, 08 June 2005 01:18 Go to previous message
Eclipse UserFriend
Originally posted by: none.unknown.com

ScalableFreeformRootEditPart already does that. ScalableRootEditPart should
be doing the same. Open a bug report.

"Hao Zhang" <bjzhanghao@21cn.com> wrote in message
news:d84crp$3ij$1@news.eclipse.org...
> Christine:
> Try using ViewportAutoexposeHelper as an adapter for your rootEditPart,
like
> this:
>
> getGraphicalViewer().setRootEditPart(new ScalableRootEditPart() {
> public Object getAdapter(Class key) {
> if (key == AutoexposeHelper.class)
> return new ViewportAutoexposeHelper(this);
> return super.getAdapter(key);
> }
> });
>
>
> Hao
>
> "Christine Lee" <clmind@yahoo.com> д
Previous Topic:Moving models with arrow keys
Next Topic:double click selection competing with single click selection
Goto Forum:
  


Current Time: Sat Apr 27 02:58:39 GMT 2024

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

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

Back to the top