Problem with repaint() [message #231036] |
Mon, 26 February 2007 08:20  |
Eclipse User |
|
|
|
Originally posted by: news.madlener.online.de
Hello everyone,
I got a problem refreshing the visuals for my editor view. After
deleting objects, that are represented as single figures drawn on a
freeform-layer, the figure stays on the layer.
In the refreshVisuals() I do call getFigure.repaint().
I can use the delete() Action in the context-menue, . The figure gets
removed only if I click it again, or the Figure gets out of bounds (on
the screen)- I am quite sure that this is a really silly bug, but I just
can not get a finger on the spot.
Help is very appreciated!
Cheers
Oliver
|
|
|
Re: Problem with repaint() [message #231044 is a reply to message #231036] |
Mon, 26 February 2007 08:48   |
Eclipse User |
|
|
|
Originally posted by: jakub.jurkiewicz.gmail.com
I cannot say what might be wrong if I don't see your code.
In my simple editor I've got:
protected void refreshVisuals() {
Rectangle bounds = new Rectangle(getCastedModel().getLocation(),
getCastedModel().getSize());
((GraphicalEditPart) getParent()).setLayoutConstraint(this,
getFigure(), bounds);
super.refreshVisuals();
}
So as you see I don't invoke the repaint method anywhere.
Hope this helps :)
Jakub Jurkiewicz
Oliver Madlener wrote:
> Hello everyone,
>
> I got a problem refreshing the visuals for my editor view. After
> deleting objects, that are represented as single figures drawn on a
> freeform-layer, the figure stays on the layer.
> In the refreshVisuals() I do call getFigure.repaint().
> I can use the delete() Action in the context-menue, . The figure gets
> removed only if I click it again, or the Figure gets out of bounds (on
> the screen)- I am quite sure that this is a really silly bug, but I just
> can not get a finger on the spot.
> Help is very appreciated!
>
> Cheers
>
> Oliver
|
|
|
|
|
Solved [message #231483 is a reply to message #231403] |
Fri, 09 March 2007 02:54  |
Eclipse User |
|
|
|
Originally posted by: news.madlener.online.de
Hi everyone,
for those who wondered what the problem was. The layout manager
"DirectedGraphLayout" did not finish his work, and therefor the window
was not updated instantly. Well I do not really know why it worked after
I clicked the mouse again, but there you go.
Cheers
Oliver
|
|
|
Powered by
FUDForum. Page generated in 0.03874 seconds