Package net.iharder.dnd

Examples of net.iharder.dnd.FileDrop


       
        xmlEditor.setText("");
      }
    });
   
    new FileDrop(xmlEditor, new FileDrop.Listener()
    {
      public void filesDropped(File[] files)
      {
        if (files.length == 1)
          openFile(files[0]);
View Full Code Here


        initComponents();
        model = new FolderModel( folder );
        table.setCellRenderer( new IconRenderer() );
        table.setLayoutOrientation( JList.VERTICAL_WRAP );

        new FileDrop( this, new FileDrop.Listener() {

            public void filesDropped( java.io.File[] files ) {
                for( java.io.File f : files ) {
                    System.out.println( f.getName() );
                    try {
View Full Code Here

        model = new FolderModel( folder );
        table.setModel( model );
        TableColumn col = table.getColumnModel().getColumn( 0 );
        col.setCellRenderer( new MyTableCellRenderer() );

        new FileDrop( this, new FileDrop.Listener() {

            public void filesDropped( java.io.File[] files ) {
                doFilesDropped( files );
            }
        } );
View Full Code Here

        jButton2.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
        jTable1.setGridColor(Color.CYAN);
        modTable = (DefaultTableModel) jTable1.getModel();
        installDir = new File(FileUtils.appDirectory(), bundle.getString("INSTALL"));
        chooserPath = Preferences.userRoot().get("chooserPath", null);
        new FileDrop(jTable1, new FileDrop.Listener() {
            public void  filesDropped(File[] files ) {
                for(int i=0; i<files.length; i++) {
                    String name = files[i].getName().toLowerCase();
                    if(name.endsWith(".ipk") || name.endsWith(".patch") ||
                            name.endsWith(".diff")) {
View Full Code Here

    tree.addMouseListener(internalTreeClickListener);

    add(panel, BorderLayout.WEST);

    // Add Drag & Drop capabilities to the panel to make it easier to open files.
    new FileDrop(panel, new FileDrop.Listener() {
      @Override
      public void filesDropped(final File[] files) {
        for (final File file : files) {
          FileActions.openFile(tree, fileModel, file);
        }
View Full Code Here

TOP

Related Classes of net.iharder.dnd.FileDrop

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.