Search in sources :

Example 1 with Filter

use of org.pepsoft.worldpainter.operations.Filter in project WorldPainter by Captain-Chaos.

the class FillDialog method clearLayer.

private void clearLayer(ProgressReceiver progressReceiver) throws OperationCancelled {
    Layer layer = (Layer) comboBoxClearLayer.getSelectedItem();
    if (filter == null) {
        dimension.clearLayerData(layer);
    } else {
        if (layer.getDataSize() == Layer.DataSize.NIBBLE) {
            dimension.visitTiles().forFilter(filter).andDo(tile -> {
                final int worldTileX = tile.getX() << TILE_SIZE_BITS;
                final int worldTileY = tile.getY() << TILE_SIZE_BITS;
                for (int x = 0; x < TILE_SIZE; x++) {
                    for (int y = 0; y < TILE_SIZE; y++) {
                        int oldLayervalue = tile.getLayerValue(layer, x, y);
                        int layerValue;
                        if (filter == null) {
                            layerValue = 0;
                        } else {
                            layerValue = Math.min(oldLayervalue, 15 - (int) (filter.modifyStrength(worldTileX | x, worldTileY | y, 1.0f) * 15));
                        }
                        if (oldLayervalue != layerValue) {
                            tile.setLayerValue(layer, x, y, layerValue);
                        }
                    }
                }
            }, progressReceiver);
        } else if (layer.getDataSize() == Layer.DataSize.BIT) {
            dimension.visitTiles().forFilter(filter).andDo(tile -> {
                final int worldTileX = tile.getX() << TILE_SIZE_BITS;
                final int worldTileY = tile.getY() << TILE_SIZE_BITS;
                for (int x = 0; x < TILE_SIZE; x++) {
                    for (int y = 0; y < TILE_SIZE; y++) {
                        boolean set;
                        if (filter == null) {
                            set = true;
                        } else {
                            float strength = filter.modifyStrength(worldTileX | x, worldTileY | y, 1.0f);
                            set = (strength > 0.95f) || (Math.random() < strength);
                        }
                        if (set && tile.getBitLayerValue(layer, x, y)) {
                            tile.setBitLayerValue(layer, x, y, false);
                        }
                    }
                }
            }, progressReceiver);
        } else if (layer.getDataSize() == Layer.DataSize.BIT_PER_CHUNK) {
            dimension.visitTiles().forFilter(filter).andDo(tile -> {
                final int worldTileX = tile.getX() << TILE_SIZE_BITS;
                final int worldTileY = tile.getY() << TILE_SIZE_BITS;
                for (int x = 0; x < TILE_SIZE; x += 16) {
                    for (int y = 0; y < TILE_SIZE; y += 16) {
                        boolean set;
                        if (filter == null) {
                            set = true;
                        } else {
                            float strength = filter.modifyStrength(worldTileX | x, worldTileY | y, 1.0f);
                            set = (strength > 0.95f) || (Math.random() < strength);
                        }
                        if (set && tile.getBitLayerValue(layer, x, y)) {
                            tile.setBitLayerValue(layer, x, y, false);
                        }
                    }
                }
            }, progressReceiver);
        } else {
            throw new UnsupportedOperationException();
        }
    }
}
Also used : CustomBiomeManager(org.pepsoft.worldpainter.biomeschemes.CustomBiomeManager) BiomeHelper(org.pepsoft.worldpainter.biomeschemes.BiomeHelper) Arrays(java.util.Arrays) AutoBiomeScheme(org.pepsoft.worldpainter.biomeschemes.AutoBiomeScheme) Collection(java.util.Collection) Biome(org.pepsoft.worldpainter.layers.Biome) ProgressDialog(org.pepsoft.util.swing.ProgressDialog) Listener(org.pepsoft.worldpainter.panels.BrushOptions.Listener) Set(java.util.Set) DefaultFilter(org.pepsoft.worldpainter.panels.DefaultFilter) TILE_SIZE(org.pepsoft.worldpainter.Constants.TILE_SIZE) Layer(org.pepsoft.worldpainter.layers.Layer) TerrainListCellRenderer(org.pepsoft.worldpainter.themes.TerrainListCellRenderer) ProgressTask(org.pepsoft.util.swing.ProgressTask) FloodWithLava(org.pepsoft.worldpainter.layers.FloodWithLava) ObservableBoolean(org.pepsoft.util.ObservableBoolean) ProgressReceiver(org.pepsoft.util.ProgressReceiver) SelectionBlock(org.pepsoft.worldpainter.selection.SelectionBlock) OperationCancelled(org.pepsoft.util.ProgressReceiver.OperationCancelled) SelectionChunk(org.pepsoft.worldpainter.selection.SelectionChunk) SelectionHelper(org.pepsoft.worldpainter.selection.SelectionHelper) TILE_SIZE_BITS(org.pepsoft.worldpainter.Constants.TILE_SIZE_BITS) Filter(org.pepsoft.worldpainter.operations.Filter) javax.swing(javax.swing) Layer(org.pepsoft.worldpainter.layers.Layer)

