|
|
|
|
|
Re: Adding marquee selection to SelectionTool [message #156491 is a reply to message #156475] |
Mon, 01 November 2004 19:50 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: none.us.ibm.com
It sounds like you are attempting to drag your contents editpart. You
should return NULL or the marquee drag tracker in your getDragTracker(req)
method. See LogicDiagramEditPart for an example.
"Cameron Bateman" <cbateman@rim.com> wrote in message
news:cm61bk$h3i$1@eclipse.org...
> Hi Pratik,
>
> Thanks for your response. I am adding the PanningSelectionToolEntry as
> you say, but when I try to click and drag on my canvass with the tool, it
> just sets the "invalid mode" mouse pointer (circle with a cross through
> it) as though a request is being rejected.
>
> Is it possible that I'm inadvertently overriding the default behaviour?
> The marquee tool _does_ work. The code that creates the pallette entries
> looks like this:
>
> ..
> _paletteRoot = new PaletteRoot();
>
> // group the default controls
> PaletteGroup controls = new PaletteGroup("Controls");
>
> // selection tool
> PanningSelectionToolEntry toolEntry = new PanningSelectionToolEntry();
> controls.add(toolEntry);
> _paletteRoot.setDefaultEntry(toolEntry);
>
> // Marquee (group selection) tool
> controls.add(new MarqueeToolEntry());
>
> _paletteRoot.add(controls);
>
>
> --Cam
>
> Pratik Shah wrote:
>
> > The default behaviour already does that. All you need to do is add a
> > PanningSelectionToolEntry to your palette.
>
> > "Cameron Bateman" <cbateman@rim.com> wrote in message
> > news:cm5ric$6iu$1@eclipse.org...
> > > Does anyone have an idea this?
> > >
> > > Thanks,
> > >
> > > Cameron
> > >
> > > Cameron Bateman wrote:
> > >
> > > > Greetings,
> > >
> > > > I have noticed that the Selection tool used in the logic example
also
> > > > carries "Marquee" drag functionality when you click and drag on a
> > canvas.
> > > > However, the default behaviour doesn't seem to do this. How would I
add
> > > > this? I can't seem to find the example code that does it.
> > >
> > > > I tried setting a MarqueeDragTracker on the SelectionTool, but doing
in
> > > > the createTool call on an entry throws an exception in
> > > > AbstractTool.activate, so I assume this approach is either incorrect
or
> > > > being done too early.
> > >
> > >
> > > > --Cam
> > >
> > >
>
>
|
|
|
Re: Adding marquee selection to SelectionTool [message #156503 is a reply to message #156491] |
Mon, 01 November 2004 20:09 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Cameron Bateman![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=cbateman%40rim.com) Messages: 39 Registered: July 2009 |
Member |
|
|
Yep, that did it! Thanks. One follow-up: with the selection tool working
in this way, is there any further functionality in the Marquee tool that
makes it worth keeping on my palette?
--Cam
Randy Hudson wrote:
> It sounds like you are attempting to drag your contents editpart. You
> should return NULL or the marquee drag tracker in your getDragTracker(req)
> method. See LogicDiagramEditPart for an example.
> "Cameron Bateman" <cbateman@rim.com> wrote in message
> news:cm61bk$h3i$1@eclipse.org...
> > Hi Pratik,
> >
> > Thanks for your response. I am adding the PanningSelectionToolEntry as
> > you say, but when I try to click and drag on my canvass with the tool, it
> > just sets the "invalid mode" mouse pointer (circle with a cross through
> > it) as though a request is being rejected.
> >
> > Is it possible that I'm inadvertently overriding the default behaviour?
> > The marquee tool _does_ work. The code that creates the pallette entries
> > looks like this:
> >
> > ..
> > _paletteRoot = new PaletteRoot();
> >
> > // group the default controls
> > PaletteGroup controls = new PaletteGroup("Controls");
> >
> > // selection tool
> > PanningSelectionToolEntry toolEntry = new PanningSelectionToolEntry();
> > controls.add(toolEntry);
> > _paletteRoot.setDefaultEntry(toolEntry);
> >
> > // Marquee (group selection) tool
> > controls.add(new MarqueeToolEntry());
> >
> > _paletteRoot.add(controls);
> >
> >
> > --Cam
> >
> > Pratik Shah wrote:
> >
> > > The default behaviour already does that. All you need to do is add a
> > > PanningSelectionToolEntry to your palette.
> >
> > > "Cameron Bateman" <cbateman@rim.com> wrote in message
> > > news:cm5ric$6iu$1@eclipse.org...
> > > > Does anyone have an idea this?
> > > >
> > > > Thanks,
> > > >
> > > > Cameron
> > > >
> > > > Cameron Bateman wrote:
> > > >
> > > > > Greetings,
> > > >
> > > > > I have noticed that the Selection tool used in the logic example
> also
> > > > > carries "Marquee" drag functionality when you click and drag on a
> > > canvas.
> > > > > However, the default behaviour doesn't seem to do this. How would I
> add
> > > > > this? I can't seem to find the example code that does it.
> > > >
> > > > > I tried setting a MarqueeDragTracker on the SelectionTool, but doing
> in
> > > > > the createTool call on an entry throws an exception in
> > > > > AbstractTool.activate, so I assume this approach is either incorrect
> or
> > > > > being done too early.
> > > >
> > > >
> > > > > --Cam
> > > >
> > > >
> >
> >
|
|
|
|
Powered by
FUDForum. Page generated in 0.04161 seconds