Package megamek.common.util

Examples of megamek.common.util.DirectoryItems


     */
    public TilesetManager(Component comp) throws java.io.IOException {
        this.comp = comp;
        tracker = new MediaTracker(comp);
        try {
            camos = new DirectoryItems(new File("data/images/camo"), "", //$NON-NLS-1$ //$NON-NLS-2$
                    ImageFileFactory.getInstance());
        } catch (Exception e) {
            camos = null;
        }
        mechTileset.loadFromFile("mechset.txt"); //$NON-NLS-1$
View Full Code Here


     */
    public TilesetManager(Component comp) throws IOException {
        this.comp = comp;
        tracker = new MediaTracker(comp);
        try {
            camos = new DirectoryItems(new File("data/images/camo"), "", //$NON-NLS-1$ //$NON-NLS-2$
                    ImageFileFactory.getInstance());
        } catch (Exception e) {
            camos = null;
        }
        mechTileset.loadFromFile("mechset.txt"); //$NON-NLS-1$
View Full Code Here

        Iterator<String> names;
        String name;

        // Parse the camo directory.
        try {
            camos = new DirectoryItems(new File("data/images/camo"), "", //$NON-NLS-1$ //$NON-NLS-2$
                    ImageFileFactory.getInstance());
        } catch (Exception e) {
            camos = null;
        }
View Full Code Here

        Iterator<String> names;
        String name;

        // Parse the camo directory.
        try {
            camos = new DirectoryItems(new File("data/images/camo"), "", //$NON-NLS-1$ //$NON-NLS-2$
                    ImageFileFactory.getInstance());
        } catch (Exception e) {
            camos = null;
        }
View Full Code Here

        try {
            String rootDir = PreferenceManager.getClientPreferences()
                    .getDataDirectory();
            File camoLib = new File(rootDir + "/images/camo");
            DirectoryItems images = new DirectoryItems(camoLib, "",
                    ImageFileFactory.getInstance());
            Iterator<String> categories = images.getCategoryNames();
            Iterator<String> names = null;
            String catName = null;

            // Walk through the category names, listing all of the image files.
            while (categories.hasNext()) {

                // Get this category name, and replace null with blank.
                catName = categories.next();

                // Print the category.
                System.out.print("Printing files in ");
                if (catName.equals("")) {
                    System.out.print("-- General --");
                } else {
                    System.out.print(catName);
                }
                System.out.println(":");

                // Walk through the item names.
                names = images.getItemNames(catName);
                while (names.hasNext()) {
                    System.out.println(names.next());
                }
            } // Handle the next category.
        } catch (Throwable err) {
View Full Code Here

TOP

Related Classes of megamek.common.util.DirectoryItems

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.