All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.pepsoft.minecraft.mapexplorer.RootNode Maven / Gradle / Ivy

There is a newer version: 2.23.2
Show newest version
package org.pepsoft.minecraft.mapexplorer;

import org.pepsoft.worldpainter.mapexplorer.Node;

import javax.swing.*;
import java.io.File;
import java.util.Arrays;

/**
 * Created by pepijn on 13-3-16.
 */
public class RootNode extends Node {
    public RootNode() {
    }

    @Override
    public String getName() {
        return "Root";
    }

    @Override
    public Icon getIcon() {
        return null;
    }

    @Override
    public boolean isLeaf() {
        return false;
    }

    @Override
    protected Node[] loadChildren() {
        return Arrays.stream(File.listRoots())
                .map(DirectoryNode::new)
                .toArray(Node[]::new);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy