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.main.core.actions.vertex; 005 006 import graphlab.graph.event.VertexEvent; 007 import graphlab.platform.core.AbstractAction; 008 import graphlab.platform.core.BlackBoard; 009 010 /** 011 * Highlights a vertex when the mouse entered it. 012 * User: Shabn 013 */ 014 public class VertexHighlightAction extends AbstractAction { 015 /** 016 * constructor 017 * 018 * @param bb the blackboard of the action 019 */ 020 public VertexHighlightAction(BlackBoard bb) { 021 super(bb); 022 // listen4Event(VertexMouseEnteredExitedData.event); 023 listen4Event(VertexEvent.EVENT_KEY); 024 } 025 026 public void performAction(String eventName, Object value) { 027 // if (name.equals(VertexMouseEnteredExitedData.name)) { 028 //highlighting is disabled for simplicity reasons 029 // VertexMouseEnteredExitedData e = blackboard.get(VertexMouseEnteredExitedData.name); 030 // if (e.isEntered) { 031 // e.v.lc = (highlight); 032 // } 033 // if (e.isExited) { 034 // e.v.lc = (normal); 035 // } 036 //// e.v.view.repaint(); 037 // } 038 // if (name.equals(VertexNotifyData.name)) { 039 // VertexNotifyData vnd = blackboard.get(VertexNotifyData.name); 040 // if (vnd.isNotified == VertexNotifyData.NOTIFIED) 041 // vnd.v.view.lc = VertexView.LineColor.notified; 042 // if (vnd.isNotified == VertexNotifyData.UN_NOTIFIED) 043 // vnd.v.view.lc = VertexView.LineColor.normal; 044 // vnd.v.view.repaint(); 045 // } 046 } 047 048 }