net.refractions.udig.project.ui
Class PlatformGIS

java.lang.Object
  extended by net.refractions.udig.project.ui.PlatformGIS

Deprecated. - use to ApplicationGIS

public class PlatformGIS
extends java.lang.Object

A facade into udig to simplify operations such as getting the active map and openning a map editor.

Since:
0.9.0
Author:
jeichar

Constructor Summary
PlatformGIS()
          Deprecated.  
 
Method Summary
static void addLayersToActiveMap(java.util.List<IGeoResource> resources)
          Deprecated. - use to ApplicationGIS#addLayersToMap(IMap, List, int, Project))
static void createAndOpenMap(java.util.List<IGeoResource> resources)
          Deprecated. - use to ApplicationGIS#createAndOpenMap(List))
static void createAndOpenMap(java.util.List<IGeoResource> resources, IProject owner)
          Deprecated. - use to ApplicationGIS#createAndOpenMap(List, IProject))
static IMap getActiveMap()
          Deprecated. - use to ApplicationGIS.getActiveMap()()
static IProject getActiveProject()
          Deprecated. - use to ApplicationGIS.getActiveProject()
static java.util.List<IMap> getMaps()
          Deprecated. - use to ApplicationGIS.getOpenMaps()
static IViewPart getView(boolean show, java.lang.String id)
          Deprecated. - use to ApplicationGIS#getView(boolean, String))
static void openMap(IMap map)
          Deprecated. - use to ApplicationGIS.openMap(IMap)
static void run(ISafeRunnable request)
          Deprecated. - use to net.refractions.udig.ui.PlatformGIS#run(ISafeRunnable)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlatformGIS

public PlatformGIS()
Deprecated. 
Method Detail

getActiveProject

public static IProject getActiveProject()
Deprecated. - use to ApplicationGIS.getActiveProject()

May return null of no project is active.

Returns:
The current active project, or null if no such project exists.

getActiveMap

public static IMap getActiveMap()
Deprecated. - use to ApplicationGIS.getActiveMap()()

May return null if the active editor is not a Map Editor.

Returns:
the map contained by the current MapEditor or null if the active editor is not a map editor.

getMaps

public static java.util.List<IMap> getMaps()
Deprecated. - use to ApplicationGIS.getOpenMaps()

May return null if no Map Editors exist.

Returns:
a list of maps contained or null if no Map Editors exist.

openMap

public static void openMap(IMap map)
Deprecated. - use to ApplicationGIS.openMap(IMap)

Opens a Map editor for the provided map.

Parameters:
map - the map to open. Must be an instance of Map.

createAndOpenMap

public static void createAndOpenMap(java.util.List<IGeoResource> resources)
Deprecated. - use to ApplicationGIS#createAndOpenMap(List))

creates a map and opens an editor for the map.

Parameters:
a - list of IGeoResources. Each resource will be a layer in the created map.

createAndOpenMap

public static void createAndOpenMap(java.util.List<IGeoResource> resources,
                                    IProject owner)
Deprecated. - use to ApplicationGIS#createAndOpenMap(List, IProject))

creates a map and opens an editor for the map.

Parameters:
a - list of IGeoResources. Each resource will be a layer in the created map.
owner - the project that will contain the map. owner must be an instance of Project. If it is obtained using the framework then this will always be the case.

addLayersToActiveMap

public static void addLayersToActiveMap(java.util.List<IGeoResource> resources)
                                 throws java.lang.IllegalStateException
Deprecated. - use to ApplicationGIS#addLayersToMap(IMap, List, int, Project))

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 active map.
Throws:
java.lang.IllegalStateException

getView

public static IViewPart getView(boolean show,
                                java.lang.String id)
Deprecated. - use to ApplicationGIS#getView(boolean, String))

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.
id - the id of the view to show.
Returns:
returns the view or null if the view does not exist

run

public static void run(ISafeRunnable request)
Deprecated. - use to net.refractions.udig.ui.PlatformGIS#run(ISafeRunnable)

Runs the given runnable in a protected mode. Exceptions thrown in the runnable are logged and passed to the runnable's exception handler. Such exceptions are not rethrown by this method.