Package javax.swing

Examples of javax.swing.TransferHandler$SwingDragGestureRecognizer


          if (e.getClickCount() == 2) {
            table.onDoubleClick();
          } 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


    {
      public void dragGestureRecognized(DragGestureEvent e)
      {
        if (graphComponent.isDragEnabled() && first != null)
        {
          final TransferHandler th = graphComponent
              .getTransferHandler();

          if (th instanceof mxGraphTransferHandler)
          {
            final mxGraphTransferable t = (mxGraphTransferable) ((mxGraphTransferHandler) th)
View Full Code Here

      /**
       *
       */
      public Object getCell(MouseEvent e)
      {
        TransferHandler th = graphComponent.getTransferHandler();
        boolean isLocal = th instanceof mxGraphTransferHandler
            && ((mxGraphTransferHandler) th).isLocalDrag();

        mxGraph graph = graphComponent.getGraph();
        Object cell = super.getCell(e);
View Full Code Here

   *
   */
  public void dragEnter(DropTargetDragEvent e)
  {
    JComponent component = getDropTarget(e);
    TransferHandler th = component.getTransferHandler();
    boolean isLocal = th instanceof mxGraphTransferHandler
        && ((mxGraphTransferHandler) th).isLocalDrag();

    if (isLocal)
    {
      canImport = true;
    }
    else
    {
      canImport = graphComponent.isImportEnabled()
          && th.canImport(component, e.getCurrentDataFlavors());
    }

    if (canImport)
    {
      transferBounds = null;
View Full Code Here

   */
  protected static final mxGraphTransferHandler getGraphTransferHandler(
      DropTargetEvent e)
  {
    JComponent component = getDropTarget(e);
    TransferHandler transferHandler = component.getTransferHandler();

    if (transferHandler instanceof mxGraphTransferHandler)
    {
      return (mxGraphTransferHandler) transferHandler;
    }
View Full Code Here

      column = getColumnModel().getColumn(3);
      column.setMaxWidth(12);
      column = getColumnModel().getColumn(4);
      column.setMaxWidth(12);

      setTransferHandler(new TransferHandler()
      {

        /* (non-Javadoc)
         * @see javax.swing.TransferHandler#getSourceActions(javax.swing.JComponent)
         */
 
View Full Code Here

                  && selectedRow < propertiesTable.getRowCount() - 1 );
          }
        } );

        propertiesTable.setDragEnabled( true );
        propertiesTable.setTransferHandler( new TransferHandler( "testProperty" ) );

        if( getHolder().getModelItem() != null )
        {
          DropTarget dropTarget = new DropTarget( propertiesTable,
              new PropertyHolderTablePropertyExpansionDropTarget() );
View Full Code Here

          movePropertyDownAction.setEnabled( selectedRow >= 0 && selectedRow < propertiesTable.getRowCount() - 1 );
      }
    } );

    propertiesTable.setDragEnabled( true );
    propertiesTable.setTransferHandler( new TransferHandler( "testProperty" ) );

    if( getHolder().getModelItem() != null )
    {
      DropTarget dropTarget = new DropTarget( propertiesTable, new PropertyHolderTablePropertyExpansionDropTarget() );
      dropTarget.setDefaultActions( DnDConstants.ACTION_COPY_OR_MOVE );
View Full Code Here

                  && selectedRow < propertiesTable.getRowCount() - 1 );
          }
        } );

        propertiesTable.setDragEnabled( true );
        propertiesTable.setTransferHandler( new TransferHandler( "testProperty" ) );

        if( getHolder().getModelItem() != null )
        {
          DropTarget dropTarget = new DropTarget( propertiesTable,
              new PropertyHolderTablePropertyExpansionDropTarget() );
View Full Code Here

                    && selectedRow < propertiesTable.getRowCount() - 1 );
            }
          } );

          propertiesTable.setDragEnabled( true );
          propertiesTable.setTransferHandler( new TransferHandler( "testProperty" ) );

          if( getHolder().getModelItem() != null )
          {
            DropTarget dropTarget = new DropTarget( propertiesTable,
                new PropertyHolderTablePropertyExpansionDropTarget() );
View Full Code Here

TOP

Related Classes of javax.swing.TransferHandler$SwingDragGestureRecognizer

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.