auto-scrolling while DnD with ScalableRootEditPart [message #161085] |
Thu, 09 December 2004 06:02  |
Eclipse User |
|
|
|
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 #161222 is a reply to message #161110] |
Fri, 10 December 2004 05:00   |
Eclipse User |
|
|
|
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 #161380 is a reply to message #161235] |
Mon, 13 December 2004 11:21  |
Eclipse User |
|
|
|
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
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.04254 seconds