Package org.eclipse.swt.dnd

Examples of org.eclipse.swt.dnd.DragSource


        // not needed
      }

    });

    DragSource dragSource = new DragSource(getSourceViewer().getTextWidget(), DND.DROP_COPY);

    Transfer[] types = new Transfer[] { FeatureStructureTransfer.getInstance() };

    dragSource.setTransfer(types);

    dragSource.addDragListener(new FeatureStructureDragListener(getSourceViewer().getTextWidget()));

    getSite().getPage().addSelectionListener(this);

    getSourceViewer().getTextWidget().setEditable(false);
    getSourceViewer().setEditable(false);
View Full Code Here


    //installTextDragAndDrop(getSourceViewer());
    CFEDragDropListener ddListener = new CFEDragDropListener(this,
        (ProjectionViewer) this.getSourceViewer(), SelectionCursorListener);
    IDragAndDropService dtSvc = (IDragAndDropService) getSite().getService(IDragAndDropService.class);
    dtSvc.addMergedDropTarget(tw, operations, transfers, ddListener);
    final DragSource source= new DragSource(tw, DND.DROP_COPY | DND.DROP_MOVE);
    source.setTransfer(new Transfer[] {TextTransfer.getInstance()});
    source.addDragListener(ddListener);     
  }
View Full Code Here

    StyledText st= getSourceViewer().getTextWidget();
    if(st != null) {     
      dndService.removeMergedDropTarget(st);
     
      DragSource dragSource= (DragSource)st.getData(DND.DRAG_SOURCE_KEY);
      if (dragSource != null) {
        dragSource.dispose();
        st.setData(DND.DRAG_SOURCE_KEY, null);
      }
    }
    //Remove the listener
    if(SelectionCursorListener!=null){     
View Full Code Here

        }
        return null;
      }

    });
    final DragSource dragSource = new DragSource(gallery, DND.DROP_COPY);
    dragSource.setTransfer(new Transfer[] { FileTransfer.getInstance() });
    dragSource.addDragListener(new DragSourceListener() {

      private String[] dataX;

      public void dragFinished(DragSourceEvent event) {
        this.dataX = null;
View Full Code Here

   * @see org.eclipse.swt.dnd.DND
   */
  public void addDragSupport(int operations, Transfer[] transferTypes, DragSourceListener listener) {

    Control myControl = getControl();
    final DragSource dragSource = new DragSource(myControl, operations);
    dragSource.setTransfer(transferTypes);
    dragSource.addDragListener(listener);
  }
View Full Code Here

    {
        if ( ConnectionTransfer.getInstance().isSupportedType( event.dataType ) )
        {
            if ( event.widget instanceof DragSource )
            {
                DragSource dragSource = ( DragSource ) event.widget;
                if ( dragSource.getControl() instanceof Table )
                {
                    Table table = ( Table ) dragSource.getControl();
                    TableItem[] items = table.getSelection();
                    List<IConnection> connectionList = new ArrayList<IConnection>();
                    for ( int i = 0; i < items.length; i++ )
                    {
                        if ( items[i].getData() instanceof IConnection )
View Full Code Here

    {
        if ( ConnectionTransfer.getInstance().isSupportedType( event.dataType ) )
        {
            if ( event.widget instanceof DragSource )
            {
                DragSource dragSource = ( DragSource ) event.widget;
                if ( dragSource.getControl() instanceof Table )
                {
                    Table table = ( Table ) dragSource.getControl();
                    TableItem[] items = table.getSelection();
                    List connectionList = new ArrayList();
                    for ( int i = 0; i < items.length; i++ )
                    {
                        if ( items[i].getData() instanceof IConnection )
View Full Code Here

TOP

Related Classes of org.eclipse.swt.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.