Skip to main content



      Home
Home » Eclipse Projects » GEF » Label used as ConnectionAnchor not being painted correctly.
Label used as ConnectionAnchor not being painted correctly. [message #164174] Mon, 17 January 2005 15:08 Go to next message
Eclipse UserFriend
Hi,

I have several ConnectionAnchors that are placed within the bounds of the
parent nodes figure. Each anchor has an associated label.

The label text is only displayed if the anchor has no connection.

As soon as a connection is made the labels text is greyed out using
Figure#setEnabled(false)

If I select and then delete a connection the connection dissapears and the
anchor text appears as expected.

The only problem is that the top row of pixels in the label text remains
greyed.

If I force a redraw by resizing the window the label text is draw correctly.

If I use undo/dedo via the keyboard the problem still occures.

This is on GEF 3.01/GTK Linux.

Any ideas on how to go about tracking this one down?

Cheers, Steve.
Re: Label used as ConnectionAnchor not being painted correctly. [message #164410 is a reply to message #164174] Tue, 18 January 2005 14:55 Go to previous messageGo to next message
Eclipse UserFriend
Might be a bug. Can you reproduce this on Windows? Can you reproduce this
in a simple snippet that places a label in an SWT shell?

"Steve Jones" <steve@istech.demon.co.uk> wrote in message
news:csh59s$52p$1@www.eclipse.org...
> Hi,
>
> I have several ConnectionAnchors that are placed within the bounds of the
> parent nodes figure. Each anchor has an associated label.
>
> The label text is only displayed if the anchor has no connection.
>
> As soon as a connection is made the labels text is greyed out using
> Figure#setEnabled(false)
>
> If I select and then delete a connection the connection dissapears and the
> anchor text appears as expected.
>
> The only problem is that the top row of pixels in the label text remains
> greyed.
>
> If I force a redraw by resizing the window the label text is draw
correctly.
>
> If I use undo/dedo via the keyboard the problem still occures.
>
> This is on GEF 3.01/GTK Linux.
>
> Any ideas on how to go about tracking this one down?
>
> Cheers, Steve.
>
Re: Label used as ConnectionAnchor not being painted correctly. [message #164550 is a reply to message #164410] Wed, 19 January 2005 02:41 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

No so far.

I've spent half a day trying, I'll have to leave it for now.

I'm not sure about the dynamics of the redraw operations that take place
when a connection is deleted so reproducing it in a snippet is a problem.

I'm sure it's something to do with the fact that the connection "wire"
actually crosses the label text when it's greyed out. This is an unusual
condition for labels since they are never normally obscured by anything.

Steve.


Pratik Shah wrote:

> Might be a bug. Can you reproduce this on Windows? Can you reproduce
> this in a simple snippet that places a label in an SWT shell?
>
> "Steve Jones" <steve@istech.demon.co.uk> wrote in message
> news:csh59s$52p$1@www.eclipse.org...
>> Hi,
>>
>> I have several ConnectionAnchors that are placed within the bounds of the
>> parent nodes figure. Each anchor has an associated label.
>>
>> The label text is only displayed if the anchor has no connection.
>>
>> As soon as a connection is made the labels text is greyed out using
>> Figure#setEnabled(false)
>>
>> If I select and then delete a connection the connection dissapears and
>> the anchor text appears as expected.
>>
>> The only problem is that the top row of pixels in the label text remains
>> greyed.
>>
>> If I force a redraw by resizing the window the label text is draw
> correctly.
>>
>> If I use undo/dedo via the keyboard the problem still occures.
>>
>> This is on GEF 3.01/GTK Linux.
>>
>> Any ideas on how to go about tracking this one down?
>>
>> Cheers, Steve.
>>

--
Steve Jones
I.S.Technology Ltd
Re: Label used as ConnectionAnchor not being painted correctly. [message #164629 is a reply to message #164550] Wed, 19 January 2005 11:51 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

It sounds like the damage rectangle caused by the connection deletion
happens to intersect all but the top row of pixels in the label. The label
itself is not requesting a repaint in the necessary region.

Figure#setEnabled() should call repaint, or at least subclasses of figure
which paint differently based on enabled state. Open a bugzilla and extend
this method as a workaround to ask for the repaint yourself.
Previous Topic:Tool's event methods' EditPartViewer vs. viewerEntered()
Next Topic:how to save palette
Goto Forum:
  


Current Time: Sat Jun 14 23:39:47 EDT 2025

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

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

Back to the top