Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » auto-scrolling while DnD with ScalableRootEditPart
auto-scrolling while DnD with ScalableRootEditPart [message #161085] Thu, 09 December 2004 11:02 Go to next message
Eclipse UserFriend
Originally posted by: rdenk.ftisoft.at

Hi,

I am using a viewer of type ScrollinGraphicalViewer with a root edit part of
type ScalableRootEditPart. Now, i would like to have the same
'auto-scrolling' functionality while DnD as it is supported when using a
ScalableFreeformRootEditPart (when mouse is near viewer's borders, the pane
should scroll automatically).
Is there any way to achive this also with type ScalableRootEditPart or will
i have to implement this on my own (if so, what would be the best way to do
this)?

Thanks,
rde
p.s.: i do not want to use a ScalableFreeformRootEditPart as i do not edit
free formable content
Re: auto-scrolling while DnD with ScalableRootEditPart [message #161110 is a reply to message #161085] Thu, 09 December 2004 15:20 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

I don't see the difference between these two roots. Abstract drop listener
will look for an auto expose helper on hover. This should be working in the
logic example.

"rdenk" <rdenk@ftisoft.at> wrote in message
news:cp9bcc$vt$1@www.eclipse.org...
> Hi,
>
> I am using a viewer of type ScrollinGraphicalViewer with a root edit part
of
> type ScalableRootEditPart. Now, i would like to have the same
> 'auto-scrolling' functionality while DnD as it is supported when using a
> ScalableFreeformRootEditPart (when mouse is near viewer's borders, the
pane
> should scroll automatically).
> Is there any way to achive this also with type ScalableRootEditPart or
will
> i have to implement this on my own (if so, what would be the best way to
do
> this)?
>
> Thanks,
> rde
> p.s.: i do not want to use a ScalableFreeformRootEditPart as i do not edit
> free formable content
>
>
Re: auto-scrolling while DnD with ScalableRootEditPart [message #161222 is a reply to message #161110] Fri, 10 December 2004 10:00 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rdenk.ftisoft.at

In the logic editor example, of course it works, because they are using a
root edit part of type ScalableFreeformRootEditPart. But as far as i could
find out, a ScalableRootEditPart (which i would like to use) does not
support this auot-scrolling behaviour. This is also what they say in ibm
redbook sg246302, chapter 4.1.1 Root Edit Part
(http://www.redbooks.ibm.com/redbooks/pdfs/sg246302.pdf). You can see the
difference by having a look at the Flow Editor example; there they are using
a ScalableRootEditPart!

Wo what i would like to achieve is the scrolling behaviour of a freeform
root edit part, but WITHOUT the auto-expose behaviour (editor should not
expose unlimited in all directions).

any idea how to solve this?


"Randy Hudson" <none@us.ibm.com> wrote in message
news:cp9qgl$j6q$1@www.eclipse.org...
> I don't see the difference between these two roots. Abstract drop
listener
> will look for an auto expose helper on hover. This should be working in
the
> logic example.
>
> "rdenk" <rdenk@ftisoft.at> wrote in message
> news:cp9bcc$vt$1@www.eclipse.org...
> > Hi,
> >
> > I am using a viewer of type ScrollinGraphicalViewer with a root edit
part
> of
> > type ScalableRootEditPart. Now, i would like to have the same
> > 'auto-scrolling' functionality while DnD as it is supported when using a
> > ScalableFreeformRootEditPart (when mouse is near viewer's borders, the
> pane
> > should scroll automatically).
> > Is there any way to achive this also with type ScalableRootEditPart or
> will
> > i have to implement this on my own (if so, what would be the best way to
> do
> > this)?
> >
> > Thanks,
> > rde
> > p.s.: i do not want to use a ScalableFreeformRootEditPart as i do not
edit
> > free formable content
> >
> >
>
>
Re: auto-scrolling while DnD with ScalableRootEditPart [message #161229 is a reply to message #161222] Fri, 10 December 2004 12:45 Go to previous messageGo to next message
Gunnar Wagenknecht is currently offline Gunnar WagenknechtFriend
Messages: 486
Registered: July 2009
Location: San Francisco ✈ Germany
Senior Member

rdenk schrieb:
> In the logic editor example, of course it works, because they are using a
> root edit part of type ScalableFreeformRootEditPart. But as far as i could
> find out, a ScalableRootEditPart (which i would like to use) does not
> support this auot-scrolling behaviour. This is also what they say in ibm
> redbook sg246302, chapter 4.1.1 Root Edit Part
> (http://www.redbooks.ibm.com/redbooks/pdfs/sg246302.pdf). You can see the
> difference by having a look at the Flow Editor example; there they are using
> a ScalableRootEditPart!

Just create your own subclass overwriting "getAdapter"

public Object getAdapter(Class adapter) {
if (adapter == AutoexposeHelper.class)
return new ViewportAutoexposeHelper(this);
return super.getAdapter(adapter);
}

You can create your own ViewportAutoexposeHelper if necessary.

Cu, Gunnar
Re: auto-scrolling while DnD with ScalableRootEditPart [message #161235 is a reply to message #161229] Fri, 10 December 2004 14:30 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rdenk.ftisoft.at

created subclass from ScalableRootEditPart which implemented getAdapter()
method as mentioned, and it worked fine!

Thanks a lot!!!


"Gunnar Wagenknecht" <gunnar@wagenknecht.org> wrote in message
news:cpc5oe$fl9$1@www.eclipse.org...
> rdenk schrieb:
> > In the logic editor example, of course it works, because they are using
a
> > root edit part of type ScalableFreeformRootEditPart. But as far as i
could
> > find out, a ScalableRootEditPart (which i would like to use) does not
> > support this auot-scrolling behaviour. This is also what they say in ibm
> > redbook sg246302, chapter 4.1.1 Root Edit Part
> > (http://www.redbooks.ibm.com/redbooks/pdfs/sg246302.pdf). You can see
the
> > difference by having a look at the Flow Editor example; there they are
using
> > a ScalableRootEditPart!
>
> Just create your own subclass overwriting "getAdapter"
>
> public Object getAdapter(Class adapter) {
> if (adapter == AutoexposeHelper.class)
> return new ViewportAutoexposeHelper(this);
> return super.getAdapter(adapter);
> }
>
> You can create your own ViewportAutoexposeHelper if necessary.
>
> Cu, Gunnar
Re: auto-scrolling while DnD with ScalableRootEditPart [message #161380 is a reply to message #161235] Mon, 13 December 2004 16:21 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

FreeformRootEditPart must replace the viewers Viewport to support freeform
function. The other root doesn't do this, so I guess that's why it doesn't
implement getAdapter...

The viewer should be involved similar to how reveal works. Open a bugzilla
so subclassing isn't required.

"rdenk" <rdenk@ftisoft.at> wrote in message
news:cpcbv3$4e4$1@www.eclipse.org...
> created subclass from ScalableRootEditPart which implemented getAdapter()
> method as mentioned, and it worked fine!
>
> Thanks a lot!!!
>
>
> "Gunnar Wagenknecht" <gunnar@wagenknecht.org> wrote in message
> news:cpc5oe$fl9$1@www.eclipse.org...
> > rdenk schrieb:
> > > In the logic editor example, of course it works, because they are
using
> a
> > > root edit part of type ScalableFreeformRootEditPart. But as far as i
> could
> > > find out, a ScalableRootEditPart (which i would like to use) does not
> > > support this auot-scrolling behaviour. This is also what they say in
ibm
> > > redbook sg246302, chapter 4.1.1 Root Edit Part
> > > (http://www.redbooks.ibm.com/redbooks/pdfs/sg246302.pdf). You can see
> the
> > > difference by having a look at the Flow Editor example; there they are
> using
> > > a ScalableRootEditPart!
> >
> > Just create your own subclass overwriting "getAdapter"
> >
> > public Object getAdapter(Class adapter) {
> > if (adapter == AutoexposeHelper.class)
> > return new ViewportAutoexposeHelper(this);
> > return super.getAdapter(adapter);
> > }
> >
> > You can create your own ViewportAutoexposeHelper if necessary.
> >
> > Cu, Gunnar
>
>
Previous Topic:Automating Nightly Builds with PDE Build
Next Topic:GEF example without files
Goto Forum:
  


Current Time: Thu Mar 28 15:51:22 GMT 2024

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

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

Back to the top