Skip to main content



      Home
Home » Eclipse Projects » GEF » Connections in Liinux
Connections in Liinux [message #92923] Mon, 08 September 2003 17:56 Go to next message
Eclipse UserFriend
Originally posted by: gg.decisionsoft.co.uk

I am writing a program to display a tree using GEF.

However when I run under linux, maximizing the editor sometimes causes all the connections to be come disconnected.
They keep their size and shape, but are not in the correct place. It does not happen all the time and, as far as I can tell, never happens under windows.

Has anyone else experienced this problem and does anyone have a fix?
--
Geoff
Re: Connections in Liinux [message #92951 is a reply to message #92923] Mon, 08 September 2003 10:26 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

It sounds like a potential bug in one of the connection anchors. Which
anchor types are you using?

"Geoff Gibbs" <gg@decisionsoft.co.uk> wrote in message
news:bjhjo0$vf0$1@eclipse.org...
> I am writing a program to display a tree using GEF.
>
> However when I run under linux, maximizing the editor sometimes causes all
the connections to be come disconnected.
> They keep their size and shape, but are not in the correct place. It does
not happen all the time and, as far as I can tell, never happens under
windows.
>
> Has anyone else experienced this problem and does anyone have a fix?
> --
> Geoff
>
Re: Connections in Liinux [message #93012 is a reply to message #92951] Tue, 09 September 2003 16:05 Go to previous message
Eclipse UserFriend
Originally posted by: gg.decisionsoft.co.uk

Randy Hudson wrote:

> It sounds like a potential bug in one of the connection anchors. Which
> anchor types are you using?
>

I've managed to fix the problem now.

I'm using my own connection anchor that subclasses AbstractConnectionAnchor.
Originally I was doing this:

public Point getLocation(Point reference) {
Rectangle r = Rectangle.SINGLETON;
r.setBounds(getOwner().getBounds());

Point p = r.getLocation();
p.x += r.width / 2;
return p;
}

But I had a look at the ChopBoxAnchor implementation and changed it to this:

public Point getLocation(Point reference) {
Rectangle r = Rectangle.SINGLETON;
r.setBounds(getOwner().getBounds());
r.translate(-1, -1);
r.resize(1, 1);

getOwner().translateToAbsolute(r);
Point p = r.getLocation();
p.x += r.width / 2;
return p;
}

This works, but I'm not sure why. Shouldn't the original have the same effect?


> "Geoff Gibbs" <gg@decisionsoft.co.uk> wrote in message
> news:bjhjo0$vf0$1@eclipse.org...
>
>>I am writing a program to display a tree using GEF.
>>
>>However when I run under linux, maximizing the editor sometimes causes all
>
> the connections to be come disconnected.
>
>>They keep their size and shape, but are not in the correct place. It does
>
> not happen all the time and, as far as I can tell, never happens under
> windows.
>
>>Has anyone else experienced this problem and does anyone have a fix?
>>--
>>Geoff
>>
>
>
>


--
Geoff
Previous Topic:Opening a GEF (or SWT) design pallet?
Next Topic:show gridlines in logic example ?
Goto Forum:
  


Current Time: Mon Jun 02 07:06:45 EDT 2025

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

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

Back to the top