KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > ca > mcgill > sable > soot > ui > OptionData


1 /* Soot - a J*va Optimization Framework
2  * Copyright (C) 2003 Jennifer Lhotak
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA.
18  */

19
20 package ca.mcgill.sable.soot.ui;
21
22 public class OptionData {
23
24     private String JavaDoc text;
25     private String JavaDoc parentAlias;
26     private String JavaDoc alias;
27     private String JavaDoc tooltip;
28     private boolean defaultVal;
29     private String JavaDoc realAlias;
30     private String JavaDoc initText;
31     
32     /**
33      * Constructor for OptionData.
34      */

35     public OptionData() {
36         super();
37     }
38     
39     
40     /**
41      * Constructor for OptionData.
42      */

43     public OptionData(String JavaDoc text, String JavaDoc phaseAlias, String JavaDoc parentAlias, String JavaDoc alias, String JavaDoc tooltip) {
44         super();
45         setText(text);
46         setParentAlias(phaseAlias+" "+parentAlias);
47         setAlias(alias);
48         setRealAlias(getParentAlias()+" "+getAlias());
49         setRealAlias(getRealAlias().trim());
50         setTooltip(tooltip);
51         setDefaultVal(false);
52     }
53     
54     /**
55      * Constructor for OptionData.
56      */

57     public OptionData(String JavaDoc text, String JavaDoc phaseAlias, String JavaDoc parentAlias, String JavaDoc alias, String JavaDoc tooltip, boolean defaultVal) {
58         super();
59         setText(text);
60         setParentAlias(phaseAlias+" "+parentAlias);
61         setAlias(alias);
62         setRealAlias(getParentAlias()+" "+getAlias());
63         setRealAlias(getRealAlias().trim());
64         setTooltip(tooltip);
65         setDefaultVal(defaultVal);
66     }
67     
68     /**
69      * Constructor for OptionData.
70      */

71     public OptionData(String JavaDoc text, String JavaDoc phaseAlias, String JavaDoc parentAlias, String JavaDoc alias, String JavaDoc tooltip, String JavaDoc initText) {
72         super();
73         setText(text);
74         setParentAlias(phaseAlias+" "+parentAlias);
75         setAlias(alias);
76         setRealAlias(getParentAlias()+" "+getAlias());
77         setRealAlias(getRealAlias().trim());
78         setTooltip(tooltip);
79         setDefaultVal(false);
80         setInitText(initText);
81     }
82     
83     /**
84      * Constructor for OptionData.
85      */

86     public OptionData(String JavaDoc text, String JavaDoc alias, String JavaDoc tooltip, boolean defaultVal) {
87         super();
88         setText(text);
89         setAlias(alias);
90         setRealAlias(getAlias());
91         setRealAlias(getRealAlias().trim());
92         setTooltip(tooltip);
93         setDefaultVal(defaultVal);
94     }
95     
96         
97     /**
98      * Returns the alias.
99      * @return String
100      */

101     public String JavaDoc getAlias() {
102         return alias;
103     }
104
105     /**
106      * Returns the text.
107      * @return String
108      */

109     public String JavaDoc getText() {
110         return text;
111     }
112
113     /**
114      * Returns the tooltip.
115      * @return String
116      */

117     public String JavaDoc getTooltip() {
118         return tooltip;
119     }
120
121     /**
122      * Sets the alias.
123      * @param alias The alias to set
124      */

125     public void setAlias(String JavaDoc alias) {
126         this.alias = alias;
127     }
128
129     /**
130      * Sets the text.
131      * @param text The text to set
132      */

133     public void setText(String JavaDoc text) {
134         this.text = text;
135     }
136
137     /**
138      * Sets the tooltip.
139      * @param tooltip The tooltip to set
140      */

141     public void setTooltip(String JavaDoc tooltip) {
142         this.tooltip = tooltip;
143     }
144
145     /**
146      * Returns the defaultVal.
147      * @return boolean
148      */

149     public boolean isDefaultVal() {
150         return defaultVal;
151     }
152
153     /**
154      * Sets the defaultVal.
155      * @param defaultVal The defaultVal to set
156      */

157     public void setDefaultVal(boolean defaultVal) {
158         this.defaultVal = defaultVal;
159     }
160
161     /**
162      * Returns the parentAlias.
163      * @return String
164      */

165     public String JavaDoc getParentAlias() {
166         return parentAlias;
167     }
168
169     /**
170      * Sets the parentAlias.
171      * @param parentAlias The parentAlias to set
172      */

173     public void setParentAlias(String JavaDoc parentAlias) {
174         this.parentAlias = parentAlias;
175     }
176
177     /**
178      * Returns the realAlias.
179      * @return String
180      */

181     public String JavaDoc getRealAlias() {
182         return realAlias;
183     }
184
185     /**
186      * Sets the realAlias.
187      * @param realAlias The realAlias to set
188      */

189     public void setRealAlias(String JavaDoc realAlias) {
190         this.realAlias = realAlias;
191     }
192
193     /**
194      * Returns the initText.
195      * @return String
196      */

197     public String JavaDoc getInitText() {
198         return initText;
199     }
200
201     /**
202      * Sets the initText.
203      * @param initText The initText to set
204      */

205     public void setInitText(String JavaDoc initText) {
206         this.initText = initText;
207     }
208
209 }
210
Popular Tags