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.user.client.Element;
20  
21  /***
22   * Java Class providing operations for the underlying psuedo implementation of the 
23   * GdrawOptions object - there is no corresponding JNSI implementation for this object.
24   *  
25   * @author Adam Tacy
26   * @version 0.0.2
27   */
28  public class GdrawOptions {
29  
30  
31  	/***
32  	 * Should the input be taken from a non default input box? 
33  	 */
34  	private Element eToAttachInput=null;
35  	
36  	/***
37  	 * What should the draw mode be?
38  	 */
39  	private int drawMode = -1;
40  	
41  	/***
42  	 * Is the draw mode been set to anything but the default?
43  	 * @return True if it has.
44  	 */
45  	public boolean isDrawModeSet(){
46  		return (drawMode!=-1);
47  	}
48  
49  	/***
50  	 * Is an non default input box attached to the draw options?
51  	 * @return true if one is.
52  	 */
53  	public boolean isInputAttached(){
54  		return (eToAttachInput!=null);
55  	}
56  	
57  	
58  	/***
59  	 * Get the input element
60  	 * @return Input element
61  	 */public Element getInputElement(){
62  		return eToAttachInput;
63  	}
64  	
65  	 /***
66  	  * Set input element
67  	  * @param e Input element
68  	  */
69  	public void setInput(Element e){
70  		eToAttachInput = e;
71  	}
72  	
73  	/***
74  	 * Set Draw Mode
75  	 * @param mode The new Draw Mode
76  	 */
77  	public void setDrawMode(int mode){
78  		drawMode = mode;
79  	}
80  
81  	/***
82  	 * Get Draw Mode
83  	 * @return The Draw Mode.
84  	 */
85  	public int getDrawMode(){
86  		return drawMode;
87  	}
88  	
89  	/***
90  	 * Constructor
91  	 *
92  	 */
93  	public GdrawOptions() {
94  	}
95  }