Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Figure.setBackgroundColor() and GEF 3.1
Figure.setBackgroundColor() and GEF 3.1 [message #192233] Wed, 17 August 2005 12:14 Go to next message
Jose M Beleta is currently offline Jose M BeletaFriend
Messages: 70
Registered: July 2009
Member
I used org.eclipse.draw2d.Figure.setBackgroundColor() with no problem in GEF
3.0, but when using the new GEF 3.1 all my figures get a transparent
background.

Even I tried Figure.setOpaque(true);

Any one knows if anything have changed between 3.0 and 3.1 to explain this
behaviour, or is it a bug? Perhaps I missing something and it is my fault...

Any help would be greatly appreciated.

Jose M Beleta
Re: Figure.setBackgroundColor() and GEF 3.1 [message #192283 is a reply to message #192233] Wed, 17 August 2005 20:14 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

In 3.1, figures have no size when created (0,0) instead of (64,32) in 3.0.

"Jose M Beleta" <beleta@attglobal.net> wrote in message
news:ddv9pv$se6$1@news.eclipse.org...
>I used org.eclipse.draw2d.Figure.setBackgroundColor() with no problem in
>GEF 3.0, but when using the new GEF 3.1 all my figures get a transparent
>background.
>
> Even I tried Figure.setOpaque(true);
>
> Any one knows if anything have changed between 3.0 and 3.1 to explain
> this behaviour, or is it a bug? Perhaps I missing something and it is my
> fault...
>
> Any help would be greatly appreciated.
>
> Jose M Beleta
>
Re: Figure.setBackgroundColor() and GEF 3.1 [message #192321 is a reply to message #192283] Wed, 17 August 2005 22:33 Go to previous messageGo to next message
Jose M Beleta is currently offline Jose M BeletaFriend
Messages: 70
Registered: July 2009
Member
Randy,

Thank you for your reply, but...

> In 3.1, figures have no size when created (0,0) instead of (64,32) in 3.0.

Do you think that this explain the behaviour I have seen.

Do you mean that I have to resize the figure before changing colors, and if
I resize the figure again I will have to call setBackgroundColor another
time. Is that correct?

Jose M Beleta

"Randy Hudson" <none@us.ibm.com> escribi
Re: Figure.setBackgroundColor() and GEF 3.1 [message #192418 is a reply to message #192321] Thu, 18 August 2005 17:45 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

"Jose M Beleta" <beleta@attglobal.net> wrote in message
news:de0e05$cck$1@news.eclipse.org...
> Randy,
>
> Thank you for your reply, but...
>
>> In 3.1, figures have no size when created (0,0) instead of (64,32) in
>> 3.0.
>
> Do you think that this explain the behaviour I have seen.

It's the only thing I thought of. It could only explain the behavior if you
_never_ set the size of your figures.

Please post a snippet showing the problem.
Re: Figure.setBackgroundColor() and GEF 3.1 [message #192520 is a reply to message #192418] Fri, 19 August 2005 09:08 Go to previous message
Jose M Beleta is currently offline Jose M BeletaFriend
Messages: 70
Registered: July 2009
Member
Randy,

I found the problem. My figure extends Polygon and this extends Polyline,
you have changed Polyline and added setFill(false) to the instance
initializer:

public class Polyline extends Shape
{

PointList points = new PointList();
private static final int TOLERANCE = 2;
private static final Rectangle LINEBOUNDS = Rectangle.SINGLETON;

{
setFill(false); // This line is new 3.1
bounds = null;
}
....
....
}

Best regards,

Jose M Beleta

"Randy Hudson" <none@us.ibm.com> escribi
Previous Topic:AWT in Draw2D
Next Topic:heavyweight/lightweight (Randy, please help...)
Goto Forum:
  


Current Time: Wed Feb 05 05:52:33 GMT 2025

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

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

Back to the top