public void actionPerformed(ActionEvent e) { Component parent = UIUtils.getActionEventParentWindow(e); String name = (String) JOptionPane.showInputDialog(parent, "Name for the new workflow output?", "Name required", JOptionPane.QUESTION_MESSAGE, null, null, ""); if (name != null) { try { model.getWorkflowSinkProcessor().addPort( new InputPort(model.getWorkflowSinkProcessor(), name)); model.forceUpdate(); } catch (PortCreationException pce) { JOptionPane.showMessageDialog(parent, "Port creation exception : \n" + pce.getMessage(), "Exception!", JOptionPane.ERROR_MESSAGE); } catch (DuplicatePortNameException dpne) { JOptionPane.showMessageDialog(parent, "Duplicate name : \n" + dpne.getMessage(), "Exception!", JOptionPane.ERROR_MESSAGE); } } }
public void actionPerformed(ActionEvent e) { Component parent = UIUtils.getActionEventParentWindow(e); String name = (String) JOptionPane.showInputDialog(parent, "Name for the new workflow input?", "Name required", JOptionPane.QUESTION_MESSAGE, null, null, ""); if (name != null) { try { model.getWorkflowSourceProcessor() .addPort( new OutputPort(model .getWorkflowSourceProcessor(), name)); model.forceUpdate(); } catch (PortCreationException pce) { JOptionPane.showMessageDialog(parent, "Port creation exception : \n" + pce.getMessage(), "Exception!", JOptionPane.ERROR_MESSAGE); } catch (DuplicatePortNameException dpne) { JOptionPane.showMessageDialog(parent, "Duplicate name : \n" + dpne.getMessage(), "Exception!", JOptionPane.ERROR_MESSAGE); } } } }
void addInputPort(String name) throws DuplicatePortNameException, PortCreationException { model.getWorkflowSourceProcessor().addPort( new OutputPort(model.getWorkflowSourceProcessor(), name)); model.forceUpdate(); }
void addOutputPort(String name) throws DuplicatePortNameException, PortCreationException { model.getWorkflowSinkProcessor().addPort( new InputPort(model.getWorkflowSinkProcessor(), name)); model.forceUpdate(); }
model.forceUpdate(); assertEquals("Forced update", getEvent(events, model.notifyThread)); model.setOffline(true);