/** * As for the method above but allows a non-ScuflUIComponent JComponent. * Internally this component is wrapped up in a trivial ScuflUIComponent * which entirely ignores the workflow model settings. */ public static void createFrame(JComponent rawComponent, int posX, int posY, int width, int height) { UIComponentSPI p = new WrapperFrame(rawComponent); createFrame(null, p, posX, posY, width, height); }
public void actionPerformed(ActionEvent e) { InputPort port = (InputPort) modelObject; String value = port.getDefaultValue(); String new_value = (String) JOptionPane.showInputDialog(UIUtils.getActionEventParentWindow(e), "Default value for port " + port, "Default value", JOptionPane.QUESTION_MESSAGE, null, null, value); if (new_value == null || new_value.equals(value)) { return; } port.setDefaultValue(new_value); }
private void launchURL(String address) { UIUtils.launchBrowser(address); }
public void actionPerformed(ActionEvent ae) { // If the workbench is present then create and display a new // panel to configure the script engine. UIUtils.createFrame(apProcessor.getModel(), new APConfigPanel( apProcessor), 100, 100, 400, 500); } };
public void actionPerformed(ActionEvent ae) { String name = (String) JOptionPane.showInputDialog(UIUtils.getActionEventParentWindow(ae), "Name for the new processor?", "Name required", JOptionPane.QUESTION_MESSAGE, null, null, ""); if (name != null) { try { pf.createProcessor(name, ScavengerTreePopupHandler.this.scavenger.model); } catch (ProcessorCreationException pce) { JOptionPane.showMessageDialog(null, "Processor creation exception : \n" + pce.getMessage(), "Exception!", JOptionPane.ERROR_MESSAGE); } catch (DuplicateProcessorNameException dpne) { JOptionPane.showMessageDialog(null, "Duplicate name : \n" + dpne.getMessage(), "Exception!", JOptionPane.ERROR_MESSAGE); } } } });
public void actionPerformed(ActionEvent e) { Dimension loc = AbstractProcessorAction.this.getFrameLocation(); Dimension size = AbstractProcessorAction.this.getFrameSize(); Component c = getComponent(theProcessor); UIComponentSPI frame = new SimpleFrame(c, theProcessor); UIUtils.createFrame((ScuflModel)null, frame, (int)loc.getWidth(), (int)loc.getHeight(), (int)size.getWidth(), (int)size.getHeight()); } };
public void actionPerformed(ActionEvent at) { Component parent = UIUtils.getActionEventParentWindow(at); String newValue = (String)JOptionPane.showInputDialog(parent, "String constant", "New value?", JOptionPane.QUESTION_MESSAGE, null, null, scp.getStringValue()); if (newValue!=null && newValue.equals(scp.getStringValue())==false) { scp.setStringValue(newValue); } } };
public void actionPerformed(ActionEvent ae) { UIUtils.createFrame(sp.getModel(), new PollingPropertiesPanel( sp), 100, 100, 280, 125); } };
public void actionPerformed(ActionEvent ae) { try { String prefix = (String) JOptionPane.showInputDialog(UIUtils.getActionEventParentWindow(ae), "Optional name prefix?", "Prefix", JOptionPane.QUESTION_MESSAGE, null, null, ""); if (prefix != null) { if (prefix.equals("")) { prefix = null; } if (definitionURL != null) { XScuflParser.populate((new URL(definitionURL)).openStream(), ScavengerTreePopupHandler.this.scavenger.model, prefix); } else { // Is a literal definition XScuflParser.populate(new Document((Element) definitionElement.clone()), ScavengerTreePopupHandler.this.scavenger.model, prefix); } } } catch (Exception ex) { JOptionPane.showMessageDialog(null, "Problem opening XScufl from web : \n" + ex.getMessage(), "Exception!", JOptionPane.ERROR_MESSAGE); } } });
public void actionPerformed(ActionEvent ae) { // If the workbench is present then create and display a new // panel to configure the script engine. UIUtils.createFrame(rProcessor.getModel(), new RshellConfigPanel(rProcessor), 100, 100, 400, 500); } };
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) { Port port = (Port) modelObject; UIUtils.createFrame(model, new ScuflSemanticMarkupEditor( port.getMetadata()), 100, 100, 400, 600); }
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); } } } }
public void actionPerformed(ActionEvent ae) { // If the workbench is present then create and display a new // panel to configure the script engine. UIUtils.createFrame(bp.getModel(), new BeanshellConfigPanel(bp), 50, 50, 500, 600); /** * if (Workbench.workbench != null) { GenericUIComponentFrame * thing = new * GenericUIComponentFrame(Workbench.workbench.model, new * BeanshellConfigPanel(bp)); thing.setSize(400,500); * thing.setLocation(100,100); * Workbench.workbench.desktop.add(thing); thing.moveToFront(); } */ } };
public void actionPerformed(ActionEvent ae) { try { Component parent = UIUtils .getActionEventParentWindow(ae); XMLOutputSplitter splitter = new XMLOutputSplitter(); if (splitter
public void actionPerformed(ActionEvent ae) { // If the workbench is present then create and display a new // panel to configure the script engine. UIUtils.createFrame(bp.getModel(), new RservConfigPanel(bp), 100, 100, 400, 500); /** * if (Workbench.workbench != null) { GenericUIComponentFrame * thing = new * GenericUIComponentFrame(Workbench.workbench.model, new * RservConfigPanel(bp)); thing.setSize(400,500); * thing.setLocation(100,100); * Workbench.workbench.desktop.add(thing); thing.moveToFront(); } */ } };
String name = ""; Component parent = UIUtils .getActionEventParentWindow(ae); if (ae.getActionCommand().indexOf("name") != -1) { name = (String) JOptionPane.showInputDialog(parent,
public void actionPerformed(ActionEvent ae) { // If the workbench is present then create and display a new // panel to configure the script engine. UIUtils.createFrame(bp.getModel(), new BSFConfigPanel(bp), 100, 100, 400, 500); /** * if (Workbench.workbench != null) { GenericUIComponentFrame * thing = new * GenericUIComponentFrame(Workbench.workbench.model, new * BeanshellConfigPanel(bp)); thing.setSize(400,500); * thing.setLocation(100,100); * Workbench.workbench.desktop.add(thing); thing.moveToFront(); } */ } };
UIUtils.createFrame(panel, 50, 50, 600, 600); return panel;
public void executeWorkflowInGUI(String scuflWorkflow, UserContext userContext) throws Exception { setStupidLSIDProvider(); final ScuflModel model = new ScuflModel(); InputStream scufl = ClassLoader .getSystemResourceAsStream(scuflWorkflow); XScuflParser.populate(scufl, model, null); EnactorProxy enactor = FreefluoEnactorProxy.getInstance(); WorkflowInstance workflowInstance = enactor.compileWorkflow(model, new HashMap(), userContext); UIUtils.createFrame(model, new EnactorInvocation(workflowInstance), 100, 100, 600, 400); }