Examples of DragSource


Examples of java.awt.dnd.DragSource

        component.validate();
        component.repaint();
    }

    public static void registerDragGesture(Component c, DragGesture dragGesture) {
        DragSource dragSource = new DragSource();
        dragSource.createDefaultDragGestureRecognizer(c, DnDConstants.ACTION_MOVE, dragGesture);
        dragSource.addDragSourceMotionListener(dragGesture);
    }
View Full Code Here

Examples of java.awt.dnd.DragSource

    protected void registerDragListener(Component c) {
        if (dragListener == null)
            initDragListener();

        DragSource dragSource = new DragSource();
        dragSource.createDefaultDragGestureRecognizer(c, DnDConstants.ACTION_MOVE, dragListener);
        dragSource.addDragSourceMotionListener(dragListener);
    }
View Full Code Here

Examples of java.awt.dnd.DragSource

    public static DragGestureRecognizer registerDragListener(Component c, DragListener dragListener) {
        if (dragEntryMap.containsKey(c))
            return dragEntryMap.get(c).dragGestureRecognizer;

        DragSource dragSource = new DragSource();
        DragGestureRecognizer recognizer = dragSource.createDefaultDragGestureRecognizer(c, DnDConstants.ACTION_MOVE, dragListener);
        dragSource.addDragSourceMotionListener(dragListener);

        dragEntryMap.put(c, new DragEntry(recognizer, dragListener));

        return recognizer;
    }
View Full Code Here

Examples of java.awt.dnd.DragSource

        component.validate();
        component.repaint();
    }

    public static void registerDragGesture(Component c, DragGesture dragGesture) {
        DragSource dragSource = new DragSource();
        dragSource.createDefaultDragGestureRecognizer(c, DnDConstants.ACTION_MOVE, dragGesture);
        dragSource.addDragSourceMotionListener(dragGesture);
    }
View Full Code Here

Examples of org.apache.pivot.wtk.DragSource

                imageView2 = (ImageView)wtkxSerializer.get("imageView2");
                imageView3 = (ImageView)wtkxSerializer.get("imageView3");

                rollup.setContent(component);

                DragSource imageDragSource = new DragSource() {
                    private Image image = null;
                    private Point offset = null;
                    private LocalManifest content = null;

                    @Override
View Full Code Here

Examples of org.apache.pivot.wtk.DragSource

                this.imageView2 = (ImageView)bxmlSerializer.getNamespace().get("imageView2");
                this.imageView3 = (ImageView)bxmlSerializer.getNamespace().get("imageView3");

                rollup.setContent(this.component);

                DragSource imageDragSource = new DragSource() {
                    private Image image = null;
                    private Point offset = null;
                    private LocalManifest content = null;

                    @Override
View Full Code Here

Examples of org.apache.pivot.wtk.DragSource

        final Label label = new Label("http://pivot.apache.org/");
        label.getStyles().put("font", new Font("Arial", Font.PLAIN, 24));
        label.getStyles().put("horizontalAlignment", HorizontalAlignment.CENTER);
        label.getStyles().put("verticalAlignment", VerticalAlignment.CENTER);

        label.setDragSource(new DragSource() {
            private LocalManifest content = null;

            @Override
            public boolean beginDrag(Component component, int x, int y) {
                content = new LocalManifest();
View Full Code Here

Examples of org.apache.pivot.wtk.DragSource

    public void startup(Display display, Map<String, String> properties) throws Exception {
        frame1.setTitle("Frame 1");
        frame1.setPreferredSize(160, 120);
        frame1.getStyles().put("resizable", false);

        DragSource imageDragSource = new DragSource() {
            private Image image = null;
            private Point offset = null;
            private LocalManifest content = null;

            @Override
View Full Code Here

Examples of org.eclipse.swt.dnd.DragSource

   * @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

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
TOP
Copyright © 2018 www.massapi.com. 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.