Package org.openbp.core.model.item.process

Examples of org.openbp.core.model.item.process.ProcessItem


    // Search all nodesockets for the datatype
    Iterator processes = model.getItems(ItemTypes.PROCESS);
    while (processes.hasNext())
    {
      ProcessItem process = (ProcessItem) processes.next();
      Iterator nodes = process.getNodes();
      while (nodes.hasNext())
      {
        Node node = (Node) nodes.next();
        List modelObjects = findInNode(node, item);
        if (modelObjects.size() != 0)
View Full Code Here


   * @param context Generator context
   */
  public void updateItemStructure(GeneratorContext context)
  {
    // For new items, set up default entry and final nodes according to the process type
    ProcessItem process = (ProcessItem) context.getItem();

    if (! process.getNodes().hasNext())
    {
      // Initialize empty processes
      // Determine which skin the process should use and initialize some process properties from the skin settings
      Skin processSkin = FigureUtil.determineProcessSkin(process);
      processSkin.initalizeNewProcess(process);
View Full Code Here

    {
      scaleFactor = currentModeler.getDrawingView().getScaleFactor();
    }

    // Load the process
    ProcessItem process = (ProcessItem) ModelConnector.getInstance().getItemByQualifier(qualifier, true);

    // Create a modeler instance and its associated drawing view
    Modeler modeler = (Modeler) PluginMgr.getInstance().createInstance(Modeler.class, this);
    try
    {
View Full Code Here

  public void setNode(Node node)
  {
    clipboardSupport = new ClipboardSupport(workspaceView, getPluginResourceCollection(), true);

    // Get the node's dummy process
    ProcessItem process = node.getProcess();
    drawing = new ProcessDrawing(process, this);

    // In the component editor, we always display parameters and flow connectors
    drawing.setDisplayAll(true);
View Full Code Here

     */
    public JaspiraEventHandlerCode popup(InteractionEvent ie)
    {
      if (ie.isDataFlavorSupported(ClientFlavors.PROCESS_ITEM))
      {
        final ProcessItem process = (ProcessItem) ie.getSafeTransferData(ClientFlavors.PROCESS_ITEM);

        JaspiraAction action = new JaspiraAction(ImageExportPlugin.this, "export")
        {
          public void actionPerformed(ActionEvent ae)
          {
            int type = OptionMgr.getInstance().getIntegerOption("imageexporter.imagetype", SupportedImageTypes.DEFAULT);
            final String typeName = (String) SupportedImageTypes.NAME_BY_IMAGE_TYPE.get(new Integer(type));
            final String ext = "." + typeName;

            JFileChooser jfc = new JFileChooser();
            jfc.setFileFilter(new FileFilter()
            {
              /**
               * @see javax.swing.filechooser.FileFilter#accept(java.io.File)
               */
              public boolean accept(File f)
              {
                String fileName = f.getName();
                if (fileName.endsWith(ext))
                  return true;
                return false;
              }

              /**
               * @see javax.swing.filechooser.FileFilter#getDescription()
               */
              public String getDescription()
              {
                return typeName.toUpperCase() + " Files";
              }
            });

            String fileName = process.getName() + ext;
            jfc.setSelectedFile(new File(fileName));

            int result = jfc.showSaveDialog(null);
            if (result == JFileChooser.APPROVE_OPTION)
            {
View Full Code Here

          {
            createEditorJaspiraPage(getContentPanel());
          }

          // Convert the item to its respective node and add it to a dummy process
          ProcessItem dummyProcess = new ProcessItemImpl();
          dummyProcess.setName(NODEEDITOR_PROCESS_NAME);
          dummyProcess.setModel(item.getModel());

          // Determine which skin the process should use and initialize some process properties from the skin settings
          Skin processSkin = FigureUtil.determineProcessSkin(dummyProcess);
          processSkin.initalizeNewProcess(dummyProcess);

          node = ((NodeProvider) item).toNode(dummyProcess, ItemSynchronization.SYNC_ALL);

          dummyProcess.addNode(node);

          // Make the item editor display the node
          editorJaspiraPage.setNode(node);
        }
        finally
View Full Code Here

TOP

Related Classes of org.openbp.core.model.item.process.ProcessItem

Copyright © 2018 www.massapicom. 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.