View Javadoc

1   /*
2    * Copyright 2006 Robert Hanson <iamroberthanson AT gmail.com>
3    * 
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    * 
8    *    http://www.apache.org/licenses/LICENSE-2.0
9    * 
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  
17  package org.gwtwidgets.client.ui.gsearch;
18  
19  import com.google.gwt.core.client.JavaScriptObject;
20  
21  /***
22   * Java Class wrapping an underlying JSNI implementation of the 
23   * GlocalSearch object
24   *  
25   * @author Adam Tacy
26   * @version 0.0.2
27   */
28  public class GlocalSearch extends JavaScriptObject{
29  
30  	
31  	/***
32  	 * Link to the underlying JavaScript object 
33  	 */
34  	private static GlocalSearchImpl impl = new GlocalSearchImpl();
35  	
36  
37  	/***
38  	 * Create an instance of a GlocalSearch object.
39  	 * @return
40  	 */
41  	public static GlocalSearch create(){
42  		return impl.create();
43  	}
44  	
45  	/***
46  	 * Execute a search on this particular object only.
47  	 *
48  	 */
49  	public void execute(){
50  		impl.execute(this);
51  	}
52  	
53  	/***
54  	 * Method to set the centre point - currently only strings are allowed
55  	 * but the API allows a GLatLng to be used, though this would imply a
56  	 * dependancy on Google Maps which we wish to avoid, just for now. 
57  	 * @param location
58  	 */
59  	public void setCenterPoint(String location) {
60  		impl.setCenterPoint(this,location);		
61  	}
62  	
63  	
64  	/***
65  	 * Constructor
66  	 * @param opaque
67  	 */protected GlocalSearch(int opaque) {
68  		super(opaque);
69  	}	
70  }