Skip to main content



      Home
Home » Eclipse Projects » GEF » Animation...
Animation... [message #206940] Mon, 09 January 2006 11:05 Go to next message
Eclipse UserFriend
I found this very cool animation feature in the logic example code:
....
protected void refreshVisuals() {
Animation.markBegin();
ConnectionLayer cLayer = (ConnectionLayer) getLayer(CONNECTION_LAYER);
cLayer.setAntialias(SWT.ON);
...
cLayer.setConnectionRouter(...);
Animation.run(400);
}

....

and in the example it works all fine (and looks super cool, btw!) so of
course I wanted to add that to my application as well. I copied the
above code snippet but when I change the router setting in my
application no animation takes place at all but rather the router
changes immediately (as it used to before).

Why is this not workin in my code? What am I missing here? Does one
somehow have to enable that feature first? I found no code, that looked
like it would do so. Is this maybe some "side-effect" of some other,
innocently looking call, that enables animation?

Michael
Re: Animation... [message #206951 is a reply to message #206940] Mon, 09 January 2006 11:20 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

Animation works by adding LayoutListeners or RoutingListeners to the figures
to be animated.
See createFigure in WireEditPart for the 3rd line of code that is needed.
enjoy, but don't abuse ;-).


"Michael Moser" <mmo@zurich.ibm.com> wrote in message
news:dpu1k4$ou0$1@utils.eclipse.org...
>I found this very cool animation feature in the logic example code:
> ...
> protected void refreshVisuals() {
> Animation.markBegin();
> ConnectionLayer cLayer = (ConnectionLayer) getLayer(CONNECTION_LAYER);
> cLayer.setAntialias(SWT.ON);
> ...
> cLayer.setConnectionRouter(...);
> Animation.run(400);
> }
>
> ...
>
Re: Animation... [message #207026 is a reply to message #206951] Tue, 10 January 2006 03:03 Go to previous message
Eclipse UserFriend
Aaah - now it works - thanks! That detail had slipped my attention!
As I said: super cool! :-)

Michael

"Randy Hudson" <none@us.ibm.com> wrote in message
news:dpu2gd$qhj$1@utils.eclipse.org...
> Animation works by adding LayoutListeners or RoutingListeners to the
> figures to be animated.
> See createFigure in WireEditPart for the 3rd line of code that is
> needed. enjoy, but don't abuse ;-).
>
>
> "Michael Moser" <mmo@zurich.ibm.com> wrote in message
> news:dpu1k4$ou0$1@utils.eclipse.org...
>>I found this very cool animation feature in the logic example code:
>> ...
>> protected void refreshVisuals() {
>> Animation.markBegin();
>> ConnectionLayer cLayer = (ConnectionLayer)
>> getLayer(CONNECTION_LAYER);
>> cLayer.setAntialias(SWT.ON);
>> ...
>> cLayer.setConnectionRouter(...);
>> Animation.run(400);
>> }
>>
>> ...
>>
>
Previous Topic:UndoActionHandler and RndoActionHandler cann't collect by the JVM.
Next Topic:"Delete" & "Zoom" in MultiPageEditor
Goto Forum:
  


Current Time: Wed Jul 23 08:35:13 EDT 2025

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

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

Back to the top