Example 2 with Filter

use of org.pepsoft.worldpainter.operations.Filter in project WorldPainter by Captain-Chaos.

the class BrushOptions method filterChanged.

private void filterChanged() {
    if (listener != null) {
        Filter filter = getFilter();
        if (logger.isTraceEnabled()) {
            logger.trace("Reporting new filter " + filter + " to listener " + listener);
        }
        listener.filterChanged(filter);
    }
}
Also used : Filter(org.pepsoft.worldpainter.operations.Filter)

Example 3 with Filter

use of org.pepsoft.worldpainter.operations.Filter in project WorldPainter by Captain-Chaos.

the class Dimension method init.

private void init() {
    listeners = new ArrayList<>();
    dirtyTiles = new HashSet<>();
    addedTiles = new HashSet<>();
    removedTiles = new HashSet<>();
    propertyChangeSupport = new PropertyChangeSupport(this);
    garden = new WPGarden();
    topLayerDepthNoise = new PerlinNoise(seed + TOP_LAYER_DEPTH_SEED_OFFSET);
    for (Tile tile : tiles.values()) {
        tile.addListener(this);
        Set<Seed> seeds = tile.getSeeds();
        if (seeds != null) {
            for (Seed gardenSeed : seeds) {
                gardenSeed.garden = garden;
            }
        }
    }
    // Legacy support
    if (wpVersion < 1) {
        if (borderSize == 0) {
            borderSize = 2;
        }
        if (overlayScale == 0.0f) {
            overlayScale = 1.0f;
        }
        if (overlayTransparency == 0.0f) {
            overlayTransparency = 0.5f;
        }
        if (gridSize == 0) {
            gridSize = 128;
        }
        if (!biomesConverted) {
            // Convert the nibble sized biomes data from a legacy map (by
            // deleting it so that it will be recalculated
            tiles.values().forEach(org.pepsoft.worldpainter.Tile::convertBiomeData);
            biomesConverted = true;
        }
        if (maxHeight == 0) {
            maxHeight = 128;
        }
        if (subsurfaceMaterial == Terrain.RESOURCES) {
            subsurfaceMaterial = Terrain.STONE;
            // Load legacy settings
            ResourcesExporterSettings settings = new ResourcesExporterSettings(maxHeight);
            settings.setChance(BLK_GOLD_ORE, 1);
            settings.setChance(BLK_IRON_ORE, 5);
            settings.setChance(BLK_COAL, 9);
            settings.setChance(BLK_LAPIS_LAZULI_ORE, 1);
            settings.setChance(BLK_DIAMOND_ORE, 1);
            settings.setChance(BLK_REDSTONE_ORE, 6);
            settings.setChance(BLK_WATER, 1);
            settings.setChance(BLK_LAVA, 1);
            settings.setChance(BLK_DIRT, 9);
            settings.setChance(BLK_GRAVEL, 9);
            settings.setMaxLevel(BLK_GOLD_ORE, Terrain.GOLD_LEVEL);
            settings.setMaxLevel(BLK_IRON_ORE, Terrain.IRON_LEVEL);
            settings.setMaxLevel(BLK_COAL, Terrain.COAL_LEVEL);
            settings.setMaxLevel(BLK_LAPIS_LAZULI_ORE, Terrain.LAPIS_LAZULI_LEVEL);
            settings.setMaxLevel(BLK_DIAMOND_ORE, Terrain.DIAMOND_LEVEL);
            settings.setMaxLevel(BLK_REDSTONE_ORE, Terrain.REDSTONE_LEVEL);
            settings.setMaxLevel(BLK_WATER, Terrain.WATER_LEVEL);
            settings.setMaxLevel(BLK_LAVA, Terrain.LAVA_LEVEL);
            settings.setMaxLevel(BLK_DIRT, Terrain.DIRT_LEVEL);
            settings.setMaxLevel(BLK_GRAVEL, Terrain.GRAVEL_LEVEL);
            layerSettings.put(Resources.INSTANCE, settings);
        }
        if (contourSeparation == 0) {
            contourSeparation = 10;
        }
        if (topLayerMinDepth == 0) {
            topLayerMinDepth = 3;
            topLayerVariation = 4;
        }
        if (lastViewPosition == null) {
            lastViewPosition = new Point();
        }
        if ((customLayers == null) || customLayers.isEmpty()) {
            // The customLayers.isEmpty() is to fix a bug which escaped in a beta
            customLayers = new ArrayList<>();
            customLayers.addAll(getAllLayers(false).stream().filter(layer -> layer instanceof CustomLayer).map(layer -> (CustomLayer) layer).collect(Collectors.toList()));
        }
    }
    if (wpVersion < 2) {
        if (overlay != null) {
            fixOverlayCoords = true;
        }
    }
    if (wpVersion < 3) {
        ceilingHeight = maxHeight;
    }
    wpVersion = CURRENT_WP_VERSION;
    // Make sure that any custom layers which somehow ended up in the world
    // are on the custom layer list so they will be added to a palette in
    // the GUI. TODO: fix this properly
    // Make sure customLayers isn't some weird read-only list
    getAllLayers(false).stream().filter(layer -> (layer instanceof CustomLayer) && (!customLayers.contains(layer))).forEach(layer -> {
        if ((!(customLayers instanceof ArrayList)) && (!(customLayers instanceof LinkedList))) {
            // Make sure customLayers isn't some weird read-only list
            customLayers = new ArrayList<>(customLayers);
        }
        customLayers.add((CustomLayer) layer);
    });
}
Also used : java.util(java.util) CustomBiome(org.pepsoft.worldpainter.biomeschemes.CustomBiome) ExporterSettings(org.pepsoft.worldpainter.layers.exporters.ExporterSettings) ObjectInputStream(java.io.ObjectInputStream) org.pepsoft.worldpainter.layers(org.pepsoft.worldpainter.layers) UndoManager(org.pepsoft.util.undo.UndoManager) ResourcesExporterSettings(org.pepsoft.worldpainter.layers.exporters.ResourcesExporter.ResourcesExporterSettings) Point3i(javax.vecmath.Point3i) AttributeKey(org.pepsoft.util.AttributeKey) ImageIO(javax.imageio.ImageIO) SelectionChunk(org.pepsoft.worldpainter.selection.SelectionChunk) MathUtils(org.pepsoft.util.MathUtils) Garden(org.pepsoft.worldpainter.gardenofeden.Garden) Constants(org.pepsoft.worldpainter.Constants) PerlinNoise(org.pepsoft.util.PerlinNoise) ImageReader(javax.imageio.ImageReader) Seed(org.pepsoft.worldpainter.gardenofeden.Seed) DefaultFilter(org.pepsoft.worldpainter.panels.DefaultFilter) IOException(java.io.IOException) FileImageInputStream(javax.imageio.stream.FileImageInputStream) Collectors(java.util.stream.Collectors) File(java.io.File) ImageInputStream(javax.imageio.stream.ImageInputStream) Serializable(java.io.Serializable) java.awt(java.awt) List(java.util.List) Brush(org.pepsoft.worldpainter.brushes.Brush) PropertyChangeListener(java.beans.PropertyChangeListener) Constants(org.pepsoft.minecraft.Constants) ProgressReceiver(org.pepsoft.util.ProgressReceiver) SelectionBlock(org.pepsoft.worldpainter.selection.SelectionBlock) OperationCancelled(org.pepsoft.util.ProgressReceiver.OperationCancelled) PropertyChangeSupport(java.beans.PropertyChangeSupport) Filter(org.pepsoft.worldpainter.operations.Filter) javax.swing(javax.swing) Minecraft1_7Biomes(org.pepsoft.worldpainter.biomeschemes.Minecraft1_7Biomes) PropertyChangeSupport(java.beans.PropertyChangeSupport) PerlinNoise(org.pepsoft.util.PerlinNoise) ResourcesExporterSettings(org.pepsoft.worldpainter.layers.exporters.ResourcesExporter.ResourcesExporterSettings) Seed(org.pepsoft.worldpainter.gardenofeden.Seed)

