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