Package edu.harvard.wcfia.yoshikoder

Source Code of edu.harvard.wcfia.yoshikoder.AddPatternAction

package edu.harvard.wcfia.yoshikoder;

import java.awt.event.ActionEvent;

import javax.swing.JDialog;

import edu.harvard.wcfia.yoshikoder.dictionary.CategoryNode;
import edu.harvard.wcfia.yoshikoder.dictionary.Node;
import edu.harvard.wcfia.yoshikoder.ui.dialog.NewPatternDialog;

public class AddPatternAction extends YoshikoderAction {

    public AddPatternAction(Yoshikoder yk) {
        super(yk, AddPatternAction.class.getName());

    }

    public void actionPerformed(ActionEvent e) {
        Node node = yoshikoder.getSelectedNode();
        if ((node != null) && (node instanceof CategoryNode)){
            JDialog dia = new NewPatternDialog(yoshikoder, (CategoryNode)node);
            dia.setVisible(true);
        }
    }

}
TOP

Related Classes of edu.harvard.wcfia.yoshikoder.AddPatternAction

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.