Package javax.swing

Examples of javax.swing.TransferHandler$DropHandler


        };
        alphaWindow.addMouseListener(handler);
        alphaWindow.addMouseMotionListener(handler);
        JPanel p = new JPanel(new BorderLayout(8, 8));
        p.setBorder(new EmptyBorder(8, 8, 8, 8));
        p.setTransferHandler(new TransferHandler() {
        private static final long serialVersionUID = 1L;
            public boolean canImport(JComponent comp, DataFlavor[] transferFlavors) {
                List<DataFlavor> list = Arrays.asList(transferFlavors);
                if (list.contains(URL_FLAVOR)
                    || list.contains(URI_LIST_FLAVOR)
View Full Code Here


        };
        alphaWindow.addMouseListener(handler);
        alphaWindow.addMouseMotionListener(handler);
        JPanel p = new JPanel(new BorderLayout(8, 8));
        p.setBorder(new EmptyBorder(8, 8, 8, 8));
        p.setTransferHandler(new TransferHandler() {
      private static final long serialVersionUID = 1L;
      public boolean canImport(JComponent comp,
                                     DataFlavor[] transferFlavors) {
                List<DataFlavor> list = Arrays.asList(transferFlavors);
                if (list.contains(URL_FLAVOR) || list.contains(URI_LIST_FLAVOR)
View Full Code Here

        jTable.setRowSelectionAllowed(true);
        jTable.setColumnSelectionAllowed(false);
        jTable.setRowHeight(40);
        jTable.setDragEnabled(true);
        jTable.getSelectionModel().addListSelectionListener(this);
        jTable.setTransferHandler(new TransferHandler(null) {
            @Override
            public int getSourceActions(JComponent c) {
                return COPY_OR_MOVE;
            }
View Full Code Here

        super.setAlwaysOnTop(a);
    }

    private void inicializaDropTabela() {
        jTable.setDragEnabled(true);
        jTable.setTransferHandler(new TransferHandler(null) {
            @Override
            public int getSourceActions(JComponent c) {
                return COPY_OR_MOVE;
            }
View Full Code Here

        jTableFila.setDefaultRenderer(Object.class, new TableRendererFila());
        jTableFila.setRowHeight(50);
        jTableFila.getTableHeader().setVisible(false);
        // Código do Cão...

        jTableFila.setTransferHandler(new TransferHandler(null) {
            @Override
            public int getSourceActions(JComponent c) {
                return MOVE;
            }
View Full Code Here

                }
            }
        });
        jTableMusicas.setDefaultRenderer(Object.class, new DefaultTableRenderer());
        jTableMusicas.setRowSorter(sorterMusicas);
        jTableMusicas.setTransferHandler(new TransferHandler(null) {
            @Override
            public int getSourceActions(JComponent c) {
                return COPY;
            }
View Full Code Here

      public String getTestProperty()
      {
        return value;
      }
    };
    transferHandler = new TransferHandler("testProperty");
    try
      {
        DataFlavor flavor =
          new DataFlavor(DataFlavor.javaJVMLocalObjectMimeType
                         + ";class=java.lang.String");
View Full Code Here

   * Sets up the test case.
   */
  public void setUp()
  {
    component = new TestComponent();
    transferHandler = new TransferHandler("testProperty");
    transferable = new TestTransferable();
  }
View Full Code Here

   * Tests a transfer with a TransferHandler initialized with a null
   * property.
   */
  public void testNullProperty()
  {
    transferHandler = new TransferHandler(null);
    boolean ok = transferHandler.importData(component, transferable);
    assertFalse(ok);
  }
View Full Code Here

      Rectangle rect = getSelBounds(dragging_event, e);
      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

TOP

Related Classes of javax.swing.TransferHandler$DropHandler

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.