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.ui.actions; 005 006 import graphlab.platform.core.AbstractAction; 007 import graphlab.platform.core.BlackBoard; 008 import graphlab.ui.UIUtils; 009 010 import javax.swing.*; 011 012 /** 013 * just a simple test action showing a dialog on the screen 014 * 015 * @author azin azadi 016 */ 017 public class TestAction extends AbstractAction { 018 /** 019 * constructor 020 * 021 * @param bb the blackboard of the action 022 */ 023 public TestAction(BlackBoard bb) { 024 super(bb); 025 listen4Event(UIUtils.getUIEventKey("ttest")); 026 } 027 028 /** 029 * like Action 030 * 031 * @param eventName 032 * @param value 033 */ 034 public void performAction(String eventName, Object value) { 035 JOptionPane.showMessageDialog(null, "test is ok :D, ", "tessst", JOptionPane.INFORMATION_MESSAGE); 036 System.out.println("test is ok :D"); 037 } 038 }