Package com.eviware.soapui.support.propertyexpansion.scrollmenu

Examples of com.eviware.soapui.support.propertyexpansion.scrollmenu.ScrollableMenu


      targetMenu.add( createPropertyMenu( "SecurityTest: [" + securityTest.getName() + "]", securityTest ) );
  }

  private JMenu createPropertyMenu( String string, TestPropertyHolder holder )
  {
    ScrollableMenu menu = new ScrollableMenu( string );

    if( holder instanceof TestModelItem )
      menu.setIcon( ( ( TestModelItem )holder ).getIcon() );

    String[] propertyNames = holder.getPropertyNames();

    for( String name : propertyNames )
    {
      menu.add( new TransferFromPropertyActionInvoker( holder, name ) );
    }

    if( holder instanceof MutableTestPropertyHolder )
    {
      menu.addHeader( new TransferFromPropertyActionInvoker( ( MutableTestPropertyHolder )holder ) );
    }

    return menu;
  }
View Full Code Here


    }
  }

  public static void addMenu( JPopupMenu popup, String menuName, ModelItem item, PropertyExpansionTarget component )
  {
    ScrollableMenu menu = new ScrollableMenu( menuName );
    popup.add( menu );
    popup.addPopupMenuListener( new PropertyExpansionPopupListener( menu, item, component ) );
  }
View Full Code Here

    JPopupMenu popup = groovyEditor.getEditArea().getComponentPopupMenu();

    if( popup != null )
    {
      ScrollableMenu menu = new ScrollableMenu( "Get Data.." );
      popup.insert( menu, 0 );
      popup.addPopupMenuListener( new PropertyExpansionPopupListener( menu, target.getContextModelItem(), target ) );
      popup.insert( new JSeparator(), 1 );
    }
  }
View Full Code Here

            targetMenu.add(createPropertyMenu("SecurityTest: [" + securityTest.getName() + "]", securityTest));
        }
    }

    private JMenu createPropertyMenu(String string, TestPropertyHolder holder) {
        ScrollableMenu menu = new ScrollableMenu(string);

        if (holder instanceof TestModelItem) {
            menu.setIcon(((TestModelItem) holder).getIcon());
        }

        String[] propertyNames = holder.getPropertyNames();

        for (String name : propertyNames) {
            menu.add(new TransferFromPropertyActionInvoker(holder, name));
        }

        if (holder instanceof MutableTestPropertyHolder) {
            menu.addHeader(new TransferFromPropertyActionInvoker((MutableTestPropertyHolder) holder));
        }

        return menu;
    }
View Full Code Here

        Matcher matcher = pattern.matcher(userSelectedValue);
        return matcher.matches();
    }

    public static void addMenu(JPopupMenu popup, String menuName, ModelItem item, PropertyExpansionTarget component) {
        ScrollableMenu menu = new ScrollableMenu(menuName);
        menu.setName(menuName);
        boolean contains = false;
        for (int i = 0; i < popup.getComponentCount(); i++) {
            if (menu.getName() != null && menu.getName().equals(popup.getComponent(i).getName())) {
                contains = true;
                break;
            }
        }
        if (!contains) {
View Full Code Here

        dropTarget.setDefaultActions(DnDConstants.ACTION_COPY_OR_MOVE);

        JPopupMenu popup = groovyEditor.getEditArea().getComponentPopupMenu();

        if (popup != null) {
            ScrollableMenu menu = new ScrollableMenu("Get Data..");
            popup.insert(menu, 0);
            popup.addPopupMenuListener(new PropertyExpansionPopupListener(menu, target.getContextModelItem(), target));
            popup.insert(new JSeparator(), 1);
        }
    }
View Full Code Here

TOP

Related Classes of com.eviware.soapui.support.propertyexpansion.scrollmenu.ScrollableMenu

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.