Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Make Tracker produce straight line
Make Tracker produce straight line [message #457026] Wed, 15 June 2005 08:26 Go to next message
ian mayo is currently offline ian mayoFriend
Messages: 17
Registered: July 2009
Junior Member
Hi all,

I've got an editor with a custom interface plotting using a Canvas. I'd
like to let the user drag the cursor to either select a set of objects, or
to measure the distance between two points.

I'm currently using the Tracker to let the user drag a rectangular area -
but now want to let the user drag a straight line. If I can I'd rather
use some high level convenience method than start XORing my own lines. Can
anybody direct me towards such a class?

Cheers,
Ian.
Re: Make Tracker produce straight line [message #457183 is a reply to message #457026] Mon, 20 June 2005 19:24 Go to previous messageGo to next message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
Can you enter a feature request for Tracker? I assume it fails when you ask
to track a very thin rectangle.

"Ian Mayo" <IanMayo@freenet.co.uk> wrote in message
news:a76f9931c7eb58718d50ca7c268c831f$1@www.eclipse.org...
> Hi all,
>
> I've got an editor with a custom interface plotting using a Canvas. I'd
> like to let the user drag the cursor to either select a set of objects, or
> to measure the distance between two points.
>
> I'm currently using the Tracker to let the user drag a rectangular area -
> but now want to let the user drag a straight line. If I can I'd rather
> use some high level convenience method than start XORing my own lines. Can
> anybody direct me towards such a class?
>
> Cheers,
> Ian.
>
Re: Make Tracker produce straight line [message #457205 is a reply to message #457183] Tue, 21 June 2005 13:30 Go to previous messageGo to next message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
Tracker seems to do this well if a horizontal or vertical line is desired,
just give it a Rectangle with a height/width of 2 (the resulting line is
slightly thick). For non-horizontal/vertical lines of course Tracker won't
cut it.

Grant

"Steve Northover" <steve_northover@ca.ibm.com> wrote in message
news:d9756a$671$1@news.eclipse.org...
> Can you enter a feature request for Tracker? I assume it fails when you
ask
> to track a very thin rectangle.
>
> "Ian Mayo" <IanMayo@freenet.co.uk> wrote in message
> news:a76f9931c7eb58718d50ca7c268c831f$1@www.eclipse.org...
> > Hi all,
> >
> > I've got an editor with a custom interface plotting using a Canvas. I'd
> > like to let the user drag the cursor to either select a set of objects,
or
> > to measure the distance between two points.
> >
> > I'm currently using the Tracker to let the user drag a rectangular
area -
> > but now want to let the user drag a straight line. If I can I'd rather
> > use some high level convenience method than start XORing my own lines.
Can
> > anybody direct me towards such a class?
> >
> > Cheers,
> > Ian.
> >
>
>
Re: Make Tracker produce straight line [message #457217 is a reply to message #457205] Tue, 21 June 2005 20:32 Go to previous message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
The Tracker could detect the case when a rectangle is 1 wide and draw a line
instead.

"Grant Gayed" <grant_gayed@ca.ibm.com> wrote in message
news:d994q5$710$1@news.eclipse.org...
> Tracker seems to do this well if a horizontal or vertical line is desired,
> just give it a Rectangle with a height/width of 2 (the resulting line is
> slightly thick). For non-horizontal/vertical lines of course Tracker
won't
> cut it.
>
> Grant
>
> "Steve Northover" <steve_northover@ca.ibm.com> wrote in message
> news:d9756a$671$1@news.eclipse.org...
> > Can you enter a feature request for Tracker? I assume it fails when you
> ask
> > to track a very thin rectangle.
> >
> > "Ian Mayo" <IanMayo@freenet.co.uk> wrote in message
> > news:a76f9931c7eb58718d50ca7c268c831f$1@www.eclipse.org...
> > > Hi all,
> > >
> > > I've got an editor with a custom interface plotting using a Canvas.
I'd
> > > like to let the user drag the cursor to either select a set of
objects,
> or
> > > to measure the distance between two points.
> > >
> > > I'm currently using the Tracker to let the user drag a rectangular
> area -
> > > but now want to let the user drag a straight line. If I can I'd
rather
> > > use some high level convenience method than start XORing my own lines.
> Can
> > > anybody direct me towards such a class?
> > >
> > > Cheers,
> > > Ian.
> > >
> >
> >
>
>
Previous Topic:Browser widget displays HTML with gap
Next Topic:SWT_AWT Linux-GTK crash ?
Goto Forum:
  


Current Time: Fri Apr 26 17:50:48 GMT 2024

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

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

Back to the top