Package java.awt.dnd

Examples of java.awt.dnd.DragSource


        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,
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,
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

    // set up node icons
    setCellRenderer(new HierarchicTreeCellRenderer());

    // initializes the DropTarget and DragSource.
    dropTarget = new DropTarget(this, this);
    dragSource = new DragSource();
    dragSource.createDefaultDragGestureRecognizer(this,
        DnDConstants.ACTION_MOVE, this);

    // initializes other features
    this.setRootVisible(false);
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

    }

    private TableTransferHandler( JTable table, FolderPanel.FolderModel model, int action ) {
        this.table = table;
        this.sourceModel = model;
        dragSource = new DragSource();
        dragSource.createDefaultDragGestureRecognizer( table, action, this );
//    dt = new DropTarget(table, this);
    }
View Full Code Here

    JTree sourceTree;

    public TreeDragSource(JTree tree, int actions) {
        sourceTree = tree;
        source = new DragSource();
        recognizer = source.createDefaultDragGestureRecognizer(sourceTree,
                actions, 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

  void addDragListener(final DragGestureListener dgl) {
    if (dgl == null) {
      return;
    }
    final DragSource dragSource = DragSource.getDefaultDragSource();
    dragSource.createDefaultDragGestureRecognizer(getMainView(), DnDConstants.ACTION_COPY
            | DnDConstants.ACTION_MOVE | DnDConstants.ACTION_LINK, dgl);
  }
View Full Code Here

        originalForeground = getForeground();

        setDragEnabled(true);
        setTransferHandler(new URLTransferHandler());

        DragSource ds = new DragSource();
        ds.createDefaultDragGestureRecognizer(this, DnDConstants.ACTION_COPY, new DragGestureListener()
        {
            public void dragGestureRecognized(final DragGestureEvent dge)
            {
                TransferHandler th = getTransferHandler();
                th.exportAsDrag(LinkExtendedLabel.this, dge.getTriggerEvent(), DnDConstants.ACTION_COPY);
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.