Package com.eviware.soapui.model.tree

Examples of com.eviware.soapui.model.tree.SoapUITreeNode


  public Component getRenderer( ModelItem modelItem )
  {
    TreePath treePath = SoapUI.getNavigator().getTreePath( modelItem );
    int row = getTree().getRowForPath( treePath );
    SoapUITreeNode treeNode = ( SoapUITreeNode )treePath.getLastPathComponent();

    return getTree().getCellRenderer().getTreeCellRendererComponent( getTree(), treeNode, true,
        getTree().isExpanded( row ), treeNode.isLeaf(), row, true );
  }
View Full Code Here


      if( selectionPath == null || mainTree.getSelectionCount() == 0 )
        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
View Full Code Here

    public void valueChanged( TreeSelectionEvent e )
    {
      Object obj = e.getPath().getLastPathComponent();
      if( obj instanceof SoapUITreeNode )
      {
        SoapUITreeNode treeNode = ( SoapUITreeNode )obj;

        if( !listeners.isEmpty() )
        {
          TreePath newPath = e.getNewLeadSelectionPath();
          NavigatorListener[] array = listeners.toArray( new NavigatorListener[listeners.size()] );
View Full Code Here

          return;

        if( path == null || mainTree.getRowForPath( path ) != row )
          mainTree.setSelectionRow( row );

        SoapUITreeNode node = ( SoapUITreeNode )path.getLastPathComponent();
        actions = node.getActions();
        if( actions != null )
        {
          SwingUtilities.invokeLater( new Runnable()
          {
            public void run()
View Full Code Here

            collapsePopup.show( mainTree, e.getX(), e.getY() );
          }

          return;
        }
        SoapUITreeNode node = ( SoapUITreeNode )path.getLastPathComponent();

        JPopupMenu popupMenu = node.getPopup();
        if( popupMenu == null )
          return;

        mainTree.setSelectionPath( path );

        popupMenu.show( mainTree, e.getX(), e.getY() );
      }
      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
View Full Code Here

        {
          String str = item.getName() + " [";

          for( int c = 1; c < treePath.getPathCount(); c++ )
          {
            SoapUITreeNode comp = ( SoapUITreeNode )treePath.getPathComponent( c );
            if( comp.getModelItem() instanceof EmptyModelItem )
              continue;

            if( c > 1 )
              str += " - ";

            str += comp.toString();
          }

          str += "]";

          label.setText( str );
View Full Code Here

      getTreeModel().notifyNodeInserted( testCaseTreeNode );
    }

    public void testCaseRemoved( TestCase testCase )
    {
      SoapUITreeNode treeNode = getTreeModel().getTreeNode( testCase );
      if( testCaseNodes.contains( treeNode ) )
      {
        getTreeModel().notifyNodeRemoved( treeNode );
        testCaseNodes.remove( treeNode );
        testCase.removePropertyChangeListener( propertyChangeListener );
View Full Code Here

    getTreeModel().notifyNodeInserted( requestTreeNode );
  }

  public void requestRemoved( Request request )
  {
    SoapUITreeNode requestTreeNode = getTreeModel().getTreeNode( request );
    if( requestNodes.contains( requestTreeNode ) )
    {
      getTreeModel().notifyNodeRemoved( requestTreeNode );
      requestNodes.remove( requestTreeNode );
      request.removePropertyChangeListener( propertyChangeListener );
View Full Code Here

      getTreeModel().notifyNodeInserted( interfaceTreeNode );
    }

    public void interfaceRemoved( Interface iface )
    {
      SoapUITreeNode treeNode = getTreeModel().getTreeNode( iface );
      if( interfaceNodes.contains( treeNode ) )
      {
        getTreeModel().notifyNodeRemoved( treeNode );
        interfaceNodes.remove( treeNode );
      }
View Full Code Here

      getTreeModel().notifyNodeInserted( testSuiteNode );
    }

    public void testSuiteRemoved( TestSuite testSuite )
    {
      SoapUITreeNode treeNode = getTreeModel().getTreeNode( testSuite );
      if( testSuiteNodes.contains( treeNode ) )
      {
        getTreeModel().notifyNodeRemoved( treeNode );
        testSuiteNodes.remove( treeNode );
      }
View Full Code Here

TOP

Related Classes of com.eviware.soapui.model.tree.SoapUITreeNode

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.