SourceForge: gwt-openlayers/gwt-openlayers: changeset 196:85f43689abbc
add new functions for ol
authormichelvitor2
Wed Nov 04 11:47:12 2009 -0200 (2 weeks ago)
changeset 19685f43689abbc
parent 1953511257f442f
child 1976d872863e8f7
add new functions for ol
src/main/java/org/gwtopenmaps/openlayers/client/event/BoxEvent.java
src/main/java/org/gwtopenmaps/openlayers/client/event/BoxEventListener.java
src/main/java/org/gwtopenmaps/openlayers/client/layer/ArcGIS93Rest.java
src/main/java/org/gwtopenmaps/openlayers/client/layer/ArcGIS93RestImpl.java
src/main/java/org/gwtopenmaps/openlayers/client/layer/ArcGIS93RestOptions.java
src/main/java/org/gwtopenmaps/openlayers/client/layer/Boxes.java
src/main/java/org/gwtopenmaps/openlayers/client/layer/BoxesImpl.java
src/main/java/org/gwtopenmaps/openlayers/client/layer/GridLayer.java
src/main/java/org/gwtopenmaps/openlayers/client/layer/GridLayerImpl.java
src/main/java/org/gwtopenmaps/openlayers/client/layer/WMS.java
src/main/java/org/gwtopenmaps/openlayers/client/marker/Box.java
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/main/java/org/gwtopenmaps/openlayers/client/event/BoxEvent.java	Wed Nov 04 11:47:12 2009 -0200
     1.3 @@ -0,0 +1,20 @@
     1.4 +package org.gwtopenmaps.openlayers.client.event;
     1.5 +
     1.6 +import org.gwtopenmaps.openlayers.client.marker.Box;
     1.7 +import org.gwtopenmaps.openlayers.client.util.JSObject;
     1.8 +/**
     1.9 +*
    1.10 +* @author Michel Vitor - Intec
    1.11 +*
    1.12 +*/
    1.13 +public class BoxEvent extends EventObject{
    1.14 +
    1.15 +	protected BoxEvent(JSObject eventObject) {
    1.16 +		super(eventObject);
    1.17 +	}
    1.18 +	public Box getSource(){
    1.19 +		JSObject object = getSourceJSObject();
    1.20 +		return (object!=null)?Box.narrowToBox(object):null;
    1.21 +	}
    1.22 +
    1.23 +}
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/src/main/java/org/gwtopenmaps/openlayers/client/event/BoxEventListener.java	Wed Nov 04 11:47:12 2009 -0200
     2.3 @@ -0,0 +1,17 @@
     2.4 +package org.gwtopenmaps.openlayers.client.event;
     2.5 +/**
     2.6 +*
     2.7 +* @author Michel Vitor - Intec
     2.8 +*
     2.9 +*/
    2.10 +public interface BoxEventListener extends EventListener {
    2.11 +	
    2.12 +	class BoxEvents extends BoxEvent {
    2.13 +
    2.14 +		public BoxEvents(EventObject eventObject) {
    2.15 +			super(eventObject.getJSObject());
    2.16 +		}
    2.17 +	}
    2.18 +	public void onBox(BoxEvents eventObject);
    2.19 +
    2.20 +}
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/src/main/java/org/gwtopenmaps/openlayers/client/layer/ArcGIS93Rest.java	Wed Nov 04 11:47:12 2009 -0200
     3.3 @@ -0,0 +1,205 @@
     3.4 +package org.gwtopenmaps.openlayers.client.layer;
     3.5 +
     3.6 +import org.gwtopenmaps.openlayers.client.Bounds;
     3.7 +import org.gwtopenmaps.openlayers.client.Pixel;
     3.8 +import org.gwtopenmaps.openlayers.client.util.JSObject;
     3.9 +import org.gwtopenmaps.openlayers.client.util.JStringArray;
    3.10 +
    3.11 +/**
    3.12 + * @author Michel Vitor A Rodrigues - Intec
    3.13 + */
    3.14 +public class ArcGIS93Rest extends Layer {
    3.15 +
    3.16 +	protected ArcGIS93Rest(JSObject element) {
    3.17 +		super(element);
    3.18 +	}
    3.19 +	/**
    3.20 +     * Constructor: ArcGIS93Rest
    3.21 +     * Create a new ArcGIS93Rest layer object.
    3.22 +     *
    3.23 +     * Example:
    3.24 +     * (code)
    3.25 +     * ArcGIS93Rest arcGIS93Rest = new ArcGIS93Rest("MyName",
    3.26 +     *                                    "http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StateCityHighway_USA/MapServer/export",
    3.27 +     *                                    WMSParams,ArcGIS93RestOptions
    3.28 +     *                                    );
    3.29 +     * (end)
    3.30 +     *
    3.31 +     * Parameters:
    3.32 +     * name - {String} A name for the layer
    3.33 +     * url - {String} Base url for the ArcGIS server REST service
    3.34 +     * options - {Object} An object with key/value pairs representing the
    3.35 +     *                    options and option values.
    3.36 +     * Valid Options:
    3.37 +     *        format: {String} MIME type of desired image type.
    3.38 +     *        layers: {String} Comma-separated list of layers to display.
    3.39 +     *        srs: {String} Projection ID.
    3.40 +     */
    3.41 +	
    3.42 +	public ArcGIS93Rest(String name, String url, WMSParams params,
    3.43 +			ArcGIS93RestOptions options) {
    3.44 +		this(ArcGIS93RestImpl.create(name, url, params.getJSObject(), options.getJSObject()));
    3.45 +	}
    3.46 +	/**
    3.47 +     * Constructor: ArcGIS93Rest
    3.48 +     * Create a new ArcGIS93Rest layer object.
    3.49 +     *
    3.50 +     * Example:
    3.51 +     * (code)
    3.52 +     * ArcGIS93Rest arcGIS93Rest = new ArcGIS93Rest("MyName",
    3.53 +     *                                    "http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StateCityHighway_USA/MapServer/export",
    3.54 +     *                                    WMSParams
    3.55 +     *                                    );
    3.56 +     * (end)
    3.57 +     *
    3.58 +     * Parameters:
    3.59 +     * name - {String} A name for the layer
    3.60 +     * url - {String} Base url for the ArcGIS server REST service
    3.61 +     */
    3.62 +	public ArcGIS93Rest(String name, String url, WMSParams params) {
    3.63 +
    3.64 +		this(ArcGIS93RestImpl.create(name, url, params.getJSObject()));
    3.65 +	}
    3.66 +	/**
    3.67 +     * Constructor: ArcGIS93Rest
    3.68 +     * Create a new ArcGIS93Rest layer object.
    3.69 +     *
    3.70 +     * Example:
    3.71 +     * (code)
    3.72 +     * ArcGIS93Rest arcGIS93Rest = new ArcGIS93Rest("MyName",
    3.73 +     *                                    "http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StateCityHighway_USA/MapServer/export",
    3.74 +     *                                    WMSParams
    3.75 +     *                                    );
    3.76 +     * (end)
    3.77 +     *
    3.78 +     * Parameters:
    3.79 +     * name - {String} A name for the layer
    3.80 +     * vetor url[] - {String} Base url for the ArcGIS server REST service
    3.81 +     * options - {Object} An object with key/value pairs representing the
    3.82 +     *                    options and option values.
    3.83 +     * Valid Options:
    3.84 +     *        format: {String} MIME type of desired image type.
    3.85 +     *        layers: {String} Comma-separated list of layers to display.
    3.86 +     *        srs: {String} Projection ID.
    3.87 +     */
    3.88 +	public ArcGIS93Rest(String name, String[] urls, WMSParams params) {
    3.89 +		this(ArcGIS93RestImpl.create(name, new JStringArray(urls).getJSObject(), params.getJSObject()));
    3.90 +	}
    3.91 +	/**
    3.92 +     * Constructor: ArcGIS93Rest
    3.93 +     * Create a new ArcGIS93Rest layer object.
    3.94 +     *
    3.95 +     * Example:
    3.96 +     * (code)
    3.97 +     * ArcGIS93Rest arcGIS93Rest = new ArcGIS93Rest("MyName",
    3.98 +     *                                    "http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StateCityHighway_USA/MapServer/export",
    3.99 +     *                                    WMSParams
   3.100 +     *                                    );
   3.101 +     * (end)
   3.102 +     *
   3.103 +     * Parameters:
   3.104 +     * name - {String} A name for the layer
   3.105 +     * vetor url[] - {String} Base url for the ArcGIS server REST service
   3.106 +     * 
   3.107 +     * 
   3.108 +     */
   3.109 +	public ArcGIS93Rest(String name, String[] urls, WMSParams params, WMSOptions layerParams) {
   3.110 +		this(ArcGIS93RestImpl.create(name, new JStringArray(urls).getJSObject(), params.getJSObject(), layerParams.getJSObject()));
   3.111 +	}
   3.112 +	/**
   3.113 +     * APIProperty: isBaseLayer
   3.114 +     * {Boolean} Default is true for ArcGIS93Rest layer
   3.115 +     */
   3.116 +	public void setIsBaseLayer(boolean isBaseLayer){
   3.117 +		ArcGIS93RestImpl.setIsBaseLayer(getJSObject(), isBaseLayer);		
   3.118 +	}
   3.119 +	/**
   3.120 +     * Method: destroy
   3.121 +     * Destroy this layer
   3.122 +     */
   3.123 +	public void destroy(){
   3.124 +		ArcGIS93RestImpl.destroy(getJSObject());
   3.125 +	}
   3.126 +	/**
   3.127 +     * Method: clone
   3.128 +     * Create a clone of this layer
   3.129 +     *
   3.130 +     * Returns:
   3.131 +     * {<ArcGIS93Rest>} An exact clone of this layer
   3.132 +     */
   3.133 +	public ArcGIS93Rest Clone(ArcGIS93Rest obj){
   3.134 +	   return new ArcGIS93Rest( ArcGIS93RestImpl.Clone(getJSObject(),obj.getJSObject()));
   3.135 +	}
   3.136 +	/**
   3.137 +     * Method: getURL
   3.138 +     * Return an image url this layer.
   3.139 +     *
   3.140 +     * Parameters:
   3.141 +     * bounds - {<Bounds>} A bounds representing the bbox for the
   3.142 +     *                                request.
   3.143 +     *
   3.144 +     * Returns:
   3.145 +     * {String} A string with the map image's url.
   3.146 +     */
   3.147 +	public String getURL(Bounds bounds){
   3.148 +		return ArcGIS93RestImpl.getURL(getJSObject(), bounds.getJSObject());
   3.149 +	}
   3.150 +	/**
   3.151 +     * Method: setLayerFilter
   3.152 +     * addTile creates a tile, initializes it, and adds it to the layer div. 
   3.153 +     *
   3.154 +     * Parameters:
   3.155 +     * id - {String} The id of the layer to which the filter applies.
   3.156 +     * queryDef - {String} A sql-ish query filter, for more detail see the ESRI
   3.157 +     *                     documentation at http://sampleserver1.arcgisonline.com/ArcGIS/SDK/REST/export.html
   3.158 +     */
   3.159 +	public void setLayerFilter(String id,String  queryDef){
   3.160 +		ArcGIS93RestImpl.setLayerFilter(getJSObject(), id, queryDef);
   3.161 +	}
   3.162 +	/**
   3.163 +     * Method: clearLayerFilter
   3.164 +     * Clears layer filters, either from a specific layer,
   3.165 +     * or all of them.
   3.166 +     *
   3.167 +     * Parameters:
   3.168 +     * id - {String} The id of the layer from which to remove any
   3.169 +     *               filter.  If unspecified/blank, all filters
   3.170 +     *               will be removed.
   3.171 +     */
   3.172 +	public void clearLayerFilter(String id){
   3.173 +		ArcGIS93RestImpl.clearLayerFilter(getJSObject(), id);
   3.174 +	}
   3.175 +	 /**
   3.176 +     * APIMethod: mergeNewParams
   3.177 +     * Catch changeParams and uppercase the new params to be merged in
   3.178 +     *     before calling changeParams on the super class.
   3.179 +     * 
   3.180 +     *     Once params have been changed, the tiles will be reloaded with
   3.181 +     *     the new parameters.
   3.182 +     * 
   3.183 +     * Parameters:
   3.184 +     * newParams - {Object} Hashtable of new params to use
   3.185 +     */
   3.186 +	public void mergeNewParams(WMSParams params){
   3.187 +		ArcGIS93RestImpl.mergeNewParams(getJSObject(), params.getJSObject());
   3.188 +	}
   3.189 +	 /**
   3.190 +     * Method: addTile
   3.191 +     * addTile creates a tile, initializes it, and adds it to the layer div. 
   3.192 +     *
   3.193 +     * Parameters:
   3.194 +     * bounds - {<Bounds>}
   3.195 +     * position - {<Pixel>}
   3.196 +     * 
   3.197 +     * Returns:
   3.198 +     * {<Image>} The added OpenLayers.Tile.Image
   3.199 +     */
   3.200 +	public void addTile(Bounds bounds ,Pixel position){
   3.201 +		ArcGIS93RestImpl.addTile(getJSObject(), bounds.getJSObject(), position.getJSObject());
   3.202 +	}
   3.203 +	
   3.204 +	public int getNumLoadingTiles(){
   3.205 +		return WMSImpl.getNumLoadingTiles(this.getJSObject());
   3.206 +	}
   3.207 +	
   3.208 +}
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/src/main/java/org/gwtopenmaps/openlayers/client/layer/ArcGIS93RestImpl.java	Wed Nov 04 11:47:12 2009 -0200
     4.3 @@ -0,0 +1,72 @@
     4.4 +package org.gwtopenmaps.openlayers.client.layer;
     4.5 +
     4.6 +import org.gwtopenmaps.openlayers.client.util.JSObject;
     4.7 +
     4.8 +/**
     4.9 +* @author Michel Vitor A Rodrigues
    4.10 +*/
    4.11 +public class ArcGIS93RestImpl {
    4.12 +	
    4.13 +	public static native JSObject create(String name, String url,JSObject params, JSObject options)/*-{
    4.14 +			return new $wnd.OpenLayers.Layer.ArcGIS93Rest(name, url, params,options);
    4.15 +	}-*/;
    4.16 +	
    4.17 +	public static native JSObject create(String name, String url,JSObject params)/*-{
    4.18 +			return new $wnd.OpenLayers.Layer.ArcGIS93Rest(name, url, params);
    4.19 +	}-*/;
    4.20 +	
    4.21 +	public static native JSObject create(String name, JSObject urls,
    4.22 +			JSObject params)/*-{
    4.23 +	    var wmsURLs = new $wnd.Array(urls.length);
    4.24 +		for (i = 0; i < urls.length; i++) {
    4.25 +		  wmsURLs[i] = urls[i];
    4.26 +		}
    4.27 +
    4.28 +		return new $wnd.OpenLayers.Layer.ArcGIS93Rest(name, wmsURLs, params);
    4.29 +	   }-*/;
    4.30 +
    4.31 +	public static native JSObject create(String name, JSObject urls,
    4.32 +			JSObject params, JSObject layerParams)/*-{
    4.33 +		var wmsURLs = new $wnd.Array(urls.length);
    4.34 +		for (i = 0; i < urls.length; i++) {
    4.35 +		  wmsURLs[i] = urls[i];
    4.36 +		}
    4.37 +
    4.38 +		return new $wnd.OpenLayers.Layer.ArcGIS93Rest(name, wmsURLs, params, layerParams);
    4.39 +	}-*/;
    4.40 +	
    4.41 +	public static native void setIsBaseLayer(JSObject self, boolean isBaseLayer)/*-{
    4.42 +		self.isBaseLayer = isBaseLayer;
    4.43 +	}-*/;
    4.44 +	
    4.45 +	public static native void destroy(JSObject arcGIS93Rest)/*-{
    4.46 +		arcGIS93Rest.destroy();
    4.47 +	}-*/;
    4.48 +	
    4.49 +	public static native JSObject Clone(JSObject arcGIS93Rest, JSObject obj)/*-{
    4.50 +		return arcGIS93Rest.clone(obj);
    4.51 +	}-*/;
    4.52 +	
    4.53 +	public static native String getURL(JSObject arcGIS93Rest, JSObject bounds)/*-{
    4.54 +		return arcGIS93Rest.getURL(bounds);
    4.55 +	}-*/;
    4.56 +	
    4.57 +	public static native void setLayerFilter(JSObject arcGIS93Rest, String id,String  queryDef)/*-{
    4.58 +		arcGIS93Rest.setLayerFilter(id, queryDef);
    4.59 +	}-*/;
    4.60 +	
    4.61 +	public static native void clearLayerFilter(JSObject arcGIS93Rest, String id)/*-{
    4.62 +		arcGIS93Rest.clearLayerFilter(id);
    4.63 +	}-*/;
    4.64 +	
    4.65 +	public static native void mergeNewParams(JSObject arcGIS93Rest, JSObject params)/*-{
    4.66 +		arcGIS93Rest.mergeNewParams(params);
    4.67 +	}-*/;
    4.68 +	
    4.69 +	public static native void addTile(JSObject arcGIS93Rest, JSObject bounds, JSObject position)/*-{
    4.70 +		arcGIS93Rest.addTile(bounds,position);
    4.71 +	}-*/;
    4.72 +	public static native int getNumLoadingTiles(JSObject layer)/*-{
    4.73 +	    return layer.numLoadingTiles;
    4.74 +    }-*/;
    4.75 +}
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/src/main/java/org/gwtopenmaps/openlayers/client/layer/ArcGIS93RestOptions.java	Wed Nov 04 11:47:12 2009 -0200
     5.3 @@ -0,0 +1,34 @@
     5.4 +package org.gwtopenmaps.openlayers.client.layer;
     5.5 +/**
     5.6 + * @author Michel Vitor A Rodrigues - Intec
     5.7 + */
     5.8 +public class ArcGIS93RestOptions extends GridLayerOptions {
     5.9 +	
    5.10 +	
    5.11 +	public void setSingleTile(boolean b){
    5.12 +		getJSObject().setProperty("singleTile", b);
    5.13 +	}
    5.14 +	public void setUntiled(){
    5.15 +		setSingleTile(true);
    5.16 +	}
    5.17 +
    5.18 +	public void setTransitionEffectResize(){
    5.19 +		setTransitionEffect("resize");
    5.20 +	}
    5.21 +	public void setProjection(String epsgCode){
    5.22 +		getJSObject().setProperty("projection", epsgCode);
    5.23 +	}
    5.24 +	public void setUnits(String units){
    5.25 +		getJSObject().setProperty("units", units);
    5.26 +	}
    5.27 +	public void setWrapDateLine(boolean wrap) {
    5.28 +		getJSObject().setProperty("wrapDateLine", wrap);
    5.29 +	}
    5.30 +	public void setBuffer(int buffer){
    5.31 +		getJSObject().setProperty("buffer", buffer);
    5.32 +	}
    5.33 +
    5.34 +	public void setRatio(int ratio){
    5.35 +		getJSObject().setProperty("ratio", ratio);
    5.36 +	}
    5.37 +}
     6.1 --- a/src/main/java/org/gwtopenmaps/openlayers/client/layer/Boxes.java	Tue Oct 27 01:16:59 2009 +0100
     6.2 +++ b/src/main/java/org/gwtopenmaps/openlayers/client/layer/Boxes.java	Wed Nov 04 11:47:12 2009 -0200
     6.3 @@ -1,7 +1,10 @@
     6.4  package org.gwtopenmaps.openlayers.client.layer;
     6.5  
     6.6 +import org.gwtopenmaps.openlayers.client.marker.Box;
     6.7  import org.gwtopenmaps.openlayers.client.util.JSObject;
     6.8 -
     6.9 +/**
    6.10 +* @author Michel Vitor A Rodrigues
    6.11 +*/
    6.12  public class Boxes extends Markers {
    6.13  
    6.14  	protected Boxes(JSObject element) {
    6.15 @@ -15,5 +18,11 @@
    6.16  	public Boxes(String name) {
    6.17  		this(BoxesImpl.create(name));
    6.18  	}
    6.19 +	public void drawMarker(Box marker){
    6.20 +		BoxesImpl.drawMarker(getJSObject(), marker);	
    6.21 +	}
    6.22 +	public void removeMarker(Box marker){
    6.23 +		BoxesImpl.removeMarker(getJSObject(), marker);	
    6.24 +	}
    6.25  
    6.26  }
     7.1 --- a/src/main/java/org/gwtopenmaps/openlayers/client/layer/BoxesImpl.java	Tue Oct 27 01:16:59 2009 +0100
     7.2 +++ b/src/main/java/org/gwtopenmaps/openlayers/client/layer/BoxesImpl.java	Wed Nov 04 11:47:12 2009 -0200
     7.3 @@ -1,7 +1,10 @@
     7.4  package org.gwtopenmaps.openlayers.client.layer;
     7.5  
     7.6 +import org.gwtopenmaps.openlayers.client.marker.Box;
     7.7  import org.gwtopenmaps.openlayers.client.util.JSObject;
     7.8 -
     7.9 +/**
    7.10 +* @author Michel Vitor A Rodrigues
    7.11 +*/
    7.12  public class BoxesImpl {
    7.13  
    7.14  	public static native JSObject create(String name, JSObject options)/*-{
    7.15 @@ -11,4 +14,11 @@
    7.16  	public static native JSObject create(String name)/*-{
    7.17  	    return new $wnd.OpenLayers.Layer.Boxes(name);
    7.18  	}-*/;
    7.19 +	
    7.20 +	public static native void drawMarker(JSObject box, Box marker)/*-{
    7.21 +	    box.drawMarker(marker);
    7.22 +	}-*/;
    7.23 +	public static native void removeMarker(JSObject box, Box marker)/*-{
    7.24 +	    box.removeMarker(marker); 	
    7.25 +	}-*/;
    7.26  }
     8.1 --- a/src/main/java/org/gwtopenmaps/openlayers/client/layer/GridLayer.java	Tue Oct 27 01:16:59 2009 +0100
     8.2 +++ b/src/main/java/org/gwtopenmaps/openlayers/client/layer/GridLayer.java	Wed Nov 04 11:47:12 2009 -0200
     8.3 @@ -10,15 +10,36 @@
     8.4  * Base class for layers that use a lattice of tiles.
     8.5  *
     8.6  * @author Edwin Commandeur - Atlis EJS
     8.7 +* @author Michel Vitor A Rodrigues - Intec
     8.8  *
     8.9  */
    8.10  public class GridLayer extends HTTPRequestLayer {
    8.11  
    8.12 -	//TODO: properties that are specific to GridLayer
    8.13 -
    8.14  	protected GridLayer(JSObject element) {
    8.15  		super(element);
    8.16  	}
    8.17 -
    8.18 +    public GridLayer(String name, String url,WMSParams params,GridLayerOptions options ){
    8.19 +    	
    8.20 +    	this(GridLayerImpl.create(name, url, params.getJSObject(), options.getJSObject()));
    8.21 +    } 
    8.22 +    public GridLayer(String name, String url,WMSParams params){
    8.23 +    	
    8.24 +    	this(GridLayerImpl.create(name, url, params.getJSObject()));
    8.25 +    } 
    8.26 +    public void setTitleSize(Integer tileSize){
    8.27 +    	GridLayerImpl.setTitleSize(getJSObject(),tileSize);
    8.28 +    }
    8.29 +    public void setSingleTile(boolean singleTile){
    8.30 +    	GridLayerImpl.setSingleTile(getJSObject(),singleTile);
    8.31 +    }
    8.32 +    public void setRatio(float ratio){
    8.33 +    	GridLayerImpl.setRatio(getJSObject(), ratio);	
    8.34 +    }
    8.35 +    public void setBuffer(Integer buffer){
    8.36 +    	GridLayerImpl.setBuffer(getJSObject(), buffer);
    8.37 +    }
    8.38 +    public void setNumLoadingTiles(Integer numLoadingTiles){
    8.39 +    	GridLayerImpl.setNumLoadingTiles(getJSObject(), numLoadingTiles);
    8.40 +    }
    8.41  
    8.42  }
     9.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.2 +++ b/src/main/java/org/gwtopenmaps/openlayers/client/layer/GridLayerImpl.java	Wed Nov 04 11:47:12 2009 -0200
     9.3 @@ -0,0 +1,31 @@
     9.4 +package org.gwtopenmaps.openlayers.client.layer;
     9.5 +
     9.6 +import org.gwtopenmaps.openlayers.client.util.JSObject;
     9.7 +
     9.8 +public class GridLayerImpl {
     9.9 +
    9.10 +	public static native JSObject create(String name, String url,
    9.11 +			JSObject params, JSObject options)/*-{
    9.12 +			return new $wnd.OpenLayers.Layer.Grid(name, url, params,options);
    9.13 +		    }-*/;
    9.14 +
    9.15 +	public static native JSObject create(String name, String url,
    9.16 +			JSObject params)/*-{
    9.17 +			return new $wnd.OpenLayers.Layer.Grid(name, url, params);
    9.18 +	}-*/;
    9.19 +    public static native void setTitleSize(JSObject self,int tileSize)/*-{
    9.20 +        self.tileSize = tileSize;        
    9.21 +     }-*/;
    9.22 +    public static native void setSingleTile(JSObject self, boolean singleTile)/*-{
    9.23 +        self.singleTile = singleTile;
    9.24 +    }-*/;
    9.25 +    public static native void setRatio(JSObject self,float ratio)/*-{
    9.26 +    	self.ratio = ratio;
    9.27 +    }-*/;
    9.28 +    public static native void setBuffer(JSObject self,Integer buffer)/*-{
    9.29 +    	self.buffer = buffer;
    9.30 +    }-*/;
    9.31 +    public static native void setNumLoadingTiles(JSObject self,Integer numLoadingTiles)/*-{
    9.32 +    	self.numLoadingTiles = numLoadingTiles;
    9.33 +    }-*/;
    9.34 +}
    10.1 --- a/src/main/java/org/gwtopenmaps/openlayers/client/layer/WMS.java	Tue Oct 27 01:16:59 2009 +0100
    10.2 +++ b/src/main/java/org/gwtopenmaps/openlayers/client/layer/WMS.java	Wed Nov 04 11:47:12 2009 -0200
    10.3 @@ -28,7 +28,7 @@
    10.4  	}
    10.5  
    10.6  	public WMS(String name, String[] urls, WMSParams params, WMSOptions layerParams) {
    10.7 -			this(WMSImpl.create(name, new JStringArray(urls).getJSObject(), params.getJSObject(), layerParams.getJSObject()));
    10.8 +		this(WMSImpl.create(name, new JStringArray(urls).getJSObject(), params.getJSObject(), layerParams.getJSObject()));
    10.9  	}
   10.10  
   10.11  	public int getNumLoadingTiles(){
    11.1 --- a/src/main/java/org/gwtopenmaps/openlayers/client/marker/Box.java	Tue Oct 27 01:16:59 2009 +0100
    11.2 +++ b/src/main/java/org/gwtopenmaps/openlayers/client/marker/Box.java	Wed Nov 04 11:47:12 2009 -0200
    11.3 @@ -1,16 +1,26 @@
    11.4  package org.gwtopenmaps.openlayers.client.marker;
    11.5  
    11.6  import org.gwtopenmaps.openlayers.client.Bounds;
    11.7 -import org.gwtopenmaps.openlayers.client.LonLat;
    11.8  import org.gwtopenmaps.openlayers.client.Marker;
    11.9 +import org.gwtopenmaps.openlayers.client.event.BoxEventListener;
   11.10 +import org.gwtopenmaps.openlayers.client.event.BoxEventListener.BoxEvents;
   11.11 +import org.gwtopenmaps.openlayers.client.event.EventHandler;
   11.12 +import org.gwtopenmaps.openlayers.client.event.EventObject;
   11.13  import org.gwtopenmaps.openlayers.client.util.JSObject;
   11.14 -
   11.15 +/**
   11.16 +*
   11.17 +* @author Michel Vitor - Intec
   11.18 +*
   11.19 +*/
   11.20  public class Box extends Marker {
   11.21  
   11.22  	protected Box(JSObject element) {
   11.23  		super(element);
   11.24  	}
   11.25 -
   11.26 +	public static Box narrowToBox(JSObject element)
   11.27 +	{
   11.28 +		return (element == null)? null: new Box(element);
   11.29 +	}
   11.30  	public Box(Bounds bounds, String borderColor, int borderWidth) {
   11.31  		this(BoxImpl.create(bounds.getJSObject(), borderColor, borderWidth));
   11.32  	}
   11.33 @@ -21,5 +31,13 @@
   11.34  	public void setBorder(String borderColor, int borderWidth) {
   11.35  		BoxImpl.setBorder(getJSObject(), borderColor, borderWidth);
   11.36  	}
   11.37 +	public void addBoxEventListener(String Event, final BoxEventListener listener){
   11.38 +		eventListeners.addListener(this, listener, Event, new EventHandler (){
   11.39 +			public void onHandle(EventObject eventObject) {
   11.40 +				BoxEvents e = new BoxEvents(eventObject);
   11.41 +				listener.onBox(e);
   11.42 +			}
   11.43 +		});
   11.44 +	};
   11.45  
   11.46  }