Package java.awt.dnd

Examples of java.awt.dnd.DragSource


           
            JLabel label = new InformationValueLabel((value), new ImageIcon(img), JLabel.LEFT);
            contentPanel.add(label);
            lablesForEachValue.put(value, label);
           
            DragSource dragSource = DragSource.getDefaultDragSource();
            dragSource.createDefaultDragGestureRecognizer(
              label, // component where drag originates
              DnDConstants.ACTION_COPY_OR_MOVE, // actions
              new DragGestureListener(){
                /**
                 * start of D&D framework implementation
View Full Code Here


                t, null);
      }

    };

    DragSource dragSource = new DragSource();
    dragSource.createDefaultDragGestureRecognizer(entry,
        DnDConstants.ACTION_COPY, dragGestureListener);

    add(entry);
  }
View Full Code Here

    desktop.addDesktopListener( internalDesktopListener );

    ToolTipManager.sharedInstance().setInitialDelay( 200 );

    JTree mainTree = navigator.getMainTree();
    DragSource dragSource = DragSource.getDefaultDragSource();
    SoapUIDragAndDropHandler navigatorDragAndDropHandler = new SoapUIDragAndDropHandler(
        new NavigatorDragAndDropable( mainTree ), DropType.ON + DropType.AFTER );

    dragSource.createDefaultDragGestureRecognizer( mainTree, DnDConstants.ACTION_COPY_OR_MOVE,
        navigatorDragAndDropHandler );

    desktop.init();
  }
View Full Code Here

    progressBarAdapter = new ProgressBarTestCaseAdapter( progressBar, testCase );
    testMonitorListener = new InternalTestMonitorListener();

    SoapUI.getTestMonitor().addTestMonitorListener( testMonitorListener );

    DragSource dragSource = DragSource.getDefaultDragSource();
    SoapUIDragAndDropHandler dragAndDropHandler = new SoapUIDragAndDropHandler( new ModelItemListDragAndDropable(
        getTestStepList().getTestStepList(), testCase ), DropType.BEFORE_AND_AFTER );

    dragSource.createDefaultDragGestureRecognizer( getTestStepList().getTestStepList(),
        DnDConstants.ACTION_COPY_OR_MOVE, dragAndDropHandler );
    // needed for synchronizing with loadUI
    this.testCase = testCase;
  }
View Full Code Here

    ActionList actions = ActionListBuilder.buildActions( testSuite );
    actions.removeAction( 0 );
    actions.removeAction( 0 );
    setComponentPopupMenu( ActionSupport.buildPopup( actions ) );

    DragSource dragSource = DragSource.getDefaultDragSource();

    SoapUIDragAndDropHandler dragAndDropHandler = new SoapUIDragAndDropHandler(
        new TestCaseListDragAndDropable( this ), DropType.AFTER );

    dragSource.createDefaultDragGestureRecognizer( this, DnDConstants.ACTION_COPY_OR_MOVE, dragAndDropHandler );
  }
View Full Code Here

  protected TestCaseListPanel createTestCaseListPanel( TestCase testCase )
  {
    TestCaseListPanel testCaseListPanel = new TestCaseListPanel( ( WsdlTestCase )testCase );

    DragSource dragSource = DragSource.getDefaultDragSource();

    SoapUIDragAndDropHandler dragAndDropHandler = new SoapUIDragAndDropHandler( new TestCaseListPanelDragAndDropable(
        testCaseListPanel ), DropType.BEFORE_AND_AFTER );

    dragSource.createDefaultDragGestureRecognizer( testCaseListPanel, DnDConstants.ACTION_COPY_OR_MOVE,
        dragAndDropHandler );

    return testCaseListPanel;
  }
View Full Code Here

    ActionList actions = ActionListBuilder.buildActions( testSuite );
    actions.removeAction( 0 );
    actions.removeAction( 0 );
    setComponentPopupMenu( ActionSupport.buildPopup( actions ) );

    DragSource dragSource = DragSource.getDefaultDragSource();

    SoapUIDragAndDropHandler dragAndDropHandler = new SoapUIDragAndDropHandler( new TestSuiteListDragAndDropable(
        this ), DropType.AFTER );

    dragSource.createDefaultDragGestureRecognizer( this, DnDConstants.ACTION_COPY_OR_MOVE, dragAndDropHandler );
  }
View Full Code Here

  public DNDList( ListModel dataModel )
  {
    super( dataModel );
    dropTarget = new DropTarget( this, this );
    dragSource = new DragSource();
    dragSource.createDefaultDragGestureRecognizer( this, DnDConstants.ACTION_MOVE, this );
  }
View Full Code Here

        DragGestureListener dragGestureListener = new DragGestureListener() {
            public void dragGestureRecognized(DragGestureEvent event) {
                ComponentSelector.this.dragGestureRecognized(event);
            }
        };
        DragSource dragSource = DragSource.getDefaultDragSource();
        dragSource.createDefaultDragGestureRecognizer(this.tree, DnDConstants.ACTION_COPY_OR_MOVE, dragGestureListener);

        this.dragSourceListener = new DragSourceAdapter() {
            // Overwrite some methods when needed.
        };
View Full Code Here

        menuBar.add(uiMenu);
        menuBar.add(helpMenu);
        this.setJMenuBar(menuBar);
       
        //���infoExplorerUI��dragЧ��
        DragSource dragSource = DragSource.getDefaultDragSource();
        DragGestureListener infoExplorerUIDragGestureListener = (DragGestureListener) infoExplorerNGObject.getInterface(de.FeatureModellingTool.InfoExplorer.Manager.DRAGGESTURELISTENER_INTERFACE);
        dragSource.createDefaultDragGestureRecognizer(infoExplorerUI, DnDConstants.ACTION_LINK, infoExplorerUIDragGestureListener);
        //
       
        //���graphicalEditor��dropЧ��
        DropTarget dropTarget = new DropTarget(null, DnDConstants.ACTION_LINK, graphicalEditorDropTargetListener, true, null);
        graphicalEditor.getContext().putValue(de.FeatureModellingTool.GraphicalEditor.ConstantDefinition.DROP_TARGET, dropTarget);
View Full Code Here

TOP

Related Classes of java.awt.dnd.DragSource

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.