Newer
Older
AlgebraicDataflowArchitectureModel / AlgebraicDataflowArchitectureModel / src / application / actions / NewEventChannelAction.java
package application.actions;

import java.awt.event.ActionEvent;

import javax.swing.JOptionPane;

import application.editor.Editor;
import models.dataFlowModel.DataTransferChannel;

public class NewEventChannelAction extends AbstractEditorAction {

	/**
	 * 
	 */
	private static final long serialVersionUID = -1657072017390171313L;

	public NewEventChannelAction(Editor editor) {
		super("Event Channel...", editor);
	}

	@Override
	public void actionPerformed(ActionEvent e) {
		String channelName = JOptionPane.showInputDialog("Event Channel Name:");
		if (channelName == null) return;
		editor.addEventChannel(channelName);
	}

}