Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsAnimation on editpart
https://www.eclipse.org/forums/index.php/mv/msg/79840/248208/#msg_248208
I have requirement to show animation on editparts. i,e i have set of
connections which has a source and traget node.
On a event i need to highlight the single node at a time till it reaches
its target point node
eq
A C1 B C2 D
where C1 and C2 are connections and A,B and D are the nodes
with the below implementationn it is all the nodes are get highlighted
together but what i need is first highlight the A,then some time interval
B and then C
private void blinkingFeature(Set<ConnectionEditPart> tracedConnEditParts)
{
for (ConnectionEditPart connectionEditPart : tracedConnEditParts)
{
final GraphicalEditPart targetEditPart =
(GraphicalEditPart)connectionEditPart.getTarget();
final GraphicalEditPart sourcEditPart =
(GraphicalEditPart)connectionEditPart.getSource();
Thread thread1 = new Thread(new AnimatePort(targetEditPart));
thread1.start();
Thread thread2 = new Thread(new AnimatePort(sourcEditPart));
thread2.start();
}
}
private class AnimatePort implements Runnable
{
GraphicalEditPart graphicalEditPart;
public AnimatePort(final GraphicalEditPart graphicalEditPart)
{
this.graphicalEditPart = graphicalEditPart;
}
public void run() {
for(int i = 1; i < 20;i++)
{
if(i % 2 == 0)
{
Display.getDefault().syncExec( new Runnable(){
I tried the thread join but it us blocking my UI update process. Any idea
how achive this ?
Regards
Byre]]>BG2009-04-09T19:06:31-00:00Re: Animation on editpart
https://www.eclipse.org/forums/index.php/mv/msg/79840/642712/#msg_642712
I want to achieve the same, any updates????
Thanks in advance for any help. ]]>Mostafa ElShafei2010-12-02T13:26:06-00:00