Search in sources :

Example 1 with MultipleGriddedElevationModelLayerRenderer

use of com.revolsys.swing.map.layer.elevation.gridded.renderer.MultipleGriddedElevationModelLayerRenderer in project com.revolsys.open by revolsys.

the class GriddedElevationModelLayer method factoryInit.

public static void factoryInit() {
    // Renderers
    MapObjectFactoryRegistry.newFactory("rasterizerGriddedElevationModelLayerRenderer", RasterizerGriddedElevationModelLayerRenderer::new);
    MapObjectFactoryRegistry.newFactory("multipleGriddedElevationModelLayerRenderer", MultipleGriddedElevationModelLayerRenderer::new);
    MapObjectFactoryRegistry.newFactory("tiledMultipleGriddedElevationModelLayerRenderer", TiledMultipleGriddedElevationModelLayerRenderer::new);
    // Layers
    MapObjectFactoryRegistry.newFactory("griddedElevationModelLayer", "Gridded Elevation Model Layer", GriddedElevationModelLayer::new);
    MapObjectFactoryRegistry.newFactory("tiledGriddedElevationModelLayer", "Tiled Gridded Elevation Model Layer", TiledGriddedElevationModelLayer::new);
    // Menus
    final EnableCheck enableCheck = RsSwingServiceInitializer.enableCheck(GriddedElevationModelReadFactory.class);
    menuItemPathAddLayer("gridded_dem", "Add Gridded Elevation Model Layer", "gridded_dem", GriddedElevationModelReadFactory.class);
    TreeNodes.addMenuItem(PathTreeNode.MENU, "gridded_dem", "Export Gridded Elevation Model", // 
    (final PathTreeNode node) -> actionExport(node)).setVisibleCheck(// 
    enableCheck).setIconName("gridded_dem", "save");
    TreeNodes.addMenuItem(PathTreeNode.MENU, "gridded_dem", "Zoom to Gridded Elevation Model", (final PathTreeNode node) -> actionZoomTo(node)).setVisibleCheck(// 
    enableCheck).setIconName("gridded_dem", "magnifier");
}
Also used : PathTreeNode(com.revolsys.swing.tree.node.file.PathTreeNode) MultipleGriddedElevationModelLayerRenderer(com.revolsys.swing.map.layer.elevation.gridded.renderer.MultipleGriddedElevationModelLayerRenderer) TiledMultipleGriddedElevationModelLayerRenderer(com.revolsys.swing.map.layer.elevation.gridded.renderer.TiledMultipleGriddedElevationModelLayerRenderer) TiledMultipleGriddedElevationModelLayerRenderer(com.revolsys.swing.map.layer.elevation.gridded.renderer.TiledMultipleGriddedElevationModelLayerRenderer) RasterizerGriddedElevationModelLayerRenderer(com.revolsys.swing.map.layer.elevation.gridded.renderer.RasterizerGriddedElevationModelLayerRenderer) EnableCheck(com.revolsys.swing.action.enablecheck.EnableCheck)

Example 2 with MultipleGriddedElevationModelLayerRenderer

use of com.revolsys.swing.map.layer.elevation.gridded.renderer.MultipleGriddedElevationModelLayerRenderer in project com.revolsys.open by revolsys.

the class GriddedElevationModelLayer method setStyle.

@SuppressWarnings("unchecked")
public void setStyle(Object style) {
    if (style instanceof Map) {
        final Map<String, Object> map = (Map<String, Object>) style;
        style = MapObjectFactory.toObject(map);
    }
    if (style instanceof MultipleGriddedElevationModelLayerRenderer) {
        final MultipleGriddedElevationModelLayerRenderer renderer = (MultipleGriddedElevationModelLayerRenderer) style;
        setRenderer(renderer);
    } else if (style instanceof RasterizerGriddedElevationModelLayerRenderer) {
        final MultipleGriddedElevationModelLayerRenderer renderer = new MultipleGriddedElevationModelLayerRenderer(this, (RasterizerGriddedElevationModelLayerRenderer) style);
        setRenderer(renderer);
    } else {
        Logs.error(this, "Cannot create renderer for: " + style);
    }
}
Also used : MultipleGriddedElevationModelLayerRenderer(com.revolsys.swing.map.layer.elevation.gridded.renderer.MultipleGriddedElevationModelLayerRenderer) TiledMultipleGriddedElevationModelLayerRenderer(com.revolsys.swing.map.layer.elevation.gridded.renderer.TiledMultipleGriddedElevationModelLayerRenderer) RasterizerGriddedElevationModelLayerRenderer(com.revolsys.swing.map.layer.elevation.gridded.renderer.RasterizerGriddedElevationModelLayerRenderer) Map(java.util.Map)

Aggregations

MultipleGriddedElevationModelLayerRenderer (com.revolsys.swing.map.layer.elevation.gridded.renderer.MultipleGriddedElevationModelLayerRenderer)2 RasterizerGriddedElevationModelLayerRenderer (com.revolsys.swing.map.layer.elevation.gridded.renderer.RasterizerGriddedElevationModelLayerRenderer)2 TiledMultipleGriddedElevationModelLayerRenderer (com.revolsys.swing.map.layer.elevation.gridded.renderer.TiledMultipleGriddedElevationModelLayerRenderer)2 EnableCheck (com.revolsys.swing.action.enablecheck.EnableCheck)1 PathTreeNode (com.revolsys.swing.tree.node.file.PathTreeNode)1 Map (java.util.Map)1