Example 4 with Filter

use of org.pepsoft.worldpainter.operations.Filter in project WorldPainter by Captain-Chaos.

the class BrushOptions method createObjectSelectionMenu.

private JPopupMenu createObjectSelectionMenu(final ObjectSelectionListener listener) {
    JMenuItem waterItem = new JMenuItem("Water");
    waterItem.addActionListener(e -> listener.objectSelected(DefaultFilter.WATER, "Water", null));
    JMenu popupMenu = new JMenu();
    popupMenu.add(waterItem);
    JMenuItem lavaItem = new JMenuItem("Lava");
    lavaItem.addActionListener(e -> listener.objectSelected(DefaultFilter.LAVA, "Lava", null));
    popupMenu.add(lavaItem);
    JMenuItem landItem = new JMenuItem("Land");
    landItem.addActionListener(e -> listener.objectSelected(DefaultFilter.LAND, "Land", null));
    popupMenu.add(landItem);
    JMenu terrainMenu = new JMenu("Terrain");
    JMenu customTerrainMenu = new JMenu("Custom");
    JMenu stainedClayTerrainMenu = new JMenu("Stained Clay");
    App app = App.getInstance();
    ColourScheme colourScheme = app.getColourScheme();
    for (Terrain terrain : Terrain.getConfiguredValues()) {
        final Terrain selectedTerrain = terrain;
        final String name = terrain.getName();
        final Icon icon = new ImageIcon(terrain.getIcon(colourScheme));
        JMenuItem menuItem = new JMenuItem(name, icon);
        menuItem.addActionListener(e -> listener.objectSelected(selectedTerrain, name, icon));
        if (terrain.isCustom()) {
            customTerrainMenu.add(menuItem);
        } else if (terrain.getName().endsWith(" Clay") && (terrain != Terrain.HARDENED_CLAY)) {
            stainedClayTerrainMenu.add(menuItem);
        } else {
            terrainMenu.add(menuItem);
        }
    }
    terrainMenu.add(stainedClayTerrainMenu);
    if (customTerrainMenu.getMenuComponentCount() > 0) {
        terrainMenu.add(customTerrainMenu);
    }
    popupMenu.add(terrainMenu);
    JMenu layerMenu = new JMenu("Layer");
    LayerManager.getInstance().getLayers().stream().filter(l -> !l.equals(Biome.INSTANCE)).forEach(l -> {
        JMenuItem menuItem = new JMenuItem(l.getName(), new ImageIcon(l.getIcon()));
        menuItem.addActionListener(e -> listener.objectSelected(l, l.getName(), new ImageIcon(l.getIcon())));
        layerMenu.add(menuItem);
    });
    Set<CustomLayer> customLayers = app.getCustomLayers();
    if (customLayers.size() > 15) {
        // If there are fifteen or more custom layers, split them by palette
        // and move them to separate submenus to try and conserve screen
        // space
        app.getCustomLayersByPalette().entrySet().stream().map((entry) -> {
            String palette = entry.getKey();
            JMenu paletteMenu = new JMenu(palette != null ? palette : "Hidden Layers");
            entry.getValue().forEach(l -> {
                JMenuItem menuItem = new JMenuItem(l.getName(), new ImageIcon(l.getIcon()));
                menuItem.addActionListener(e -> listener.objectSelected(l, l.getName(), new ImageIcon(l.getIcon())));
                paletteMenu.add(menuItem);
            });
            return paletteMenu;
        }).forEach(layerMenu::add);
    } else {
        customLayers.forEach(l -> {
            JMenuItem menuItem = new JMenuItem(l.getName(), new ImageIcon(l.getIcon()));
            menuItem.addActionListener(e -> listener.objectSelected(l, l.getName(), new ImageIcon(l.getIcon())));
            layerMenu.add(menuItem);
        });
    }
    popupMenu.add(layerMenu);
    final JMenu biomeMenu = new JMenu("Biome");
    final CustomBiomeManager customBiomeManager = app.getCustomBiomeManager();
    final BiomeHelper biomeHelper = new BiomeHelper(autoBiomeScheme, colourScheme, customBiomeManager);
    List<CustomBiome> customBiomes = customBiomeManager.getCustomBiomes();
    if ((customBiomes != null) && (!customBiomes.isEmpty())) {
        JMenu customBiomeMenu = new JMenu("Custom");
        for (CustomBiome customBiome : customBiomes) {
            final int selectedBiome = customBiome.getId();
            final String name = biomeHelper.getBiomeName(selectedBiome) + " (" + selectedBiome + ")";
            final Icon icon = biomeHelper.getBiomeIcon(selectedBiome);
            final JMenuItem menuItem = new JMenuItem(name, icon);
            menuItem.addActionListener(e -> listener.objectSelected(new DefaultFilter.LayerValue(Biome.INSTANCE, selectedBiome), name, icon));
            customBiomeMenu.add(menuItem);
        }
        biomeMenu.add(customBiomeMenu);
    }
    for (int i = 0; i < autoBiomeScheme.getBiomeCount(); i++) {
        if (autoBiomeScheme.isBiomePresent(i)) {
            final int selectedBiome = i;
            final String name = biomeHelper.getBiomeName(i) + " (" + selectedBiome + ")";
            final Icon icon = biomeHelper.getBiomeIcon(i);
            final JMenuItem menuItem = new JMenuItem(name, icon);
            menuItem.addActionListener(e -> listener.objectSelected(new DefaultFilter.LayerValue(Biome.INSTANCE, selectedBiome), name, icon));
            biomeMenu.add(menuItem);
        }
    }
    JMenu autoBiomeSubMenu = new JMenu("Auto Biomes");
    JMenuItem autoBiomesMenuItem = new JMenuItem("All Auto Biomes");
    autoBiomesMenuItem.addActionListener(e -> listener.objectSelected(DefaultFilter.AUTO_BIOMES, "All Auto Biomes", null));
    autoBiomeSubMenu.add(autoBiomesMenuItem);
    for (int autoBiome : Dimension.POSSIBLE_AUTO_BIOMES) {
        final int selectedBiome = -autoBiome;
        final String name = biomeHelper.getBiomeName(autoBiome);
        final Icon icon = biomeHelper.getBiomeIcon(autoBiome);
        final JMenuItem menuItem = new JMenuItem(name, icon);
        menuItem.addActionListener(e -> listener.objectSelected(new DefaultFilter.LayerValue(Biome.INSTANCE, selectedBiome), name, icon));
        autoBiomeSubMenu.add(menuItem);
    }
    biomeMenu.add(autoBiomeSubMenu);
    popupMenu.add(biomeMenu);
    JMenu annotationsMenu = new JMenu("Annotations");
    JMenuItem menuItem = new JMenuItem("All Annotations");
    menuItem.addActionListener(e -> listener.objectSelected(new DefaultFilter.LayerValue(Annotations.INSTANCE), "All Annotations", null));
    annotationsMenu.add(menuItem);
    for (int i = 1; i < 16; i++) {
        final int selectedColour = i, dataValue = selectedColour - ((selectedColour < 8) ? 1 : 0);
        final Icon icon = IconUtils.createScaledColourIcon(colourScheme.getColour(Constants.BLK_WOOL, dataValue));
        menuItem = new JMenuItem(Constants.COLOUR_NAMES[dataValue], icon);
        menuItem.addActionListener(e -> listener.objectSelected(new DefaultFilter.LayerValue(Annotations.INSTANCE, selectedColour), Constants.COLOUR_NAMES[dataValue] + " Annotations", icon));
        annotationsMenu.add(menuItem);
    }
    popupMenu.add(annotationsMenu);
    popupMenu = breakUpLongMenus(popupMenu, 25);
    JPopupMenu result = new JPopupMenu();
    Arrays.stream(popupMenu.getMenuComponents()).forEach(result::add);
    return result;
}
Also used : org.pepsoft.worldpainter(org.pepsoft.worldpainter) CustomBiomeManager(org.pepsoft.worldpainter.biomeschemes.CustomBiomeManager) BiomeHelper(org.pepsoft.worldpainter.biomeschemes.BiomeHelper) java.util(java.util) Logger(org.slf4j.Logger) CustomBiome(org.pepsoft.worldpainter.biomeschemes.CustomBiome) IconUtils(org.pepsoft.util.IconUtils) AutoBiomeScheme(org.pepsoft.worldpainter.biomeschemes.AutoBiomeScheme) LoggerFactory(org.slf4j.LoggerFactory) NumberEditor(javax.swing.JSpinner.NumberEditor) org.pepsoft.worldpainter.layers(org.pepsoft.worldpainter.layers) ActionEvent(java.awt.event.ActionEvent) Dimension(org.pepsoft.worldpainter.Dimension) java.awt(java.awt) List(java.util.List) ObservableBoolean(org.pepsoft.util.ObservableBoolean) Constants(org.pepsoft.minecraft.Constants) Filter(org.pepsoft.worldpainter.operations.Filter) LevelType(org.pepsoft.worldpainter.panels.DefaultFilter.LevelType) javax.swing(javax.swing) CustomBiome(org.pepsoft.worldpainter.biomeschemes.CustomBiome) BiomeHelper(org.pepsoft.worldpainter.biomeschemes.BiomeHelper) CustomBiomeManager(org.pepsoft.worldpainter.biomeschemes.CustomBiomeManager)

