1
2
3
4
5
6
7
8
9
10
11
12
13
14
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 }