Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » custom units via graphics object
custom units via graphics object [message #132474] Mon, 17 May 2004 19:51 Go to next message
J Schofield is currently offline J SchofieldFriend
Messages: 28
Registered: July 2009
Junior Member
Greeting once again!

I'm trying to use my own coordinate system (himetric) in my model and seem
to be having some difficulty. I thought that I might be able to create my
own Graphics object that functioned like the ScaledGraphics object. My new
Graphics object would wrap the swtgraphics and convert the hi-metric values
into smaller values to display. The figures look great and are getting
scaled correctly (96dpi / 25.4 / 100) but things like feedback and selection
aren't.

I've been digging through the code trying to see what I missed. I thought
that the SelectionTool would convert the mouse location based on zoom and
then search the figures for a hit. Any ideas?

thanks,
Jody
Re: custom units via graphics object [message #132672 is a reply to message #132474] Tue, 18 May 2004 13:50 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

It sounds like you are not converting coordinates in your figure which
introduces the himetric function. For example, see ScaledFreeformLayer.
This figure not only creates the scaled graphics, but also extends
translateToParent and fromParent() so that feedback (which was originally
un-scaled) would appear correctly.

"Jody Schofield" <jodyschofield@rogers.com> wrote in message
news:c8b4n3$12p$1@eclipse.org...
> Greeting once again!
>
> I'm trying to use my own coordinate system (himetric) in my model and seem
> to be having some difficulty. I thought that I might be able to create my
> own Graphics object that functioned like the ScaledGraphics object. My
new
> Graphics object would wrap the swtgraphics and convert the hi-metric
values
> into smaller values to display. The figures look great and are getting
> scaled correctly (96dpi / 25.4 / 100) but things like feedback and
selection
> aren't.
>
> I've been digging through the code trying to see what I missed. I thought
> that the SelectionTool would convert the mouse location based on zoom and
> then search the figures for a hit. Any ideas?
>
> thanks,
> Jody
>
>
Re: custom units via graphics object [message #132763 is a reply to message #132672] Tue, 18 May 2004 17:44 Go to previous messageGo to next message
J Schofield is currently offline J SchofieldFriend
Messages: 28
Registered: July 2009
Junior Member
Yup, you're right. It seems that was what I was missing.

thanks,
Jody


"Randy Hudson" <none@us.ibm.com> wrote in message
news:c8d3sj$aka$1@eclipse.org...
> It sounds like you are not converting coordinates in your figure which
> introduces the himetric function. For example, see ScaledFreeformLayer.
> This figure not only creates the scaled graphics, but also extends
> translateToParent and fromParent() so that feedback (which was originally
> un-scaled) would appear correctly.
>
> "Jody Schofield" <jodyschofield@rogers.com> wrote in message
> news:c8b4n3$12p$1@eclipse.org...
> > Greeting once again!
> >
> > I'm trying to use my own coordinate system (himetric) in my model and
seem
> > to be having some difficulty. I thought that I might be able to create
my
> > own Graphics object that functioned like the ScaledGraphics object. My
> new
> > Graphics object would wrap the swtgraphics and convert the hi-metric
> values
> > into smaller values to display. The figures look great and are getting
> > scaled correctly (96dpi / 25.4 / 100) but things like feedback and
> selection
> > aren't.
> >
> > I've been digging through the code trying to see what I missed. I
thought
> > that the SelectionTool would convert the mouse location based on zoom
and
> > then search the figures for a hit. Any ideas?
> >
> > thanks,
> > Jody
> >
> >
>
>
Re: custom units via graphics object [message #132784 is a reply to message #132763] Tue, 18 May 2004 18:25 Go to previous messageGo to next message
J Schofield is currently offline J SchofieldFriend
Messages: 28
Registered: July 2009
Junior Member
I seem to be having troubles with creating bendpoints while zoomed. They
get created but the feedback is wrong.

Is there a bug in the ConnectionBendPointEditPolicy? I notice that the
NonResizeableEditPolicy translates the bounds for the feedback to be
displayed properly but I don't seem to see similar logic in the
ConnectionBendPointEditPolicy.

regards,
Jody
Re: custom units via graphics object [message #132797 is a reply to message #132784] Tue, 18 May 2004 21:15 Go to previous message
J Schofield is currently offline J SchofieldFriend
Messages: 28
Registered: July 2009
Junior Member
*blush* I think I found my problem. Apparently
ConnectionBendPointEditPolicy isn't in the gef framework. Sorry about the
confusion.

regards,
Jody


"Jody Schofield" <jodyschofield@rogers.com> wrote in message
news:c8dk1u$2sl$1@eclipse.org...
> I seem to be having troubles with creating bendpoints while zoomed. They
> get created but the feedback is wrong.
>
> Is there a bug in the ConnectionBendPointEditPolicy? I notice that the
> NonResizeableEditPolicy translates the bounds for the feedback to be
> displayed properly but I don't seem to see similar logic in the
> ConnectionBendPointEditPolicy.
>
> regards,
> Jody
>
>
Previous Topic:Rare bug under eclipse 2.1
Next Topic:ConnectionEditPart - layout
Goto Forum:
  


Current Time: Fri Apr 26 18:40:30 GMT 2024

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

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

Back to the top