Package org.openbp.jaspira.action

Examples of org.openbp.jaspira.action.JaspiraAction$PriorityComparator


  protected void pluginInstalled()
  {
    super.pluginInstalled();

    // Update button status
    JaspiraAction action;
    action = getAction("modelerpage.view.controlanchor");
    if (action != null)
    {
      action.setSelected(!ViewModeMgr.getInstance().isControlAnchorVisible());
    }
    action = getAction("modelerpage.view.controltoggle");
    if (action != null)
    {
      action.setSelected(!ViewModeMgr.getInstance().isControlLinkVisible());
    }
    action = getAction("modelerpage.view.datatoggle");
    if (action != null)
    {
      action.setSelected(!ViewModeMgr.getInstance().isDataLinkVisible());
    }

    backwardAction = getAction("modelerpage.view.processback");
    forwardAction = getAction("modelerpage.view.processforward");
View Full Code Here


    public void actionPerformed(ActionEvent e)
    {
      JaspiraToolbarButton button = (JaspiraToolbarButton) e.getSource();

      JaspiraAction action = button.getJaspiraAction();

      // Toggle
      boolean selected = !action.isSelected();

      String itemType = itd.getItemType();
      if (selected)
        addItemType(itemType);
      else
        removeItemType(itemType);

      action.setSelected(selected);

      // Apply the new filter settings
      apply();
    }
View Full Code Here

     * @param je Event
     * @return The event status code
     */
    public JaspiraEventHandlerCode showzoomfactor(JaspiraEvent je)
    {
      JaspiraAction action = getAction("modelerpage.view.zoomfactor");
      if (action != null)
      {
        Double factor = (Double) je.getObject();
        if (factor != null)
        {
          action.putValue(JaspiraToolbarCombo.PROPERTY_TEXT, "" + CommonUtil.rnd(factor.doubleValue() * 100) + " %");
          action.setEnabled(true);
        }
        else
        {
          action.putValue(JaspiraToolbarCombo.PROPERTY_TEXT, null);
          action.setEnabled(false);
        }
      }

      return EVENT_CONSUMED;
    }
View Full Code Here

  /**
   * Updates the status of the save button according to the modification state of the process.
   */
  public void updateModificationState()
  {
    JaspiraAction action = ActionMgr.getInstance().getAction("standard.file.save");
    if (action != null)
    {
      action.setEnabled(process.isModified());
    }
  }
View Full Code Here

        extractModelObject(core);
      }

      if (contextModelObject != null)
      {
        JaspiraAction group = new JaspiraAction("popup.finder", null, null, null, null, 120, JaspiraAction.TYPE_GROUP);
        group.addMenuChild(findReferenceAction);
        ie.add(group);

        return EVENT_HANDLED;
      }
