1 // WARNING: This file was automatically generated. Do not edit it directly,
2 // or you will lose your changes.
3
4 /*
5 * Licensed to the Apache Software Foundation (ASF) under one
6 * or more contributor license agreements. See the NOTICE file
7 * distributed with this work for additional information
8 * regarding copyright ownership. The ASF licenses this file
9 * to you under the Apache License, Version 2.0 (the
10 * "License"); you may not use this file except in compliance
11 * with the License. You may obtain a copy of the License at
12 *
13 * http://www.apache.org/licenses/LICENSE-2.0
14 *
15 * Unless required by applicable law or agreed to in writing,
16 * software distributed under the License is distributed on an
17 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
18 * KIND, either express or implied. See the License for the
19 * specific language governing permissions and limitations
20 * under the License.
21 */
22 package org.apache.myfaces.trinidad.component.core.layout;
23
24 import java.util.Arrays;
25 import java.util.Collection;
26 import java.util.Collections;
27 import java.util.List;
28 import java.util.Map;
29 import javax.faces.component.behavior.ClientBehavior;
30 import javax.faces.component.behavior.ClientBehaviorHolder;
31 import org.apache.myfaces.trinidad.bean.FacesBean;
32 import org.apache.myfaces.trinidad.bean.PropertyKey;
33 import org.apache.myfaces.trinidad.component.UIXPanel;
34 import org.apache.myfaces.trinidad.util.ComponentUtils;
35
36 /**
37 *
38 * The panelButtonBar lays out a set of buttons.
39 *
40 * <h4>Events:</h4>
41 * <table border="1" width="100%" cellpadding="3" summary="">
42 * <tr bgcolor="#CCCCFF" class="TableHeadingColor">
43 * <th align="left">Type</th>
44 * <th align="left">Phases</th>
45 * <th align="left">Description</th>
46 * </tr>
47 * <tr class="TableRowColor">
48 * <td valign="top"><code>org.apache.myfaces.trinidad.event.AttributeChangeEvent</code></td>
49 * <td valign="top" nowrap>Invoke<br>Application<br>Apply<br>Request<br>Values</td>
50 * <td valign="top">Event delivered to describe an attribute change. Attribute change events are not delivered for any programmatic change to a property. They are only delivered when a renderer changes a property without the application's specific request. An example of an attribute change event might include the width of a column that supported client-side resizing.</td>
51 * </tr>
52 * </table>
53 */
54 public class CorePanelButtonBar extends UIXPanel
55 implements ClientBehaviorHolder
56 {
57 static public final String HALIGN_RIGHT = "right";
58 static public final String HALIGN_START = "start";
59 static public final String HALIGN_LEFT = "left";
60 static public final String HALIGN_END = "end";
61 static public final String HALIGN_CENTER = "center";
62 static public final FacesBean.Type TYPE = new FacesBean.Type(
63 UIXPanel.TYPE);
64 static public final PropertyKey INLINE_STYLE_KEY =
65 TYPE.registerKey("inlineStyle", String.class);
66 static public final PropertyKey STYLE_CLASS_KEY =
67 TYPE.registerKey("styleClass", String.class);
68 static public final PropertyKey SHORT_DESC_KEY =
69 TYPE.registerKey("shortDesc", String.class);
70 static public final PropertyKey PARTIAL_TRIGGERS_KEY =
71 TYPE.registerKey("partialTriggers", String[].class, null, 0, PropertyKey.Mutable.RARELY);
72 static public final PropertyKey ONCLICK_KEY =
73 TYPE.registerKey("onclick", String.class);
74 static public final PropertyKey ONDBLCLICK_KEY =
75 TYPE.registerKey("ondblclick", String.class);
76 static public final PropertyKey ONMOUSEDOWN_KEY =
77 TYPE.registerKey("onmousedown", String.class);
78 static public final PropertyKey ONMOUSEUP_KEY =
79 TYPE.registerKey("onmouseup", String.class);
80 static public final PropertyKey ONMOUSEOVER_KEY =
81 TYPE.registerKey("onmouseover", String.class);
82 static public final PropertyKey ONMOUSEMOVE_KEY =
83 TYPE.registerKey("onmousemove", String.class);
84 static public final PropertyKey ONMOUSEOUT_KEY =
85 TYPE.registerKey("onmouseout", String.class);
86 static public final PropertyKey ONKEYPRESS_KEY =
87 TYPE.registerKey("onkeypress", String.class);
88 static public final PropertyKey ONKEYDOWN_KEY =
89 TYPE.registerKey("onkeydown", String.class);
90 static public final PropertyKey ONKEYUP_KEY =
91 TYPE.registerKey("onkeyup", String.class);
92 static public final PropertyKey HALIGN_KEY =
93 TYPE.registerKey("halign", String.class);
94
95 static public final String COMPONENT_FAMILY =
96 "org.apache.myfaces.trinidad.Panel";
97 static public final String COMPONENT_TYPE =
98 "org.apache.myfaces.trinidad.CorePanelButtonBar";
99 // Supported client events for client behaviors:
100 private final static Collection<String> _EVENT_NAMES = Collections.unmodifiableCollection(
101 Arrays.asList(
102 "click", "dblclick", "mousedown", "mouseup", "mouseover", "mousemove",
103 "mouseout", "keypress", "keydown", "keyup"
104 ));
105
106 /**
107 * Construct an instance of the CorePanelButtonBar.
108 */
109 public CorePanelButtonBar()
110 {
111 super("org.apache.myfaces.trinidad.ButtonBar");
112 }
113
114 /**
115 * Gets the CSS styles to use for this component.
116 *
117 * @return the new inlineStyle value
118 */
119 final public String getInlineStyle()
120 {
121 return ComponentUtils.resolveString(getProperty(INLINE_STYLE_KEY));
122 }
123
124 /**
125 * Sets the CSS styles to use for this component.
126 *
127 * @param inlineStyle the new inlineStyle value
128 */
129 final public void setInlineStyle(String inlineStyle)
130 {
131 setProperty(INLINE_STYLE_KEY, (inlineStyle));
132 }
133
134 /**
135 * Gets a CSS style class to use for this component.
136 *
137 * @return the new styleClass value
138 */
139 final public String getStyleClass()
140 {
141 return ComponentUtils.resolveString(getProperty(STYLE_CLASS_KEY));
142 }
143
144 /**
145 * Sets a CSS style class to use for this component.
146 *
147 * @param styleClass the new styleClass value
148 */
149 final public void setStyleClass(String styleClass)
150 {
151 setProperty(STYLE_CLASS_KEY, (styleClass));
152 }
153
154 /**
155 * Gets The short description of the component. This text is commonly used by user agents to display tooltip help text.
156 *
157 * @return the new shortDesc value
158 */
159 final public String getShortDesc()
160 {
161 return ComponentUtils.resolveString(getProperty(SHORT_DESC_KEY));
162 }
163
164 /**
165 * Sets The short description of the component. This text is commonly used by user agents to display tooltip help text.
166 *
167 * @param shortDesc the new shortDesc value
168 */
169 final public void setShortDesc(String shortDesc)
170 {
171 setProperty(SHORT_DESC_KEY, (shortDesc));
172 }
173
174 /**
175 * Gets the IDs of the components that should trigger a partial update.
176 * <p>
177 * This component will listen on the trigger components. If one of the
178 * trigger components receives an event that will cause it to update
179 * in some way, this component will request to be updated too.</p>
180 * <p>
181 * Separate multiple triggers with a space. e.g., partialTriggers="cmp1 cmp2"
182 * </p>
183 * <p>
184 * Identifiers must account for NamingContainers. You can use a single colon to start the search from the root,
185 * or use multiple colons to move up through the NamingContainer. For example,
186 * "::" will pop out of this component's naming container (it pops out of itself if it is a naming container),
187 * ":::" will pop out of two naming containers, etc. The search for
188 * the partialTrigger begins from there. e.g., partialTriggers=":::commandButton1" the search begins for the
189 * component with id = commandButton1 after popping out of two naming containers relative to this component.
190 * To go into naming containers, you separate the naming containers with ':', e.g.,partialTriggers= "nc1:nc2:nc3:componentId".</p>
191 *
192 * @return the new partialTriggers value
193 */
194 final public String[] getPartialTriggers()
195 {
196 return (String[])getProperty(PARTIAL_TRIGGERS_KEY);
197 }
198
199 /**
200 * Sets the IDs of the components that should trigger a partial update.
201 * <p>
202 * This component will listen on the trigger components. If one of the
203 * trigger components receives an event that will cause it to update
204 * in some way, this component will request to be updated too.</p>
205 * <p>
206 * Separate multiple triggers with a space. e.g., partialTriggers="cmp1 cmp2"
207 * </p>
208 * <p>
209 * Identifiers must account for NamingContainers. You can use a single colon to start the search from the root,
210 * or use multiple colons to move up through the NamingContainer. For example,
211 * "::" will pop out of this component's naming container (it pops out of itself if it is a naming container),
212 * ":::" will pop out of two naming containers, etc. The search for
213 * the partialTrigger begins from there. e.g., partialTriggers=":::commandButton1" the search begins for the
214 * component with id = commandButton1 after popping out of two naming containers relative to this component.
215 * To go into naming containers, you separate the naming containers with ':', e.g.,partialTriggers= "nc1:nc2:nc3:componentId".</p>
216 *
217 * @param partialTriggers the new partialTriggers value
218 */
219 final public void setPartialTriggers(String[] partialTriggers)
220 {
221 setProperty(PARTIAL_TRIGGERS_KEY, (partialTriggers));
222 }
223
224 /**
225 * Gets an onclick Javascript handler.
226 *
227 * @return the new onclick value
228 */
229 final public String getOnclick()
230 {
231 return ComponentUtils.resolveString(getProperty(ONCLICK_KEY));
232 }
233
234 /**
235 * Sets an onclick Javascript handler.
236 *
237 * @param onclick the new onclick value
238 */
239 final public void setOnclick(String onclick)
240 {
241 setProperty(ONCLICK_KEY, (onclick));
242 }
243
244 /**
245 * Gets an ondblclick Javascript handler.
246 *
247 * @return the new ondblclick value
248 */
249 final public String getOndblclick()
250 {
251 return ComponentUtils.resolveString(getProperty(ONDBLCLICK_KEY));
252 }
253
254 /**
255 * Sets an ondblclick Javascript handler.
256 *
257 * @param ondblclick the new ondblclick value
258 */
259 final public void setOndblclick(String ondblclick)
260 {
261 setProperty(ONDBLCLICK_KEY, (ondblclick));
262 }
263
264 /**
265 * Gets an onmousedown Javascript handler.
266 *
267 * @return the new onmousedown value
268 */
269 final public String getOnmousedown()
270 {
271 return ComponentUtils.resolveString(getProperty(ONMOUSEDOWN_KEY));
272 }
273
274 /**
275 * Sets an onmousedown Javascript handler.
276 *
277 * @param onmousedown the new onmousedown value
278 */
279 final public void setOnmousedown(String onmousedown)
280 {
281 setProperty(ONMOUSEDOWN_KEY, (onmousedown));
282 }
283
284 /**
285 * Gets an onmouseup Javascript handler.
286 *
287 * @return the new onmouseup value
288 */
289 final public String getOnmouseup()
290 {
291 return ComponentUtils.resolveString(getProperty(ONMOUSEUP_KEY));
292 }
293
294 /**
295 * Sets an onmouseup Javascript handler.
296 *
297 * @param onmouseup the new onmouseup value
298 */
299 final public void setOnmouseup(String onmouseup)
300 {
301 setProperty(ONMOUSEUP_KEY, (onmouseup));
302 }
303
304 /**
305 * Gets an onmouseover Javascript handler.
306 *
307 * @return the new onmouseover value
308 */
309 final public String getOnmouseover()
310 {
311 return ComponentUtils.resolveString(getProperty(ONMOUSEOVER_KEY));
312 }
313
314 /**
315 * Sets an onmouseover Javascript handler.
316 *
317 * @param onmouseover the new onmouseover value
318 */
319 final public void setOnmouseover(String onmouseover)
320 {
321 setProperty(ONMOUSEOVER_KEY, (onmouseover));
322 }
323
324 /**
325 * Gets an onmousemove Javascript handler.
326 *
327 * @return the new onmousemove value
328 */
329 final public String getOnmousemove()
330 {
331 return ComponentUtils.resolveString(getProperty(ONMOUSEMOVE_KEY));
332 }
333
334 /**
335 * Sets an onmousemove Javascript handler.
336 *
337 * @param onmousemove the new onmousemove value
338 */
339 final public void setOnmousemove(String onmousemove)
340 {
341 setProperty(ONMOUSEMOVE_KEY, (onmousemove));
342 }
343
344 /**
345 * Gets an onmouseout Javascript handler.
346 *
347 * @return the new onmouseout value
348 */
349 final public String getOnmouseout()
350 {
351 return ComponentUtils.resolveString(getProperty(ONMOUSEOUT_KEY));
352 }
353
354 /**
355 * Sets an onmouseout Javascript handler.
356 *
357 * @param onmouseout the new onmouseout value
358 */
359 final public void setOnmouseout(String onmouseout)
360 {
361 setProperty(ONMOUSEOUT_KEY, (onmouseout));
362 }
363
364 /**
365 * Gets an onkeypress Javascript handler.
366 *
367 * @return the new onkeypress value
368 */
369 final public String getOnkeypress()
370 {
371 return ComponentUtils.resolveString(getProperty(ONKEYPRESS_KEY));
372 }
373
374 /**
375 * Sets an onkeypress Javascript handler.
376 *
377 * @param onkeypress the new onkeypress value
378 */
379 final public void setOnkeypress(String onkeypress)
380 {
381 setProperty(ONKEYPRESS_KEY, (onkeypress));
382 }
383
384 /**
385 * Gets an onkeydown Javascript handler.
386 *
387 * @return the new onkeydown value
388 */
389 final public String getOnkeydown()
390 {
391 return ComponentUtils.resolveString(getProperty(ONKEYDOWN_KEY));
392 }
393
394 /**
395 * Sets an onkeydown Javascript handler.
396 *
397 * @param onkeydown the new onkeydown value
398 */
399 final public void setOnkeydown(String onkeydown)
400 {
401 setProperty(ONKEYDOWN_KEY, (onkeydown));
402 }
403
404 /**
405 * Gets an onkeyup Javascript handler.
406 *
407 * @return the new onkeyup value
408 */
409 final public String getOnkeyup()
410 {
411 return ComponentUtils.resolveString(getProperty(ONKEYUP_KEY));
412 }
413
414 /**
415 * Sets an onkeyup Javascript handler.
416 *
417 * @param onkeyup the new onkeyup value
418 */
419 final public void setOnkeyup(String onkeyup)
420 {
421 setProperty(ONKEYUP_KEY, (onkeyup));
422 }
423
424 /**
425 * Gets the horizontal alignment to one of start, end, left,
426 * right, or center.
427 *
428 * @return the new halign value
429 */
430 final public String getHalign()
431 {
432 return ComponentUtils.resolveString(getProperty(HALIGN_KEY));
433 }
434
435 /**
436 * Sets the horizontal alignment to one of start, end, left,
437 * right, or center.
438 *
439 * @param halign the new halign value
440 */
441 final public void setHalign(String halign)
442 {
443 setProperty(HALIGN_KEY, (halign));
444 }
445
446 @Override
447 public String getDefaultEventName()
448 {
449 return "click";
450 }
451
452 @Override
453 public Collection<String> getEventNames()
454 {
455 return _EVENT_NAMES;
456 }
457
458 @Override
459 public Map<String, List<ClientBehavior>> getClientBehaviors()
460 {
461 return super.getClientBehaviors();
462 }
463
464 @Override
465 public void addClientBehavior(
466 String eventName,
467 ClientBehavior behavior)
468 {
469 super.addClientBehavior(eventName, behavior);
470 }
471
472 @Override
473 public String getFamily()
474 {
475 return COMPONENT_FAMILY;
476 }
477
478 @Override
479 protected FacesBean.Type getBeanType()
480 {
481 return TYPE;
482 }
483
484 /**
485 * Construct an instance of the CorePanelButtonBar.
486 */
487 protected CorePanelButtonBar(
488 String rendererType
489 )
490 {
491 super(rendererType);
492 }
493
494 static
495 {
496 TYPE.lockAndRegister("org.apache.myfaces.trinidad.Panel","org.apache.myfaces.trinidad.ButtonBar");
497 }
498 }