Search in sources :

Example 1 with LightweightSet

use of net.sourceforge.processdash.util.LightweightSet in project processdash by dtuma.

the class DropTransferHandler method importData.

public boolean importData(JComponent comp, Transferable t) {
    List files = TransferHandlerUtils.getTransferredFileList(t);
    if (files == null || files.isEmpty())
        return false;
    Set targets = new LightweightSet();
    for (Iterator i = files.iterator(); i.hasNext(); ) {
        File f = (File) i.next();
        if ("pspdash.jar".equals(f.getName())) {
            launcher.useDashboardJarFile(f);
            continue;
        }
        DashboardInstance l = launcherFactory.getLauncher(comp, f);
        if (l != null)
            targets.add(l);
    }
    launcher.launchInstances(targets);
    return true;
}
Also used : LightweightSet(net.sourceforge.processdash.util.LightweightSet) LightweightSet(net.sourceforge.processdash.util.LightweightSet) Set(java.util.Set) Iterator(java.util.Iterator) List(java.util.List) File(java.io.File)

Aggregations

File (java.io.File)1 Iterator (java.util.Iterator)1 List (java.util.List)1 Set (java.util.Set)1 LightweightSet (net.sourceforge.processdash.util.LightweightSet)1