source: josm/src/org/openstreetmap/josm/gui/layer/LayerFactory.java@ 17

Last change on this file since 17 was 17, checked in by imi, 19 years ago
  • added Layer support
  • added support for raw GPS data
  • fixed tooltips
  • added options for loading gpx files
File size: 698 bytes
Line 
1package org.openstreetmap.josm.gui.layer;
2
3import org.openstreetmap.josm.data.osm.DataSet;
4
5/**
6 * A factory class that create Layers.
7 *
8 * @author imi
9 */
10public class LayerFactory {
11
12 /**
13 * Create a layer from a given DataSet. The DataSet cannot change over the
14 * layers lifetime (but the data in the dataset may change)
15 *
16 * @param dataSet The dataSet this layer displays.
17 * @param rawGps <code>true</code>, if the dataSet contain raw gps data.
18 * @return The created layer instance.
19 */
20 public static Layer create(DataSet dataSet, String name, boolean rawGps) {
21 Layer layer = rawGps ? new RawGpsDataLayer(dataSet, name) : new OsmDataLayer(dataSet, name);
22 return layer;
23 }
24}
Note: See TracBrowser for help on using the repository browser.