Example 5 with Filter

use of org.pepsoft.worldpainter.operations.Filter in project WorldPainter by Captain-Chaos.

the class FillDialog method fillWithLayer.

private void fillWithLayer(ProgressReceiver progressReceiver) throws UnsupportedOperationException, OperationCancelled {
    Layer layer = (Layer) comboBoxSetLayer.getSelectedItem();
    if (layer.getDataSize() == Layer.DataSize.NIBBLE) {
        int baseLayerValue = Math.round((sliderLayerValue.getValue() + 2) / 6.667f);
        dimension.visitTiles().forFilter(filter).andDo(tile -> {
            final int worldTileX = tile.getX() << TILE_SIZE_BITS;
            final int worldTileY = tile.getY() << TILE_SIZE_BITS;
            for (int x = 0; x < TILE_SIZE; x++) {
                for (int y = 0; y < TILE_SIZE; y++) {
                    int layerValue;
                    if (filter == null) {
                        layerValue = baseLayerValue;
                    } else {
                        layerValue = (int) (filter.modifyStrength(worldTileX | x, worldTileY | y, 1.0f) * baseLayerValue);
                    }
                    if (tile.getLayerValue(layer, x, y) < layerValue) {
                        tile.setLayerValue(layer, x, y, layerValue);
                    }
                }
            }
        }, progressReceiver);
    } else if (layer.getDataSize() == Layer.DataSize.BIT) {
        dimension.visitTiles().forFilter(filter).andDo(tile -> {
            final int worldTileX = tile.getX() << TILE_SIZE_BITS;
            final int worldTileY = tile.getY() << TILE_SIZE_BITS;
            for (int x = 0; x < TILE_SIZE; x++) {
                for (int y = 0; y < TILE_SIZE; y++) {
                    boolean set;
                    if (filter == null) {
                        set = true;
                    } else {
                        float strength = filter.modifyStrength(worldTileX | x, worldTileY | y, 1.0f);
                        set = (strength > 0.95f) || (Math.random() < strength);
                    }
                    if (set && (!tile.getBitLayerValue(layer, x, y))) {
                        tile.setBitLayerValue(layer, x, y, true);
                    }
                }
            }
        }, progressReceiver);
    } else if (layer.getDataSize() == Layer.DataSize.BIT_PER_CHUNK) {
        dimension.visitTiles().forFilter(filter).andDo(tile -> {
            final int worldTileX = tile.getX() << TILE_SIZE_BITS;
            final int worldTileY = tile.getY() << TILE_SIZE_BITS;
            for (int x = 0; x < TILE_SIZE; x += 16) {
                for (int y = 0; y < TILE_SIZE; y += 16) {
                    boolean set;
                    if (filter == null) {
                        set = true;
                    } else {
                        float strength = filter.modifyStrength(worldTileX | x, worldTileY | y, 1.0f);
                        set = (strength > 0.95f) || (Math.random() < strength);
                    }
                    if (set && (!tile.getBitLayerValue(layer, x, y))) {
                        tile.setBitLayerValue(layer, x, y, true);
                    }
                }
            }
        }, progressReceiver);
    } else {
        throw new UnsupportedOperationException();
    }
}
Also used : CustomBiomeManager(org.pepsoft.worldpainter.biomeschemes.CustomBiomeManager) BiomeHelper(org.pepsoft.worldpainter.biomeschemes.BiomeHelper) Arrays(java.util.Arrays) AutoBiomeScheme(org.pepsoft.worldpainter.biomeschemes.AutoBiomeScheme) Collection(java.util.Collection) Biome(org.pepsoft.worldpainter.layers.Biome) ProgressDialog(org.pepsoft.util.swing.ProgressDialog) Listener(org.pepsoft.worldpainter.panels.BrushOptions.Listener) Set(java.util.Set) DefaultFilter(org.pepsoft.worldpainter.panels.DefaultFilter) TILE_SIZE(org.pepsoft.worldpainter.Constants.TILE_SIZE) Layer(org.pepsoft.worldpainter.layers.Layer) TerrainListCellRenderer(org.pepsoft.worldpainter.themes.TerrainListCellRenderer) ProgressTask(org.pepsoft.util.swing.ProgressTask) FloodWithLava(org.pepsoft.worldpainter.layers.FloodWithLava) ObservableBoolean(org.pepsoft.util.ObservableBoolean) ProgressReceiver(org.pepsoft.util.ProgressReceiver) SelectionBlock(org.pepsoft.worldpainter.selection.SelectionBlock) OperationCancelled(org.pepsoft.util.ProgressReceiver.OperationCancelled) SelectionChunk(org.pepsoft.worldpainter.selection.SelectionChunk) SelectionHelper(org.pepsoft.worldpainter.selection.SelectionHelper) TILE_SIZE_BITS(org.pepsoft.worldpainter.Constants.TILE_SIZE_BITS) Filter(org.pepsoft.worldpainter.operations.Filter) javax.swing(javax.swing) Layer(org.pepsoft.worldpainter.layers.Layer)

