problem with repaint() [message #199523] |
Sun, 09 October 2005 02:07 |
Eclipse User |
|
|
|
Originally posted by: chenzhuang2000.126.com
Hi, all,
I have a layer and some figures.
The figures are the children of the layer.
If i add a new figure into the children list, I want to repaint() the layer.
But, what i got is that the repaint() can only be used in the method of
paintFigrue(Graphics).
So, I try:
Display.getCurrent().timerExec(1000, new RepaintThread());
but the new figure can be added if the ClientArea is resized.
How to atuo repaint the layer when the new figure added?
Regards!
|
|
|
Re: problem with repaint() [message #199646 is a reply to message #199523] |
Mon, 17 October 2005 16:35 |
Eclipse User |
|
|
|
Originally posted by: none.unknown.com
You want to repaint the entire layer when a child is added? Override
layer's add(IFigure,Object,int) method and invoke repaint().
"cz" <chenzhuang2000@126.com> wrote in message
news:divf30$bvn$1@news.eclipse.org...
> Hi, all,
> I have a layer and some figures.
> The figures are the children of the layer.
> If i add a new figure into the children list, I want to repaint() the
layer.
> But, what i got is that the repaint() can only be used in the method of
> paintFigrue(Graphics).
>
> So, I try:
>
> Display.getCurrent().timerExec(1000, new RepaintThread());
>
> but the new figure can be added if the ClientArea is resized.
>
> How to atuo repaint the layer when the new figure added?
>
> Regards!
>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03038 seconds