Package org.openbp.jaspira.event

Examples of org.openbp.jaspira.event.InteractionEvent


    if (transferables != null)
    {
      DrawingEditorPlugin modeler = (DrawingEditorPlugin) editor();

      // Create an interaction event that transports the objects we refer to
      InteractionEvent iae = new InteractionEvent(modeler, InteractionEvent.POPUP, new MultiTransferable(transferables));

      // Fire the event to the other plugins
      modeler.fireEvent(iae);

      // Create a popup menu from what the Jaspira actions the other plugins have added
      JaspiraPopupMenu menu = iae.createPopupMenu();

      if (menu != null)
      {
        // Position and display the menu
        Point location = null;
View Full Code Here


      break;

    case TOOLBAR_DYNAMIC:
      // Dynamic toolbar, broadcast interaction event.
      // The global.interaction.toolbar listeners of the receiving plugins may add entries to the toolbar.
      InteractionEvent iae = new InteractionEvent(this, InteractionEvent.TOOLBAR, null);
      fireEvent(iae);
      toolbar = iae.createToolbar();
    }

    return toolbar;
  }
View Full Code Here

   * @return The event status code
   */
  public JaspiraEventHandlerCode standard_file_new(JaspiraActionEvent jae)
  {
    // Create a popup menu containing the item types that we can display
    InteractionEvent iae = new InteractionEvent(itemBrowser, InteractionEvent.MENU, null);

    // New item group
    itemBrowser.addNewItemActions(iae);

    // Create the popup
    JaspiraPopupMenu menu = iae.createPopupMenu();
    if (menu == null)
      return EVENT_IGNORED;

    // Show the menu below the main toolbar
    JaspiraPage page = itemBrowser.getPage();
View Full Code Here

    ApplicationUtil.waitCursorOn();

    int row = tree.getRowForPath(path);
    tree.setSelectionRow(row);

    InteractionEvent iae = null;
    try
    {
      // Broadcast an interaction event to collect the popup menu entries to display
      iae = new InteractionEvent(this, InteractionEvent.POPUP, new BasicTransferable(((LeafNode) node).getLeafData()));
      fireEvent(iae);
    }
    finally
    {
      // Reset the wait cursor
      ApplicationUtil.waitCursorOff();
    }

    // Create and display the menu
    JaspiraPopupMenu menu = iae.createPopupMenu();

    // When showing the menu directly from here, the portion of the menu that overlaps the current
    // tree row gets painted, but the remainder of the menu will be painted after the tree view
    // was refreshed. In order to prevent this, we dealy the menu display until the update events
    // have been processed.
View Full Code Here

     */
    public void mouseReleased(MouseEvent e)
    {
      if (e.isPopupTrigger() && !(toolbox instanceof StandardToolBoxPlugin))
      {
        InteractionEvent iae = new InteractionEvent(toolbox, InteractionEvent.POPUP, transferable);
        toolbox.fireEvent(iae);
        JaspiraPopupMenu menu = iae.createPopupMenu();

        if (toolbox.acceptDrop())
        {
          // Add the 'Remove entry' action
          if (menu == null)
View Full Code Here

      {
        public void mouseReleased(MouseEvent me)
        {
          if (me.isPopupTrigger())
          {
            InteractionEvent iae = new InteractionEvent(JaspiraPageContainer.this, InteractionEvent.POPUP, new JaspiraPageTransferable(PageButton.this.page));
            fireEvent(iae);

            iae.createPopupMenu().show(me.getComponent(), me.getX(), me.getY());
          }
        }
      });
    }
View Full Code Here

    {
      // Turn on the wait cursor
      ApplicationUtil.waitCursorOn();
    }

    InteractionEvent iae = null;
    try
    {
      // Broadcast an interaction event to collect the popup menu entries to display
      iae = new InteractionEvent(this, InteractionEvent.POPUP, new ItemTransferable(item));
      fireEvent(iae);
    }
    finally
    {
      if (displayContextMenuWaitCursor)
      {
        // Reset the wait cursor
        ApplicationUtil.waitCursorOff();

        // Display the wait cursor for the first time only
        displayContextMenuWaitCursor = false;
      }
    }

    iae.createPopupMenu().show(comp, x, y);
  }
View Full Code Here

      public void mouseReleased(MouseEvent e)
      {
        if (e.isPopupTrigger())
        {
          // Create the popup menu for the toolbox
          InteractionEvent ie = new InteractionEvent(ToolBoxPlugin.this, "toolbox", this);
          fireEvent(ie);

          JPopupMenu pop = ie.createPopupMenu();

          if (canTitleChange())
          {
            // Add the 'change toolbox name' action
            if (pop == null)
View Full Code Here

TOP

Related Classes of org.openbp.jaspira.event.InteractionEvent

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.