diff --git a/AlgebraicDataflowArchitectureModel/src/graphicalrefactor/actions/NewFormulaChannelAction.java b/AlgebraicDataflowArchitectureModel/src/graphicalrefactor/actions/NewFormulaChannelAction.java new file mode 100644 index 0000000..b87f5eb --- /dev/null +++ b/AlgebraicDataflowArchitectureModel/src/graphicalrefactor/actions/NewFormulaChannelAction.java @@ -0,0 +1,36 @@ +package graphicalrefactor.actions; + +import java.awt.BorderLayout; +import java.awt.Container; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; + +import javax.swing.JButton; +import javax.swing.JFrame; +import javax.swing.JLabel; +import javax.swing.JOptionPane; +import javax.swing.JPanel; + +import graphicalrefactor.editor.Editor; +import models.visualModel.FormulaChannelGenerator; + +public class NewFormulaChannelAction extends AbstractEditorAction implements ActionListener { + + /** + * + */ + private static final long serialVersionUID = 5345875219049178252L; + + public NewFormulaChannelAction(Editor editor) { + super("FormulaChannel...", editor); + } + + @Override + public void actionPerformed(ActionEvent e) { + String channelName = JOptionPane.showInputDialog("FormulaChannel Name:"); + String symbol = JOptionPane.showInputDialog("symbol"); + if (channelName == null|| symbol == null) return; + editor.addFormulaChannelGenerator(new FormulaChannelGenerator(channelName, editor.getModel().getSymbol(symbol))); + } + +}