001 // GraphLab Project: http://graphlab.sharif.edu 002 // Copyright (C) 2008 Mathematical Science Department of Sharif University of Technology 003 // Distributed under the terms of the GNU General Public License (GPL): http://www.gnu.org/licenses/ 004 package graphlab.plugins.algorithmanimator.core.atoms; 005 006 import graphlab.graph.graph.EdgeModel; 007 import graphlab.library.event.EdgeEvent; 008 import graphlab.library.event.Event; 009 import graphlab.platform.core.BlackBoard; 010 import graphlab.plugins.algorithmanimator.core.AtomAnimator; 011 012 /** 013 * currently not use because of automatic marking of edges in EdgeModel 014 * 015 * @author Azin Azadi 016 */ 017 public class EdgeMarkAnimator implements AtomAnimator<EdgeEvent> { 018 019 public boolean isAnimatable(Event event) { 020 if (event instanceof EdgeEvent) 021 if (((EdgeEvent) event).eventType == EdgeEvent.EventType.MARK) 022 return true; 023 return false; 024 } 025 026 public EdgeEvent animate(EdgeEvent event, BlackBoard b) { 027 ((EdgeModel) event.edge).setColor(1); 028 return event; 029 } 030 }