[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools.gef] Re: problem with repaint()

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@xxxxxxx> wrote in message
news:divf30$bvn$1@xxxxxxxxxxxxxxxxxxx
> 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!
>
>
>