Examples of exportAsDrag()


Examples of javax.swing.TransferHandler.exportAsDrag()

        public void mousePressed(MouseEvent e) {
       
            JComponent c = (JComponent) e.getSource();
          
            TransferHandler handler = c.getTransferHandler();
            handler.exportAsDrag(c, e, TransferHandler.COPY);
       //     label1.setVisible(false);
//            c.getParent().remove(c);
//            validate();
        }
       
View Full Code Here

Examples of javax.swing.TransferHandler.exportAsDrag()

          if (e.getButton() == MouseEvent.BUTTON1) {
            PatternPresetLabel ppl = (PatternPresetLabel) e.getSource();
            dragndropChannel = ppl.pat;
            JComponent jc = (JComponent) e.getSource();
            TransferHandler th = jc.getTransferHandler();
            th.exportAsDrag(jc, e, TransferHandler.COPY);
          }
        }
      };
      pw.addMouseListener(ml);
      pw.addMouseListener(this);
View Full Code Here

Examples of javax.swing.TransferHandler.exportAsDrag()

   
                @Override
                public void mouseDragged(MouseEvent e) {
                    JComponent c = (JComponent) e.getSource();
                    TransferHandler th = c.getTransferHandler();
                   th.exportAsDrag(c, e, TransferHandler.COPY);
                }
   
            });
        }
View Full Code Here

Examples of javax.swing.TransferHandler.exportAsDrag()

    private static final class WidgetDragger extends MouseMotionAdapter {
        @Override
        public void mouseDragged(MouseEvent e) {
            JComponent c = (JComponent) e.getSource();
            TransferHandler th = c.getTransferHandler();
            th.exportAsDrag(c, e, TransferHandler.COPY);
        }
    }

    private final class WidgetTransferHandler extends TransferHandler {
        @Override
View Full Code Here

Examples of javax.swing.TransferHandler.exportAsDrag()

    private static final class WidgetDragger extends MouseMotionAdapter {
        @Override
        public void mouseDragged(MouseEvent e) {
            JComponent c = (JComponent) e.getSource();
            TransferHandler th = c.getTransferHandler();
            th.exportAsDrag(c, e, TransferHandler.COPY);
        }
    }
   
    private final class WidgetTransferHandler extends TransferHandler {
        @Override
View Full Code Here

Examples of javax.swing.TransferHandler.exportAsDrag()

    private static final class WidgetDragger extends MouseMotionAdapter {
        @Override
        public void mouseDragged(MouseEvent e) {
            JComponent c = (JComponent) e.getSource();
            TransferHandler th = c.getTransferHandler();
            th.exportAsDrag(c, e, TransferHandler.COPY);
        }
    }
   
    private final class WidgetTransferHandler extends TransferHandler {
        @Override
View Full Code Here

Examples of javax.swing.TransferHandler.exportAsDrag()

            @Override
            public void mouseDragged(MouseEvent e) {
                if (clicked.get()) {
                    JComponent c = (JComponent) e.getSource();
                    TransferHandler th = c.getTransferHandler();
                    th.exportAsDrag(c, e, TransferHandler.COPY);
                }
            }

        });
        addMouseListener(new MouseAdapter() {
View Full Code Here

Examples of javax.swing.TransferHandler.exportAsDrag()

            if (dx > 5 || dy > 5) {
                //This is a drag, not a click.
                JComponent c = (JComponent)e.getSource();
                //Tell the transfer handler to initiate the drag.
                TransferHandler handler = c.getTransferHandler();
                handler.exportAsDrag(c, firstMouseEvent, action);
                firstMouseEvent = null;
            }
        }
    }
   
View Full Code Here

Examples of javax.swing.TransferHandler.exportAsDrag()

        int action = (event.isControlDown() && graph.isCloneable()) ? TransferHandler.COPY
            : TransferHandler.MOVE;
        TransferHandler th = graph.getTransferHandler();
        setInsertionLocation(event.getPoint());
        try {
          th.exportAsDrag(graph, event, action);
        } catch (Exception ex) {
          // Ignore
        }
      }
    }
View Full Code Here

Examples of javax.swing.TransferHandler.exportAsDrag()

      if ((( dx > 5 ) || ( dy > 5 )) &&  dockable.canDrag ) {
        //This is a drag, not a click.
        JComponent c = (JComponent)e.getSource();
        TransferHandler handler = c.getTransferHandler();
        //Tell the transfer handler to initiate the drag.
        handler.exportAsDrag( c, firstMouseEvent, action );
        firstMouseEvent = null;
     
        glassPane = (Container)getRootPane().getGlassPane();
        glassPane.setVisible( true );
        dockable.dockedContainer.addDragProxies( glassPane );
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.