Package com.eviware.soapui.support.action.swing

Examples of com.eviware.soapui.support.action.swing.ActionList


        return;

      if( mainTree.getSelectionCount() == 1 )
      {
        SoapUITreeNode lastPathComponent = ( SoapUITreeNode )selectionPath.getLastPathComponent();
        ActionList actions = lastPathComponent.getActions();
        if( actions != null )
        {
          actions.dispatchKeyEvent( e );
        }

        if( !e.isConsumed() )
        {
          KeyStroke ks = KeyStroke.getKeyStrokeForEvent( e );
          if( ks.equals( UISupport.getKeyStroke( "alt C" ) ) )
          {
            mainTree.collapsePath( selectionPath );
            e.consume();
          }
          else if( ks.equals( UISupport.getKeyStroke( "alt E" ) ) )
          {
            mainTree.collapsePath( selectionPath );
            int row = mainTree.getSelectionRows()[0];
            TreePath nextPath = mainTree.getPathForRow( row + 1 );

            TreePath path = mainTree.getPathForRow( row );
            while( path != null && !path.equals( nextPath ) )
            {
              mainTree.expandRow( row );
              path = mainTree.getPathForRow( ++row );
            }

            e.consume();
          }
        }
      }
      else
      {
        TreePath[] selectionPaths = mainTree.getSelectionPaths();
        List<ModelItem> targets = new ArrayList<ModelItem>();
        for( TreePath treePath : selectionPaths )
        {
          SoapUITreeNode node = ( SoapUITreeNode )treePath.getLastPathComponent();
          targets.add( node.getModelItem() );
        }

        if( targets.size() > 0 )
        {
          ActionList actions = ActionListBuilder
              .buildMultiActions( targets.toArray( new ModelItem[targets.size()] ) );
          if( actions.getActionCount() > 0 )
          {
            actions.dispatchKeyEvent( e );
          }
        }
      }
    }
View Full Code Here


          targets.add( node.getModelItem() );
        }

        if( targets.size() > 0 )
        {
          ActionList actions = ActionListBuilder
              .buildMultiActions( targets.toArray( new ModelItem[targets.size()] ) );
          if( actions.getActionCount() > 0 )
          {
            JPopupMenu popup = new JPopupMenu();
            ActionSupport.addActions( actions, popup );
            popup.show( mainTree, e.getX(), e.getY() );
          }
View Full Code Here

    int selectedIndex = list.getSelectedRow();
    if( selectedIndex == -1 )
      return;

    ActionList actions = getActionsForRow( list, selectedIndex );

    if( actions != null )
      actions.performDefaultAction( new ActionEvent( this, 0, null ) );
  }
View Full Code Here

    if( list.getSelectedRow() != row )
    {
      list.setRowSelectionInterval( row, row );
    }

    ActionList actions = getActionsForRow( list, row );

    if( actions == null || actions.getActionCount() == 0 )
      return;

    JPopupMenu popup = menu == null ? ActionSupport.buildPopup( actions ) : menu;
    UISupport.showPopup( popup, list, e.getPoint() );
  }
View Full Code Here

      return;

    if( ix.length == 1 )
    {
      ModelItem modelItem = getModelItemAt( ix[0] );
      ActionList actions = ActionListBuilder.buildActions( modelItem );
      if( actions != null )
        actions.dispatchKeyEvent( e );
    }
    else
    {
      ModelItem[] modelItems = new ModelItem[ix.length];

      for( int c = 0; c < ix.length; c++ )
        modelItems[c] = getModelItemAt( ix[c] );

      ActionList actions = ActionListBuilder.buildMultiActions( modelItems );
      if( actions != null )
        actions.dispatchKeyEvent( e );
    }
  }
View Full Code Here

    JList list = ( JList )e.getSource();

    int selectedIndex = list.getSelectedIndex();

    ActionList actions = selectedIndex == -1 ? getDefaultActions() : getActionsForRow( list, selectedIndex );

    if( actions != null )
      actions.performDefaultAction( new ActionEvent( this, 0, null ) );
  }
View Full Code Here

  public void showPopup( MouseEvent e )
  {
    if( !enablePopup )
      return;

    ActionList actions = null;
    JList list = ( JList )e.getSource();
    int row = list.locationToIndex( e.getPoint() );
    if( row == -1 || !list.getCellBounds( row, row ).contains( e.getPoint() ) )
    {
      if( list.getSelectedIndex() != -1 )
        list.clearSelection();

      actions = getDefaultActions();
    }
    else
    {
      if( list.getSelectedIndex() != row )
      {
        list.setSelectedIndex( row );
      }

      actions = getActionsForRow( list, row );
    }

    if( actions == null || actions.getActionCount() == 0 )
      return;

    JPopupMenu popup = menu == null ? ActionSupport.buildPopup( actions ) : menu;
    UISupport.showPopup( popup, list, e.getPoint() );
  }
View Full Code Here

    int row = logTable.convertRowIndexToModel( selectedRow );
    if( row < 0 )
      return;

    LoadTestLogEntry entry = ( LoadTestLogEntry )loadTestLog.getElementAt( row );
    ActionList actions = entry.getActions();

    if( actions == null || actions.getActionCount() == 0 )
      return;

    JPopupMenu popup = ActionSupport.buildPopup( actions );
    popup.setInvoker( logTable );
View Full Code Here

      TestStepResult result = logListModel.getResultAt( row );
      if( result == null )
        return;

      ActionList actions = result.getActions();

      if( actions == null || actions.getActionCount() == 0 )
        return;

      JPopupMenu popup = ActionSupport.buildPopup( actions );
      UISupport.showPopup( popup, testLogList, e.getPoint() );
    }
View Full Code Here

        int row = logTable.convertRowIndexToModel( selectedRow );
        if( row < 0 )
          return;

        LoadTestLogEntry entry = ( LoadTestLogEntry )loadTestLog.getElementAt( row );
        ActionList actions = entry.getActions();
        if( actions != null )
          actions.performDefaultAction( new ActionEvent( logTable, 0, null ) );
      }
    }
View Full Code Here

TOP

Related Classes of com.eviware.soapui.support.action.swing.ActionList

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.