View Full Code Here

   */
  private void createActions()
  {
    actions = new JaspiraAction [NACTIONS];

    actions [ACTION_INDEX_ADD] = new JaspiraAction(resourceCollection, "propertybrowser.addelement")
    {
      public void actionPerformed(ActionEvent ae)
      {
        // Add a new node to the collection
        final AbstractNode newPos = addNewNode();
        if (newPos != null)
        {
          // Set the focus to the edit column of the next row (usually the 'name' field of the new node)
          // Adding a new node caused a model change, so select after all model change events have been processed.
          // (Don't ask, it works...)
          SwingUtilities.invokeLater(new Runnable()
          {
            public void run()
            {
              SwingUtilities.invokeLater(new Runnable()
              {
                public void run()
                {
                  selectNode(newPos, 1, 1);
                }
              });
            }
          });
        }
      }
    };

    actions [ACTION_INDEX_COPY] = new JaspiraAction(resourceCollection, "propertybrowser.copyelement")
    {
      public void actionPerformed(ActionEvent ae)
      {
        // Copy the node contents to the clipboard
        copyNode();

        // We have copied something, make sure the paste action reflects this.
        updateActionState();
      }
    };

    actions [ACTION_INDEX_CUT] = new JaspiraAction(resourceCollection, "propertybrowser.cutelement")
    {
      public void actionPerformed(ActionEvent ae)
      {
        // Copy the node contents to the clipboard
        copyNode();

        // Remove the node from the collection
        AbstractNode newPos = removeNode();
        if (newPos != null)
        {
          // Set the focus to the edit column of the next row (usually the 'name' field of the new node)
          selectNode(newPos, 0, 0);
        }

        // We have copied something, make sure the paste action reflects this.
        updateActionState();
      }
    };

    actions [ACTION_INDEX_PASTE] = new JaspiraAction(resourceCollection, "propertybrowser.pasteelement")
    {
      public void actionPerformed(ActionEvent ae)
      {
        // Paste an element from the clipboard to a new node of the collection
        final AbstractNode newPos = pasteNode();
        if (newPos != null)
        {
          // Set the focus to the edit column of the next row (usually the 'name' field of the new node)
          // Adding a new node caused a model change, so select after all model change events have been processed.
          // (Don't ask, it works...)
          SwingUtilities.invokeLater(new Runnable()
          {
            public void run()
            {
              SwingUtilities.invokeLater(new Runnable()
              {
                public void run()
                {
                  selectNode(newPos, 1, 1);
                }
              });
            }
          });
        }
      }
    };

    actions [ACTION_INDEX_REMOVE] = new JaspiraAction(resourceCollection, "propertybrowser.removeelement")
    {
      public void actionPerformed(ActionEvent ae)
      {
        // Remove the node from the collection
        AbstractNode newPos = removeNode();
        if (newPos != null)
        {
          // Set the focus to the edit column of the next row (usually the 'name' field of the new node)
          selectNode(newPos, 0, 0);
        }
      }
    };

    actions [ACTION_INDEX_MOVEUP] = new JaspiraAction(resourceCollection, "propertybrowser.moveelementup")
    {
      public void actionPerformed(ActionEvent ae)
      {
        // Move the node one position up in the collection
        moveNodeUp();
      }
    };

    actions [ACTION_INDEX_MOVEDOWN] = new JaspiraAction(resourceCollection, "propertybrowser.moveelementdown")
    {
      public void actionPerformed(ActionEvent ae)
      {
        // Move the node one position down in the collection
        moveNodeDown();
View Full Code Here

    actionMap.setParent(SwingUtilities.getUIActionMap(this));

    // Enter the key bindings of our actions in the maps
    for (int i = 0; i < actions.length; ++i)
    {
      JaspiraAction action = actions [i];

      KeySequence [] sequences = action.getKeySequences();
      if (sequences != null)
      {
        for (int is = 0; is < sequences.length; ++is)
        {
          KeySequence sequence = sequences [is];
View Full Code Here

    {
      toolbar = new JaspiraToolbar();

      toolbar.add(filterMgr.getFilterToolbar());

      JaspiraAction action = getAction("plugin.itembrowser.togglefunctionalgroup");
      if (action != null)
      {
        toolbar.addSeparator();
        action.setEnabled(true);
        toolbar.add(action);
      }
    }

    return toolbar;
View Full Code Here

    saveDisabled = false;

    // Enable the save button
    if (!saveImmediately)
    {
      JaspiraAction action = ActionMgr.getInstance().getAction("standard.file.save");
      if (action != null)
        action.setEnabled(objectModified);
    }
  }
View Full Code Here

      boolean haveModel = ie.isDataFlavorSupported(ClientFlavors.MODEL);
      boolean haveItem = ie.isDataFlavorSupported(ClientFlavors.ITEM);
      boolean haveProcess = ie.isDataFlavorSupported(ClientFlavors.PROCESS_ITEM);

      JaspiraAction group;

      if (isMenu)
      {
        // New item group
        group = new JaspiraAction(ItemBrowserPlugin.this, "submenu.new");

        addNewItemActions(group);

        ie.add(group);
      }

      // Manage items group
      group = new JaspiraAction("popup.itembrowser.manage", null, null, null, null, 1, JaspiraAction.TYPE_GROUP);

      if (removeAction != null)
      {
        if (isMenu)
        {
          if (isPopup && (haveModel | haveItem))
          {
            group.addMenuChild(removeAction);
          }
        }
        else
        {
          group.addToolbarChild(removeAction);
        }
      }

      ie.add(group);

      // Item extras group
      group = new JaspiraAction("popup.itembrowser.extras", null, null, null, null, 2, JaspiraAction.TYPE_GROUP);

      if (isMenu)
      {
        if (isPopup && (haveModel | haveProcess))
        {
          if (runAction != null)
          {
            group.addMenuChild(runAction);
          }
        }
      }
      else
      {
        if (runAction != null)
        {
          group.addToolbarChild(runAction);
        }
      }

      ie.add(group);
View Full Code Here

TOP

Related Classes of org.openbp.jaspira.action.JaspiraAction$PriorityComparator

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.