Paul Johnson | 3 Aug 18:01
Picon

Re: Bean repaint issue.

Hello Ali,

I just did a component that draws to the screen also.
All I did was call this.repaint() from inside the component.

I am not sure how you have yours setup, but I followed the same structure as what was being used for the chart
example in the drafts folder.

Everything seems to work just fine.

Paul

  ----- Original Message ----- 
  From: Ali Cinar 
  To: thinlet <at> yahoogroups.com 
  Sent: Tuesday, August 03, 2004 9:57 AM
  Subject: [thinlet] Bean repaint issue.

  Hi All,

  I have a Thinlet based GUI, and I am using an AWT based Ploting 
  Component as a Thinlet Bean inside the GUI.  The Ploting bean makes 
  calls to Component.repaint() when the mouse moves on it. Unfortunatly, 
  the repaint call doesn't repaint the Component. I tried to call 
  getParent().repaint() inside the bean, but it didn't work too. 

  Does anybody have any suggestions?

  Thanks in advance, 

(Continue reading)

Ali Cinar | 23 Aug 16:46

Re: Bean repaint issue.


Hi Paul,

Thanks for your message,

Hmm, I'm still having the same problem with the beans.
I am also calling the repaint() function from inside
the bean component; however, it doesn't get repainted.

I can call Thinlet's repaint(Object) function
outside the bean to repaint, and it works fine.
However, I need to be able to do the repaint 
inside the bean too.

Inside the bean, getParent and isDisplayable functions
returns the following values:

     [java] DEBUG BarPlot.repaint - parent=null
     [java] DEBUG BarPlot.repaint - isDisplayable=false

Hmm, I'm probably doing something wrong somewhere. 
Any idea?

Best regards,

---
Ali Onur Cinar
Research Scientist
ATLSS Engineering Research Center
Lehigh University
(Continue reading)

Dawid Weiss | 14 Sep 18:49
Picon

Re: Bean repaint issue.


I confirm this one -- the repaint() method invoked on a Component (a
bean) doesn't refresh it. getParent() returns null from the component
too, so there is something wrong with beans' initialization.

A quick workaround: pass the thinlet's Object instance that
corresponds to your bean to the bean's code and use
thinlet.repaint(myself);

However, this should be added as a bug (or potential bug).

Dawid

--- In thinlet <at> yahoogroups.com, "Ali Cinar" <cinar <at> z...> wrote:
> 
> Hi Paul,
> 
> Thanks for your message,
> 
> Hmm, I'm still having the same problem with the beans.
> I am also calling the repaint() function from inside
> the bean component; however, it doesn't get repainted.
> 
> I can call Thinlet's repaint(Object) function
> outside the bean to repaint, and it works fine.
> However, I need to be able to do the repaint 
> inside the bean too.
> 
> Inside the bean, getParent and isDisplayable functions
> returns the following values:
(Continue reading)

Onur Cinar | 14 Sep 20:03

Re: Re: Bean repaint issue.


Hi Dawid,

> A quick workaround: pass the thinlet's Object instance that
> corresponds to your bean to the bean's code and use
> thinlet.repaint(myself);

Yes, that's what I did at the end. It is working fine. 
I'll try to take a look at Thinlet's code when I get a chance.
If I manage to fix it, I'll post the patch to the list.

Best regards,

-onur

--

-- 
A. Onur Cinar
Research Scientist
ATLSS Engineering Research Center
Lehigh University
wwweb: http://www.zdo.com

------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links
(Continue reading)

Andrzej Bialecki | 14 Sep 20:45

Re: Re: Bean repaint issue.

Onur Cinar wrote:

> Hi Dawid,
> 
> 
>>A quick workaround: pass the thinlet's Object instance that
>>corresponds to your bean to the bean's code and use
>>thinlet.repaint(myself);
> 
> 
> Yes, that's what I did at the end. It is working fine. 
> I'll try to take a look at Thinlet's code when I get a chance.
> If I manage to fix it, I'll post the patch to the list.
>

AFAIR my AWT lessons, Component must have a non-null parent that is 
displayable in order to be displayable itself. So perhaps a quick fix 
would be to add the following line to addComponent(..):

	this.add(bean);

--

-- 
Best regards,
Andrzej Bialecki

-------------------------------------------------
Software Architect, System Integration Specialist
CEN/ISSS EC Workshop, ECIMF project chair
EU FP6 E-Commerce Expert/Evaluator
-------------------------------------------------
(Continue reading)


Gmane