Aggregations

Filter (org.pepsoft.worldpainter.operations.Filter)6 javax.swing (javax.swing)5 ObservableBoolean (org.pepsoft.util.ObservableBoolean)4 ProgressReceiver (org.pepsoft.util.ProgressReceiver)4 OperationCancelled (org.pepsoft.util.ProgressReceiver.OperationCancelled)4 AutoBiomeScheme (org.pepsoft.worldpainter.biomeschemes.AutoBiomeScheme)4 BiomeHelper (org.pepsoft.worldpainter.biomeschemes.BiomeHelper)4 CustomBiomeManager (org.pepsoft.worldpainter.biomeschemes.CustomBiomeManager)4 DefaultFilter (org.pepsoft.worldpainter.panels.DefaultFilter)4 SelectionBlock (org.pepsoft.worldpainter.selection.SelectionBlock)4 SelectionChunk (org.pepsoft.worldpainter.selection.SelectionChunk)4 Arrays (java.util.Arrays)3 Collection (java.util.Collection)3 Set (java.util.Set)3 ProgressDialog (org.pepsoft.util.swing.ProgressDialog)3 ProgressTask (org.pepsoft.util.swing.ProgressTask)3 TILE_SIZE (org.pepsoft.worldpainter.Constants.TILE_SIZE)3 TILE_SIZE_BITS (org.pepsoft.worldpainter.Constants.TILE_SIZE_BITS)3 java.awt (java.awt)2 java.util (java.util)2