KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > icesoft > icefaces > samples > showcase > components > effects > HighlightBean


1 /*
2  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
3  *
4  * "The contents of this file are subject to the Mozilla Public License
5  * Version 1.1 (the "License"); you may not use this file except in
6  * compliance with the License. You may obtain a copy of the License at
7  * http://www.mozilla.org/MPL/
8  *
9  * Software distributed under the License is distributed on an "AS IS"
10  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
11  * License for the specific language governing rights and limitations under
12  * the License.
13  *
14  * The Original Code is ICEfaces 1.5 open source software code, released
15  * November 5, 2006. The Initial Developer of the Original Code is ICEsoft
16  * Technologies Canada, Corp. Portions created by ICEsoft are Copyright (C)
17  * 2004-2006 ICEsoft Technologies Canada, Corp. All Rights Reserved.
18  *
19  * Contributor(s): _____________________.
20  *
21  * Alternatively, the contents of this file may be used under the terms of
22  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"
23  * License), in which case the provisions of the LGPL License are
24  * applicable instead of those above. If you wish to allow use of your
25  * version of this file only under the terms of the LGPL License and not to
26  * allow others to use your version of this file under the MPL, indicate
27  * your decision by deleting the provisions above and replace them with
28  * the notice and other provisions required by the LGPL License. If you do
29  * not delete the provisions above, a recipient may use your version of
30  * this file under either the MPL or the LGPL License."
31  *
32  */

33
34 package com.icesoft.icefaces.samples.showcase.components.effects;
35
36 import com.icesoft.faces.context.effects.Effect;
37 import com.icesoft.faces.context.effects.Highlight;
38
39 /**
40  * <p>The HighlightBean class backs the Highlight effect demo.</p>
41  */

42 public class HighlightBean {
43     private String JavaDoc[] selectManyValues = new String JavaDoc[]{
44             "Value One",
45             "Value Two",
46             "Value Three",
47             "Value Four"
48     };
49     private Effect effectCommandButton;
50     private Effect effectCommandLink;
51     private Effect effectInputText;
52     private Effect effectInputSecret;
53     private Effect effectInputTextArea;
54     private Effect effectSelectManyCheckBox;
55     private Effect effectSelectOneMenu;
56     private Effect effectPanelGroup;
57     private Effect effectOutputText;
58     private Effect effectSelectManyListBox;
59
60     private String JavaDoc effectColor = "#ffff99";
61
62     private Effects effectsBean;
63
64     public HighlightBean(Effects effectsBean) {
65         this.effectsBean = effectsBean;
66     }
67
68     public Effect getEffectSelectManyListBox() {
69         return effectSelectManyListBox;
70     }
71
72     public void setEffectSelectManyListBox(Effect effectSelectManyListBox) {
73         this.effectSelectManyListBox = effectSelectManyListBox;
74     }
75
76     public Effect getEffectOutputText() {
77         return effectOutputText;
78     }
79
80     public void setEffectOutputText(Effect effectOutputText) {
81         this.effectOutputText = effectOutputText;
82     }
83
84     public String JavaDoc[] getSelectManyValues() {
85         return selectManyValues;
86     }
87
88     public void setSelectManyValues(String JavaDoc[] selectManyValues) {
89         this.selectManyValues = selectManyValues;
90     }
91
92     public Effect getEffectCommandButton() {
93         return effectCommandButton;
94     }
95
96     public void setEffectCommandButton(Effect effectCommandButton) {
97         this.effectCommandButton = effectCommandButton;
98     }
99
100     public Effect getEffectCommandLink() {
101         return effectCommandLink;
102     }
103
104     public void setEffectCommandLink(Effect effectCommandLink) {
105         this.effectCommandLink = effectCommandLink;
106     }
107
108     public Effect getEffectInputText() {
109         return effectInputText;
110     }
111
112     public void setEffectInputText(Effect effectInputText) {
113         this.effectInputText = effectInputText;
114     }
115
116     public Effect getEffectInputSecret() {
117         return effectInputSecret;
118     }
119
120     public void setEffectInputSecret(Effect effectInputSecret) {
121         this.effectInputSecret = effectInputSecret;
122     }
123
124     public Effect getEffectInputTextArea() {
125         return effectInputTextArea;
126     }
127
128     public void setEffectInputTextArea(Effect effectInputTextArea) {
129         this.effectInputTextArea = effectInputTextArea;
130     }
131
132     public Effect getEffectSelectManyCheckBox() {
133         return effectSelectManyCheckBox;
134     }
135
136     public void setEffectSelectManyCheckBox(Effect effectSelectManyCheckBox) {
137         this.effectSelectManyCheckBox = effectSelectManyCheckBox;
138     }
139
140     public Effect getEffectSelectOneMenu() {
141         return effectSelectOneMenu;
142     }
143
144     public void setEffectSelectOneMenu(Effect effectSelectOneMenu) {
145         this.effectSelectOneMenu = effectSelectOneMenu;
146     }
147
148     public Effect getEffectPanelGroup() {
149         return effectPanelGroup;
150     }
151
152     public void setEffectPanelGroup(Effect effectPanelGroup) {
153         this.effectPanelGroup = effectPanelGroup;
154     }
155
156     public String JavaDoc getEffectColor() {
157         return effectColor;
158     }
159
160     public void setEffectColor(String JavaDoc effectColor) {
161         this.effectColor = effectColor;
162     }
163
164     public String JavaDoc invokeEffect() {
165         invokeEffect(effectColor);
166         return null;
167     }
168
169     private void invokeEffect(String JavaDoc color) {
170         float seconds = effectsBean.getDurationPrimitive();
171
172         //colour
173
effectCommandButton = new Highlight(color);
174         effectCommandLink = new Highlight(color);
175         effectInputText = new Highlight(color);
176         effectInputSecret = new Highlight(color);
177         effectInputTextArea = new Highlight(color);
178         effectSelectManyCheckBox = new Highlight(color);
179         effectSelectOneMenu = new Highlight(color);
180         effectPanelGroup = new Highlight(color);
181         effectSelectManyListBox = new Highlight(color);
182         effectOutputText = new Highlight(color);
183
184         //duration
185
effectCommandButton.setDuration(seconds);
186         effectCommandLink.setDuration(seconds);
187         effectInputText.setDuration(seconds);
188         effectInputSecret.setDuration(seconds);
189         effectInputTextArea.setDuration(seconds);
190         effectSelectManyCheckBox.setDuration(seconds);
191         effectSelectOneMenu.setDuration(seconds);
192         effectPanelGroup.setDuration(seconds);
193         effectSelectManyListBox.setDuration(seconds);
194         effectOutputText.setDuration(seconds);
195     }
196 }
197
Popular Tags