| java.lang.Object net.refractions.udig.project.ui.PlatformGIS
PlatformGIS | public class PlatformGIS (Code) | | A facade into udig to simplify operations such as getting the active map
and openning a map editor.
author: jeichar since: 0.9.0ApplicationGIS |
Method Summary | |
public static void | addLayersToActiveMap(List<IGeoResource> resources) If an active map exists the layers will be added to that map. | public static void | createAndOpenMap(List<IGeoResource> resources) creates a map and opens an editor for the map.
Parameters: a - list of IGeoResources. | public static void | createAndOpenMap(List<IGeoResource> resources, IProject owner) creates a map and opens an editor for the map.
Parameters: a - list of IGeoResources. | public static IMap | getActiveMap() May return null if the active editor is not a Map Editor.
the map contained by the current MapEditor or null if the activeeditor is not a map editor. | public static IProject | getActiveProject() May return null of no project is active. | public static List<IMap> | getMaps() May return null if no Map Editors exist. | public static IViewPart | getView(boolean show, String id) Gets a reference to a view. | public static void | openMap(IMap map) Opens a Map editor for the provided map.
Parameters: map - the map to open. | public static void | run(ISafeRunnable request) Runs the given runnable in a protected mode. |
addLayersToActiveMap | public static void addLayersToActiveMap(List<IGeoResource> resources) throws IllegalStateException(Code) | | If an active map exists the layers will be added to that map. Otherwise
an IllegalStateException will be thrown.
Parameters: a - list of IGeoResources. Each resource will be a layer in the activemap. ApplicationGIS#addLayersToMap(IMap, List, int, Project)) |
createAndOpenMap | public static void createAndOpenMap(List<IGeoResource> resources)(Code) | | creates a map and opens an editor for the map.
Parameters: a - list of IGeoResources. Each resource will be a layer in the createdmap. ApplicationGIS#createAndOpenMap(List)) |
createAndOpenMap | public static void createAndOpenMap(List<IGeoResource> resources, IProject owner)(Code) | | creates a map and opens an editor for the map.
Parameters: a - list of IGeoResources. Each resource will be a layer in the createdmap. Parameters: owner - the project that will contain the map. owner must be an instance of Project. If itis obtained using the framework then this will always be the case. ApplicationGIS#createAndOpenMap(List, IProject)) |
getActiveMap | public static IMap getActiveMap()(Code) | | May return null if the active editor is not a Map Editor.
the map contained by the current MapEditor or null if the activeeditor is not a map editor. ApplicationGIS#getActiveMap()() |
getView | public static IViewPart getView(boolean show, String id)(Code) | | Gets a reference to a view. If the view has not been opened previously then the view will be
opened.
Parameters: show - whether to show the view or not. Parameters: id - the id of the view to show. returns the view or null if the view does not exist ApplicationGIS#getView(boolean, String)) |
|
|