Search in sources :

Example 1 with ElevationModelLayer

use of com.revolsys.swing.map.layer.elevation.ElevationModelLayer in project com.revolsys.open by revolsys.

the class RasterizerGriddedElevationModelLayerRenderer method addAddMenuItem.

private static void addAddMenuItem(final MenuFactory menu, final String type, final BiFunction<ElevationModelLayer, IMultipleGriddedElevationModelLayerRenderer, RasterizerGriddedElevationModelLayerRenderer> rendererFactory) {
    final String iconName = ("style_" + type.replace(' ', '_') + ":add").toLowerCase();
    final String name = "Add " + type + " Style";
    Menus.addMenuItem(menu, "add", name, iconName, (final IMultipleGriddedElevationModelLayerRenderer parentRenderer) -> {
        final ElevationModelLayer layer = parentRenderer.getLayer();
        final RasterizerGriddedElevationModelLayerRenderer newRenderer = rendererFactory.apply(layer, parentRenderer);
        parentRenderer.addRendererEdit(newRenderer);
    }, false);
}
Also used : ElevationModelLayer(com.revolsys.swing.map.layer.elevation.ElevationModelLayer)

Aggregations

ElevationModelLayer (com.revolsys.swing.map.layer.elevation.ElevationModelLayer)1