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    
005    package graphlab.ui.extension;
006    
007    import graphlab.platform.core.AbstractAction;
008    import graphlab.platform.core.BlackBoard;
009    import graphlab.platform.extension.ExtensionHandler;
010    
011    /**
012     * @author azin azadi
013    
014     */
015    public class UIActionExtensionHandler implements ExtensionHandler {
016        AbstractAction a = null;
017    
018        public AbstractAction handle(BlackBoard b, Object ext) {
019            a = null;
020            if (ext instanceof UIActionExtension) {
021                try {
022                    UIActionExtension vm = (UIActionExtension) ext;
023                    a = new UIActionExtensionAction(b, vm);
024                } catch (Exception e) {
025                    e.printStackTrace();
026                }
027            }
028            return a;
029        }
030    }