Examples of exportAsDrag()


Examples of javax.swing.TransferHandler.exportAsDrag()

      glassPlane.setSelectionRegion(rect);
      glassPlane.setCursorType(Cursor.CROSSHAIR_CURSOR);
    } else if (isSameParent()) {
      if (isTobeDnd() && isDndReady(e)) {
        TransferHandler handler = glassPlane.getTransferHandler();
        handler.exportAsDrag(glassPlane, dragging_event, TransferHandler.COPY);
        designer.setSelectedWidget(currentAdapters);
        if (state == STATE_BEAN_TOBE_HOVER) {
          setMascotLocation(e.getPoint());
          state = STATE_BEAN_HOVER;
        } else {
View Full Code Here

Examples of javax.swing.TransferHandler.exportAsDrag()

          } else {

            final JComponent c = (JComponent) e.getSource();
            final TransferHandler th = c.getTransferHandler();

            th.exportAsDrag(c, e, TransferHandler.COPY);
          }
        } else if (SwingUtilities.isRightMouseButton(e)) {
          action.doPopup(e);
        }
      }
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()

    return selfInstance;
  }
    public void mousePressed(MouseEvent e) {
        JComponent c = (JComponent)e.getSource();
        TransferHandler handler = c.getTransferHandler();
        handler.exportAsDrag(c, e, TransferHandler.COPY);
    }
}
View Full Code Here

Examples of javax.swing.TransferHandler.exportAsDrag()

    return selfInstance;
  }
    public void mousePressed(MouseEvent e) {
        JComponent c = (JComponent)e.getSource();
        TransferHandler handler = c.getTransferHandler();
        handler.exportAsDrag(c, e, TransferHandler.COPY);
    }
}
View Full Code Here

Examples of javax.swing.TransferHandler.exportAsDrag()

    return selfInstance;
  }
    public void mousePressed(MouseEvent e) {
        JComponent c = (JComponent)e.getSource();
        TransferHandler handler = c.getTransferHandler();
        handler.exportAsDrag(c, e, TransferHandler.COPY);
    }
}
View Full Code Here

Examples of javax.swing.TransferHandler.exportAsDrag()

          public void mousePressed(MouseEvent e)
          {
            TransferHandler handler = (TransferHandler)
              ReflectionUtils.invokeMethod("getTransferHandler", component,
              new Class[] {}, new Object[] {});
            handler.exportAsDrag(component, e, transferType);
           
          }
      };
     
      component.addMouseListener(starter);
View Full Code Here

Examples of javax.swing.TransferHandler.exportAsDrag()

        // recognize a drag gesture
        MouseListener ml = new MouseAdapter() {
            public void mousePressed(MouseEvent e) {
                JComponent c = (JComponent)e.getSource();
                TransferHandler th = c.getTransferHandler();
                th.exportAsDrag(c, e, TransferHandler.COPY);
            }
        };
        addMouseListener(ml);
    }
View Full Code Here

Examples of javax.swing.TransferHandler.exportAsDrag()

                log.warn( "Start a drag" );
                //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()

    MouseListener myDragListener = new MouseAdapter() {
      public void mousePressed(MouseEvent e) {
        JComponent c = (JComponent) e.getSource();
        TransferHandler handler = c.getTransferHandler();
        handler.exportAsDrag(c, e, TransferHandler.COPY);
      }
    };
    l.addMouseListener(myDragListener);

    propertyComboBox.addActionListener(new ActionListener() {
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.