View Javadoc

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.UIComponent;
30  import javax.faces.component.behavior.ClientBehavior;
31  import javax.faces.component.behavior.ClientBehaviorHolder;
32  import org.apache.myfaces.trinidad.bean.FacesBean;
33  import org.apache.myfaces.trinidad.bean.PropertyKey;
34  import org.apache.myfaces.trinidad.component.UIXPanel;
35  import org.apache.myfaces.trinidad.util.ComponentUtils;
36  
37  /**
38   *
39   * The panelHorizontalLayout control is a layout element that
40   * arranges its children horizontally. The vertical and horizontal alignment
41   * can be specified.
42   * Each pair of adjacent children will be separated
43   * by an optional separator child.
44   *
45   * <h4>Events:</h4>
46   * <table border="1" width="100%" cellpadding="3" summary="">
47   * <tr bgcolor="#CCCCFF" class="TableHeadingColor">
48   * <th align="left">Type</th>
49   * <th align="left">Phases</th>
50   * <th align="left">Description</th>
51   * </tr>
52   * <tr class="TableRowColor">
53   * <td valign="top"><code>org.apache.myfaces.trinidad.event.AttributeChangeEvent</code></td>
54   * <td valign="top" nowrap>Invoke<br>Application<br>Apply<br>Request<br>Values</td>
55   * <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>
56   * </tr>
57   * </table>
58   */
59  public class CorePanelHorizontalLayout extends UIXPanel
60                                         implements ClientBehaviorHolder
61  {
62    static public final String VALIGN_MIDDLE = "middle";
63    static public final String VALIGN_TOP = "top";
64    static public final String VALIGN_BASELINE = "baseline";
65    static public final String VALIGN_BOTTOM = "bottom";
66    static public final String HALIGN_RIGHT = "right";
67    static public final String HALIGN_START = "start";
68    static public final String HALIGN_LEFT = "left";
69    static public final String HALIGN_END = "end";
70    static public final String HALIGN_CENTER = "center";
71    static public final FacesBean.Type TYPE = new FacesBean.Type(
72      UIXPanel.TYPE);
73    static public final PropertyKey INLINE_STYLE_KEY =
74      TYPE.registerKey("inlineStyle", String.class);
75    static public final PropertyKey STYLE_CLASS_KEY =
76      TYPE.registerKey("styleClass", String.class);
77    static public final PropertyKey SHORT_DESC_KEY =
78      TYPE.registerKey("shortDesc", String.class);
79    static public final PropertyKey PARTIAL_TRIGGERS_KEY =
80      TYPE.registerKey("partialTriggers", String[].class, null, 0, PropertyKey.Mutable.RARELY);
81    static public final PropertyKey ONCLICK_KEY =
82      TYPE.registerKey("onclick", String.class);
83    static public final PropertyKey ONDBLCLICK_KEY =
84      TYPE.registerKey("ondblclick", String.class);
85    static public final PropertyKey ONMOUSEDOWN_KEY =
86      TYPE.registerKey("onmousedown", String.class);
87    static public final PropertyKey ONMOUSEUP_KEY =
88      TYPE.registerKey("onmouseup", String.class);
89    static public final PropertyKey ONMOUSEOVER_KEY =
90      TYPE.registerKey("onmouseover", String.class);
91    static public final PropertyKey ONMOUSEMOVE_KEY =
92      TYPE.registerKey("onmousemove", String.class);
93    static public final PropertyKey ONMOUSEOUT_KEY =
94      TYPE.registerKey("onmouseout", String.class);
95    static public final PropertyKey ONKEYPRESS_KEY =
96      TYPE.registerKey("onkeypress", String.class);
97    static public final PropertyKey ONKEYDOWN_KEY =
98      TYPE.registerKey("onkeydown", String.class);
99    static public final PropertyKey ONKEYUP_KEY =
100     TYPE.registerKey("onkeyup", String.class);
101   static public final PropertyKey VALIGN_KEY =
102     TYPE.registerKey("valign", String.class);
103   static public final PropertyKey HALIGN_KEY =
104     TYPE.registerKey("halign", String.class);
105   static public final String SEPARATOR_FACET = "separator";
106 
107   static public final String COMPONENT_FAMILY =
108     "org.apache.myfaces.trinidad.Panel";
109   static public final String COMPONENT_TYPE =
110     "org.apache.myfaces.trinidad.CorePanelHorizontalLayout";
111   // Supported client events for client behaviors:
112   private final static Collection<String> _EVENT_NAMES = Collections.unmodifiableCollection(
113     Arrays.asList(
114       "click", "dblclick", "mousedown", "mouseup", "mouseover", "mousemove",
115       "mouseout", "keypress", "keydown", "keyup"
116     ));
117 
118   /**
119    * Construct an instance of the CorePanelHorizontalLayout.
120    */
121   public CorePanelHorizontalLayout()
122   {
123     super("org.apache.myfaces.trinidad.HorizontalLayout");
124   }
125 
126   /**
127    * Content to be rendered once between each of the
128    *                 other children.
129    */
130   final public UIComponent getSeparator()
131   {
132     return getFacet(SEPARATOR_FACET);
133   }
134 
135   /**
136    * Content to be rendered once between each of the
137    *                 other children.
138    */
139   @SuppressWarnings("unchecked")
140   final public void setSeparator(UIComponent separatorFacet)
141   {
142     getFacets().put(SEPARATOR_FACET, separatorFacet);
143   }
144 
145   /**
146    * Gets the CSS styles to use for this component.
147    *
148    * @return  the new inlineStyle value
149    */
150   final public String getInlineStyle()
151   {
152     return ComponentUtils.resolveString(getProperty(INLINE_STYLE_KEY));
153   }
154 
155   /**
156    * Sets the CSS styles to use for this component.
157    * 
158    * @param inlineStyle  the new inlineStyle value
159    */
160   final public void setInlineStyle(String inlineStyle)
161   {
162     setProperty(INLINE_STYLE_KEY, (inlineStyle));
163   }
164 
165   /**
166    * Gets a CSS style class to use for this component.
167    *
168    * @return  the new styleClass value
169    */
170   final public String getStyleClass()
171   {
172     return ComponentUtils.resolveString(getProperty(STYLE_CLASS_KEY));
173   }
174 
175   /**
176    * Sets a CSS style class to use for this component.
177    * 
178    * @param styleClass  the new styleClass value
179    */
180   final public void setStyleClass(String styleClass)
181   {
182     setProperty(STYLE_CLASS_KEY, (styleClass));
183   }
184 
185   /**
186    * Gets The short description of the component. This text is commonly used by user agents to display tooltip help text.
187    *
188    * @return  the new shortDesc value
189    */
190   final public String getShortDesc()
191   {
192     return ComponentUtils.resolveString(getProperty(SHORT_DESC_KEY));
193   }
194 
195   /**
196    * Sets The short description of the component. This text is commonly used by user agents to display tooltip help text.
197    * 
198    * @param shortDesc  the new shortDesc value
199    */
200   final public void setShortDesc(String shortDesc)
201   {
202     setProperty(SHORT_DESC_KEY, (shortDesc));
203   }
204 
205   /**
206    * Gets the IDs of the components that should trigger a partial update.
207    *         <p>
208    *         This component will listen on the trigger components. If one of the
209    *         trigger components receives an event that will cause it to update
210    *         in some way, this component will request to be updated too.</p>
211    *         <p>
212    *         Separate multiple triggers with a space. e.g., partialTriggers="cmp1 cmp2"
213    *         </p>
214    *         <p>
215    *         Identifiers must account for NamingContainers.  You can use a single colon to start the search from the root,
216    *         or use multiple colons to move up through the NamingContainer. For example,
217    *         "::" will pop out of this component's naming container (it pops out of itself if it is a naming container), 
218    *         ":::" will pop out of two naming containers, etc. The search for
219    *         the partialTrigger begins from there. e.g., partialTriggers=":::commandButton1" the search begins for the 
220    *         component with id = commandButton1 after popping out of two naming containers relative to this component.
221    *         To go into naming containers, you separate the naming containers with ':', e.g.,partialTriggers= "nc1:nc2:nc3:componentId".</p>
222    *
223    * @return  the new partialTriggers value
224    */
225   final public String[] getPartialTriggers()
226   {
227     return (String[])getProperty(PARTIAL_TRIGGERS_KEY);
228   }
229 
230   /**
231    * Sets the IDs of the components that should trigger a partial update.
232    *         <p>
233    *         This component will listen on the trigger components. If one of the
234    *         trigger components receives an event that will cause it to update
235    *         in some way, this component will request to be updated too.</p>
236    *         <p>
237    *         Separate multiple triggers with a space. e.g., partialTriggers="cmp1 cmp2"
238    *         </p>
239    *         <p>
240    *         Identifiers must account for NamingContainers.  You can use a single colon to start the search from the root,
241    *         or use multiple colons to move up through the NamingContainer. For example,
242    *         "::" will pop out of this component's naming container (it pops out of itself if it is a naming container), 
243    *         ":::" will pop out of two naming containers, etc. The search for
244    *         the partialTrigger begins from there. e.g., partialTriggers=":::commandButton1" the search begins for the 
245    *         component with id = commandButton1 after popping out of two naming containers relative to this component.
246    *         To go into naming containers, you separate the naming containers with ':', e.g.,partialTriggers= "nc1:nc2:nc3:componentId".</p>
247    * 
248    * @param partialTriggers  the new partialTriggers value
249    */
250   final public void setPartialTriggers(String[] partialTriggers)
251   {
252     setProperty(PARTIAL_TRIGGERS_KEY, (partialTriggers));
253   }
254 
255   /**
256    * Gets an onclick Javascript handler.
257    *
258    * @return  the new onclick value
259    */
260   final public String getOnclick()
261   {
262     return ComponentUtils.resolveString(getProperty(ONCLICK_KEY));
263   }
264 
265   /**
266    * Sets an onclick Javascript handler.
267    * 
268    * @param onclick  the new onclick value
269    */
270   final public void setOnclick(String onclick)
271   {
272     setProperty(ONCLICK_KEY, (onclick));
273   }
274 
275   /**
276    * Gets an ondblclick Javascript handler.
277    *
278    * @return  the new ondblclick value
279    */
280   final public String getOndblclick()
281   {
282     return ComponentUtils.resolveString(getProperty(ONDBLCLICK_KEY));
283   }
284 
285   /**
286    * Sets an ondblclick Javascript handler.
287    * 
288    * @param ondblclick  the new ondblclick value
289    */
290   final public void setOndblclick(String ondblclick)
291   {
292     setProperty(ONDBLCLICK_KEY, (ondblclick));
293   }
294 
295   /**
296    * Gets an onmousedown Javascript handler.
297    *
298    * @return  the new onmousedown value
299    */
300   final public String getOnmousedown()
301   {
302     return ComponentUtils.resolveString(getProperty(ONMOUSEDOWN_KEY));
303   }
304 
305   /**
306    * Sets an onmousedown Javascript handler.
307    * 
308    * @param onmousedown  the new onmousedown value
309    */
310   final public void setOnmousedown(String onmousedown)
311   {
312     setProperty(ONMOUSEDOWN_KEY, (onmousedown));
313   }
314 
315   /**
316    * Gets an onmouseup Javascript handler.
317    *
318    * @return  the new onmouseup value
319    */
320   final public String getOnmouseup()
321   {
322     return ComponentUtils.resolveString(getProperty(ONMOUSEUP_KEY));
323   }
324 
325   /**
326    * Sets an onmouseup Javascript handler.
327    * 
328    * @param onmouseup  the new onmouseup value
329    */
330   final public void setOnmouseup(String onmouseup)
331   {
332     setProperty(ONMOUSEUP_KEY, (onmouseup));
333   }
334 
335   /**
336    * Gets an onmouseover Javascript handler.
337    *
338    * @return  the new onmouseover value
339    */
340   final public String getOnmouseover()
341   {
342     return ComponentUtils.resolveString(getProperty(ONMOUSEOVER_KEY));
343   }
344 
345   /**
346    * Sets an onmouseover Javascript handler.
347    * 
348    * @param onmouseover  the new onmouseover value
349    */
350   final public void setOnmouseover(String onmouseover)
351   {
352     setProperty(ONMOUSEOVER_KEY, (onmouseover));
353   }
354 
355   /**
356    * Gets an onmousemove Javascript handler.
357    *
358    * @return  the new onmousemove value
359    */
360   final public String getOnmousemove()
361   {
362     return ComponentUtils.resolveString(getProperty(ONMOUSEMOVE_KEY));
363   }
364 
365   /**
366    * Sets an onmousemove Javascript handler.
367    * 
368    * @param onmousemove  the new onmousemove value
369    */
370   final public void setOnmousemove(String onmousemove)
371   {
372     setProperty(ONMOUSEMOVE_KEY, (onmousemove));
373   }
374 
375   /**
376    * Gets an onmouseout Javascript handler.
377    *
378    * @return  the new onmouseout value
379    */
380   final public String getOnmouseout()
381   {
382     return ComponentUtils.resolveString(getProperty(ONMOUSEOUT_KEY));
383   }
384 
385   /**
386    * Sets an onmouseout Javascript handler.
387    * 
388    * @param onmouseout  the new onmouseout value
389    */
390   final public void setOnmouseout(String onmouseout)
391   {
392     setProperty(ONMOUSEOUT_KEY, (onmouseout));
393   }
394 
395   /**
396    * Gets an onkeypress Javascript handler.
397    *
398    * @return  the new onkeypress value
399    */
400   final public String getOnkeypress()
401   {
402     return ComponentUtils.resolveString(getProperty(ONKEYPRESS_KEY));
403   }
404 
405   /**
406    * Sets an onkeypress Javascript handler.
407    * 
408    * @param onkeypress  the new onkeypress value
409    */
410   final public void setOnkeypress(String onkeypress)
411   {
412     setProperty(ONKEYPRESS_KEY, (onkeypress));
413   }
414 
415   /**
416    * Gets an onkeydown Javascript handler.
417    *
418    * @return  the new onkeydown value
419    */
420   final public String getOnkeydown()
421   {
422     return ComponentUtils.resolveString(getProperty(ONKEYDOWN_KEY));
423   }
424 
425   /**
426    * Sets an onkeydown Javascript handler.
427    * 
428    * @param onkeydown  the new onkeydown value
429    */
430   final public void setOnkeydown(String onkeydown)
431   {
432     setProperty(ONKEYDOWN_KEY, (onkeydown));
433   }
434 
435   /**
436    * Gets an onkeyup Javascript handler.
437    *
438    * @return  the new onkeyup value
439    */
440   final public String getOnkeyup()
441   {
442     return ComponentUtils.resolveString(getProperty(ONKEYUP_KEY));
443   }
444 
445   /**
446    * Sets an onkeyup Javascript handler.
447    * 
448    * @param onkeyup  the new onkeyup value
449    */
450   final public void setOnkeyup(String onkeyup)
451   {
452     setProperty(ONKEYUP_KEY, (onkeyup));
453   }
454 
455   /**
456    * Gets the vertical alignment to one of top, bottom, middle, or baseline.
457    *
458    * @return  the new valign value
459    */
460   final public String getValign()
461   {
462     return ComponentUtils.resolveString(getProperty(VALIGN_KEY));
463   }
464 
465   /**
466    * Sets the vertical alignment to one of top, bottom, middle, or baseline.
467    * 
468    * @param valign  the new valign value
469    */
470   final public void setValign(String valign)
471   {
472     setProperty(VALIGN_KEY, (valign));
473   }
474 
475   /**
476    * Gets the horizontal alignment to one of start, end, left,
477    * right, or center.
478    *
479    * @return  the new halign value
480    */
481   final public String getHalign()
482   {
483     return ComponentUtils.resolveString(getProperty(HALIGN_KEY));
484   }
485 
486   /**
487    * Sets the horizontal alignment to one of start, end, left,
488    * right, or center.
489    * 
490    * @param halign  the new halign value
491    */
492   final public void setHalign(String halign)
493   {
494     setProperty(HALIGN_KEY, (halign));
495   }
496 
497   @Override
498   public String getDefaultEventName()
499   {
500     return "click";
501   }
502 
503   @Override
504   public Collection<String> getEventNames()
505   {
506     return _EVENT_NAMES;
507   }
508 
509   @Override
510   public Map<String, List<ClientBehavior>> getClientBehaviors()
511   {
512     return super.getClientBehaviors();
513   }
514 
515   @Override
516   public void addClientBehavior(
517     String         eventName,
518     ClientBehavior behavior)
519   {
520     super.addClientBehavior(eventName, behavior);
521   }
522 
523   @Override
524   public String getFamily()
525   {
526     return COMPONENT_FAMILY;
527   }
528 
529   @Override
530   protected FacesBean.Type getBeanType()
531   {
532     return TYPE;
533   }
534 
535   /**
536    * Construct an instance of the CorePanelHorizontalLayout.
537    */
538   protected CorePanelHorizontalLayout(
539     String rendererType
540     )
541   {
542     super(rendererType);
543   }
544 
545   static
546   {
547     TYPE.lockAndRegister("org.apache.myfaces.trinidad.Panel","org.apache.myfaces.trinidad.HorizontalLayout");
548   }
549 }