Examples of JaspiraAction


Examples of org.openbp.jaspira.action.JaspiraAction

    String pageName = activePage != null ? activePage.getName() : null;

    // Create and add the menu bar
    JMenuBar mb = new JMenuBar();

    JaspiraAction root = ActionMgr.getInstance().getAction(JaspiraAction.MENU_ROOT);
    if (root.getMenuchildren() != null)
    {
      for (Iterator it = root.getMenuchildren().iterator(); it.hasNext();)
      {
        JaspiraAction action = (JaspiraAction) it.next();

        if (action.matchesPageName(pageName))
        {
          JMenuItem menuItem = action.toMenuItem(pageName);
          if (menuItem != null)
          {
            mb.add(menuItem);
          }
        }
      }
    }

    setJMenuBar(mb);

    // Clear and populate the toolbar
    toolbar.removeAll();

    root = ActionMgr.getInstance().getAction(JaspiraAction.TOOLBAR_ROOT);
    if (root.getToolbarchildren() != null)
    {
      for (Iterator it = root.getToolbarchildren().iterator(); it.hasNext();)
      {
        JaspiraAction action = (JaspiraAction) it.next();

        if (action.matchesPageName(pageName))
        {
          JComponent toolbarComponent = action.toToolBarComponent(pageName);
          if (toolbarComponent != null)
          {
            toolbar.add(toolbarComponent);
            toolbar.addSeparator();
          }
View Full Code Here

Examples of org.openbp.jaspira.action.JaspiraAction

          else
          {
            menu.addSeparator();
          }

          menu.add(new JaspiraAction(toolbox, "toolbox.remove")
          {
            public void actionPerformed(ActionEvent ae)
            {
              toolbox.removeToolBoxItem(ToolBoxItem.this);
              toolbox.refreshContent();
View Full Code Here

Examples of org.openbp.jaspira.action.JaspiraAction

   */
  public Undoable startUndoForAction(String eventName)
  {
    String displayName = null;

    JaspiraAction action = ActionMgr.getInstance().getAction(eventName);
    if (action != null)
    {
      displayName = action.getDisplayName();
    }

    return startUndo(displayName);
  }
View Full Code Here

Examples of org.openbp.jaspira.action.JaspiraAction

    add(contentPane, BorderLayout.CENTER);

    if (plugin.hasCloseButton())
    {
      JaspiraAction closeAction = new JaspiraAction(commonResourceCollection, "plugin.close")
      {
        public void actionPerformed(ActionEvent e)
        {
          plugin.requestClose();
        }
View Full Code Here

Examples of org.openbp.jaspira.action.JaspiraAction

        {
          toolbarPopup.removeAll();
        }
        toolbarPopup.add(cachedToolBar);

        JaspiraAction toolbarPopupTrigger = new JaspiraAction(commonResourceCollection, "plugin.toolbarmenu")
        {
          public void actionPerformed(ActionEvent e)
          {
            Dimension d = getToolkit().getScreenSize();
            Component c = (Component) e.getSource();
View Full Code Here

Examples of org.openbp.jaspira.action.JaspiraAction

  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

Examples of org.openbp.jaspira.action.JaspiraAction

    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

Examples of org.openbp.jaspira.action.JaspiraAction

     * @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

Examples of org.openbp.jaspira.action.JaspiraAction

  /**
   * 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

Examples of org.openbp.jaspira.action.JaspiraAction

        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
TOP
Copyright © 2018 www.massapi.com. 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.