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.input;
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.UIXInput;
35  import org.apache.myfaces.trinidad.util.ComponentUtils;
36  
37  /**
38   *
39   * <html><p>
40   *             The inputNumberSpinbox component creates a browser input widget and up/down arrows.
41   *             It is used to enter numbers and quickly step through the numbers using the up/down arrows.
42   *             The number needs to be within the minimum and maximum.
43   *             It also supports displaying a label, text, and messages.
44   *           </p></html>
45   *
46   * <h4>Events:</h4>
47   * <table border="1" width="100%" cellpadding="3" summary="">
48   * <tr bgcolor="#CCCCFF" class="TableHeadingColor">
49   * <th align="left">Type</th>
50   * <th align="left">Phases</th>
51   * <th align="left">Description</th>
52   * </tr>
53   * <tr class="TableRowColor">
54   * <td valign="top"><code>javax.faces.event.ValueChangeEvent</code></td>
55   * <td valign="top" nowrap>Process<br>Validations<br>Apply<br>Request<br>Values</td>
56   * <td valign="top">The valueChange event is delivered when the value
57                         attribute is changed.</td>
58   * </tr>
59   * <tr class="TableRowColor">
60   * <td valign="top"><code>org.apache.myfaces.trinidad.event.AttributeChangeEvent</code></td>
61   * <td valign="top" nowrap>Invoke<br>Application<br>Apply<br>Request<br>Values</td>
62   * <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>
63   * </tr>
64   * </table>
65   */
66  public class CoreInputNumberSpinbox extends UIXInput
67                                      implements ClientBehaviorHolder
68  {
69    static public final String AUTO_COMPLETE_ON = "on";
70    static public final String AUTO_COMPLETE_OFF = "off";
71    static public final String STYLE_CLASS_AFFIELD_TEXT_MARKER = "AFFieldTextMarker";
72    static public final String STYLE_CLASS_AFFIELD_TEXT_LTRMARKER = "AFFieldTextLTRMarker";
73    static public final String STYLE_CLASS_AFFIELD_NUMBER_MARKER = "AFFieldNumberMarker";
74    static public final FacesBean.Type TYPE = new FacesBean.Type(
75      UIXInput.TYPE);
76    static public final PropertyKey CONTENT_STYLE_KEY =
77      TYPE.registerKey("contentStyle", String.class);
78    static public final PropertyKey READ_ONLY_KEY =
79      TYPE.registerKey("readOnly", Boolean.class, Boolean.FALSE);
80    static public final PropertyKey DISABLED_KEY =
81      TYPE.registerKey("disabled", Boolean.class, Boolean.FALSE);
82    static public final PropertyKey AUTO_COMPLETE_KEY =
83      TYPE.registerKey("autoComplete", String.class, "on");
84    static public final PropertyKey SHORT_DESC_KEY =
85      TYPE.registerKey("shortDesc", String.class);
86    static public final PropertyKey PARTIAL_TRIGGERS_KEY =
87      TYPE.registerKey("partialTriggers", String[].class);
88    static public final PropertyKey LABEL_KEY =
89      TYPE.registerKey("label", String.class);
90    static public final PropertyKey SIMPLE_KEY =
91      TYPE.registerKey("simple", Boolean.class, Boolean.FALSE);
92    static public final PropertyKey ONCHANGE_KEY =
93      TYPE.registerKey("onchange", String.class);
94    static public final PropertyKey ONCLICK_KEY =
95      TYPE.registerKey("onclick", String.class);
96    static public final PropertyKey ONDBLCLICK_KEY =
97      TYPE.registerKey("ondblclick", String.class);
98    static public final PropertyKey ONMOUSEDOWN_KEY =
99      TYPE.registerKey("onmousedown", String.class);
100   static public final PropertyKey ONMOUSEUP_KEY =
101     TYPE.registerKey("onmouseup", String.class);
102   static public final PropertyKey ONMOUSEOVER_KEY =
103     TYPE.registerKey("onmouseover", String.class);
104   static public final PropertyKey ONMOUSEMOVE_KEY =
105     TYPE.registerKey("onmousemove", String.class);
106   static public final PropertyKey ONMOUSEOUT_KEY =
107     TYPE.registerKey("onmouseout", String.class);
108   static public final PropertyKey ONKEYPRESS_KEY =
109     TYPE.registerKey("onkeypress", String.class);
110   static public final PropertyKey ONKEYDOWN_KEY =
111     TYPE.registerKey("onkeydown", String.class);
112   static public final PropertyKey ONKEYUP_KEY =
113     TYPE.registerKey("onkeyup", String.class);
114   static public final PropertyKey ONBLUR_KEY =
115     TYPE.registerKey("onblur", String.class);
116   static public final PropertyKey ONFOCUS_KEY =
117     TYPE.registerKey("onfocus", String.class);
118   static public final PropertyKey STYLE_CLASS_KEY =
119     TYPE.registerKey("styleClass", String.class);
120   static public final PropertyKey INLINE_STYLE_KEY =
121     TYPE.registerKey("inlineStyle", String.class);
122   static public final PropertyKey SHOW_REQUIRED_KEY =
123     TYPE.registerKey("showRequired", Boolean.class, Boolean.FALSE);
124   static public final PropertyKey COLUMNS_KEY =
125     TYPE.registerKey("columns", Integer.class, Integer.valueOf(1));
126   static public final PropertyKey MAXIMUM_KEY =
127     TYPE.registerKey("maximum", Integer.class, Integer.valueOf(2147483647));
128   static public final PropertyKey MINIMUM_KEY =
129     TYPE.registerKey("minimum", Integer.class, Integer.valueOf(1));
130   static public final PropertyKey STEP_SIZE_KEY =
131     TYPE.registerKey("stepSize", Integer.class, Integer.valueOf(1));
132   static public final PropertyKey ONSELECT_KEY =
133     TYPE.registerKey("onselect", String.class);
134   static public final PropertyKey ACCESS_KEY_KEY =
135     TYPE.registerKey("accessKey", Character.class);
136   static public final PropertyKey AUTO_SUBMIT_KEY =
137     TYPE.registerKey("autoSubmit", Boolean.class, Boolean.FALSE);
138   static public final String HELP_FACET = "help";
139 
140   static public final String COMPONENT_FAMILY =
141     "org.apache.myfaces.trinidad.Input";
142   static public final String COMPONENT_TYPE =
143     "org.apache.myfaces.trinidad.CoreInputNumberSpinbox";
144   // Supported client events for client behaviors:
145   private final static Collection<String> _EVENT_NAMES = Collections.unmodifiableCollection(
146     Arrays.asList(
147       "change", "click", "dblclick", "mousedown", "mouseup", "mouseover",
148       "mousemove", "mouseout", "keypress", "keydown", "keyup", "focus",
149       "blur", "select", "valueChange"
150     ));
151 
152   /**
153    * Construct an instance of the CoreInputNumberSpinbox.
154    */
155   public CoreInputNumberSpinbox()
156   {
157     super("org.apache.myfaces.trinidad.NumberSpinbox");
158   }
159 
160   /**
161    * This facet should contain field level help.
162    */
163   final public UIComponent getHelp()
164   {
165     return getFacet(HELP_FACET);
166   }
167 
168   /**
169    * This facet should contain field level help.
170    */
171   @SuppressWarnings("unchecked")
172   final public void setHelp(UIComponent helpFacet)
173   {
174     getFacets().put(HELP_FACET, helpFacet);
175   }
176 
177   /**
178    * Gets the CSS styles to attach to the content of the component.  For example, you can set the width of that portion to 100 pixels by setting this attribute to "width: 100px".
179    *
180    * @return  the new contentStyle value
181    */
182   final public String getContentStyle()
183   {
184     return ComponentUtils.resolveString(getProperty(CONTENT_STYLE_KEY));
185   }
186 
187   /**
188    * Sets the CSS styles to attach to the content of the component.  For example, you can set the width of that portion to 100 pixels by setting this attribute to "width: 100px".
189    * 
190    * @param contentStyle  the new contentStyle value
191    */
192   final public void setContentStyle(String contentStyle)
193   {
194     setProperty(CONTENT_STYLE_KEY, (contentStyle));
195   }
196 
197   /**
198    * Gets whether the element is read-only.
199    *
200    * @return  the new readOnly value
201    */
202   final public boolean isReadOnly()
203   {
204     return ComponentUtils.resolveBoolean(getProperty(READ_ONLY_KEY), false);
205   }
206 
207   /**
208    * Sets whether the element is read-only.
209    * 
210    * @param readOnly  the new readOnly value
211    */
212   final public void setReadOnly(boolean readOnly)
213   {
214     setProperty(READ_ONLY_KEY, readOnly ? Boolean.TRUE : Boolean.FALSE);
215   }
216 
217   /**
218    * Gets whether the element is disabled.
219    *
220    * @return  the new disabled value
221    */
222   final public boolean isDisabled()
223   {
224     return ComponentUtils.resolveBoolean(getProperty(DISABLED_KEY), false);
225   }
226 
227   /**
228    * Sets whether the element is disabled.
229    * 
230    * @param disabled  the new disabled value
231    */
232   final public void setDisabled(boolean disabled)
233   {
234     setProperty(DISABLED_KEY, disabled ? Boolean.TRUE : Boolean.FALSE);
235   }
236 
237   /**
238    * Gets whether previous values of text fields in the form
239    *           should be remembered and offered for auto completion.
240    *
241    * @return  the new autoComplete value
242    */
243   final public String getAutoComplete()
244   {
245     return ComponentUtils.resolveString(getProperty(AUTO_COMPLETE_KEY), "on");
246   }
247 
248   /**
249    * Sets whether previous values of text fields in the form
250    *           should be remembered and offered for auto completion.
251    * 
252    * @param autoComplete  the new autoComplete value
253    */
254   final public void setAutoComplete(String autoComplete)
255   {
256     setProperty(AUTO_COMPLETE_KEY, (autoComplete));
257   }
258 
259   /**
260    * Gets the short description of the bean.  This text
261    *          is commonly used by user agents to display tooltip help text.
262    *
263    * @return  the new shortDesc value
264    */
265   final public String getShortDesc()
266   {
267     return ComponentUtils.resolveString(getProperty(SHORT_DESC_KEY));
268   }
269 
270   /**
271    * Sets the short description of the bean.  This text
272    *          is commonly used by user agents to display tooltip help text.
273    * 
274    * @param shortDesc  the new shortDesc value
275    */
276   final public void setShortDesc(String shortDesc)
277   {
278     setProperty(SHORT_DESC_KEY, (shortDesc));
279   }
280 
281   /**
282    * Gets the IDs of the components that should trigger a partial update.
283    *          This component will listen on the trigger components. If one of the
284    *          trigger components receives an event that will cause it to update
285    *          in some way, this component will request to be updated too.
286    *
287    * @return  the new partialTriggers value
288    */
289   final public String[] getPartialTriggers()
290   {
291     return (String[])getProperty(PARTIAL_TRIGGERS_KEY);
292   }
293 
294   /**
295    * Sets the IDs of the components that should trigger a partial update.
296    *          This component will listen on the trigger components. If one of the
297    *          trigger components receives an event that will cause it to update
298    *          in some way, this component will request to be updated too.
299    * 
300    * @param partialTriggers  the new partialTriggers value
301    */
302   final public void setPartialTriggers(String[] partialTriggers)
303   {
304     setProperty(PARTIAL_TRIGGERS_KEY, (partialTriggers));
305   }
306 
307   /**
308    * Gets the label of the bean.
309    *
310    * @return  the new label value
311    */
312   final public String getLabel()
313   {
314     return ComponentUtils.resolveString(getProperty(LABEL_KEY));
315   }
316 
317   /**
318    * Sets the label of the bean.
319    * 
320    * @param label  the new label value
321    */
322   final public void setLabel(String label)
323   {
324     setProperty(LABEL_KEY, (label));
325   }
326 
327   /**
328    * Gets a boolean value that controls whether the component
329    * provides label and message support;  when set to "true", the component will
330    * not display messaging support or the label (these attributes may be ignored: label,
331    * labelAndAccessKey, accessKey, showRequired,
332    * tip), and may use simpler layout primitives
333    *
334    * @return  the new simple value
335    */
336   final public boolean isSimple()
337   {
338     return ComponentUtils.resolveBoolean(getProperty(SIMPLE_KEY), false);
339   }
340 
341   /**
342    * Sets a boolean value that controls whether the component
343    * provides label and message support;  when set to "true", the component will
344    * not display messaging support or the label (these attributes may be ignored: label,
345    * labelAndAccessKey, accessKey, showRequired,
346    * tip), and may use simpler layout primitives
347    * 
348    * @param simple  the new simple value
349    */
350   final public void setSimple(boolean simple)
351   {
352     setProperty(SIMPLE_KEY, simple ? Boolean.TRUE : Boolean.FALSE);
353   }
354 
355   /**
356    * Gets event handler for when the value is changed.
357    *
358    * @return  the new onchange value
359    */
360   final public String getOnchange()
361   {
362     return ComponentUtils.resolveString(getProperty(ONCHANGE_KEY));
363   }
364 
365   /**
366    * Sets event handler for when the value is changed.
367    * 
368    * @param onchange  the new onchange value
369    */
370   final public void setOnchange(String onchange)
371   {
372     setProperty(ONCHANGE_KEY, (onchange));
373   }
374 
375   /**
376    * Gets an onclick Javascript handler.
377    *
378    * @return  the new onclick value
379    */
380   final public String getOnclick()
381   {
382     return ComponentUtils.resolveString(getProperty(ONCLICK_KEY));
383   }
384 
385   /**
386    * Sets an onclick Javascript handler.
387    * 
388    * @param onclick  the new onclick value
389    */
390   final public void setOnclick(String onclick)
391   {
392     setProperty(ONCLICK_KEY, (onclick));
393   }
394 
395   /**
396    * Gets an ondblclick Javascript handler.
397    *
398    * @return  the new ondblclick value
399    */
400   final public String getOndblclick()
401   {
402     return ComponentUtils.resolveString(getProperty(ONDBLCLICK_KEY));
403   }
404 
405   /**
406    * Sets an ondblclick Javascript handler.
407    * 
408    * @param ondblclick  the new ondblclick value
409    */
410   final public void setOndblclick(String ondblclick)
411   {
412     setProperty(ONDBLCLICK_KEY, (ondblclick));
413   }
414 
415   /**
416    * Gets an onmousedown Javascript handler.
417    *
418    * @return  the new onmousedown value
419    */
420   final public String getOnmousedown()
421   {
422     return ComponentUtils.resolveString(getProperty(ONMOUSEDOWN_KEY));
423   }
424 
425   /**
426    * Sets an onmousedown Javascript handler.
427    * 
428    * @param onmousedown  the new onmousedown value
429    */
430   final public void setOnmousedown(String onmousedown)
431   {
432     setProperty(ONMOUSEDOWN_KEY, (onmousedown));
433   }
434 
435   /**
436    * Gets an onmouseup Javascript handler.
437    *
438    * @return  the new onmouseup value
439    */
440   final public String getOnmouseup()
441   {
442     return ComponentUtils.resolveString(getProperty(ONMOUSEUP_KEY));
443   }
444 
445   /**
446    * Sets an onmouseup Javascript handler.
447    * 
448    * @param onmouseup  the new onmouseup value
449    */
450   final public void setOnmouseup(String onmouseup)
451   {
452     setProperty(ONMOUSEUP_KEY, (onmouseup));
453   }
454 
455   /**
456    * Gets an onmouseover Javascript handler.
457    *
458    * @return  the new onmouseover value
459    */
460   final public String getOnmouseover()
461   {
462     return ComponentUtils.resolveString(getProperty(ONMOUSEOVER_KEY));
463   }
464 
465   /**
466    * Sets an onmouseover Javascript handler.
467    * 
468    * @param onmouseover  the new onmouseover value
469    */
470   final public void setOnmouseover(String onmouseover)
471   {
472     setProperty(ONMOUSEOVER_KEY, (onmouseover));
473   }
474 
475   /**
476    * Gets an onmousemove Javascript handler.
477    *
478    * @return  the new onmousemove value
479    */
480   final public String getOnmousemove()
481   {
482     return ComponentUtils.resolveString(getProperty(ONMOUSEMOVE_KEY));
483   }
484 
485   /**
486    * Sets an onmousemove Javascript handler.
487    * 
488    * @param onmousemove  the new onmousemove value
489    */
490   final public void setOnmousemove(String onmousemove)
491   {
492     setProperty(ONMOUSEMOVE_KEY, (onmousemove));
493   }
494 
495   /**
496    * Gets an onmouseout Javascript handler.
497    *
498    * @return  the new onmouseout value
499    */
500   final public String getOnmouseout()
501   {
502     return ComponentUtils.resolveString(getProperty(ONMOUSEOUT_KEY));
503   }
504 
505   /**
506    * Sets an onmouseout Javascript handler.
507    * 
508    * @param onmouseout  the new onmouseout value
509    */
510   final public void setOnmouseout(String onmouseout)
511   {
512     setProperty(ONMOUSEOUT_KEY, (onmouseout));
513   }
514 
515   /**
516    * Gets an onkeypress Javascript handler.
517    *
518    * @return  the new onkeypress value
519    */
520   final public String getOnkeypress()
521   {
522     return ComponentUtils.resolveString(getProperty(ONKEYPRESS_KEY));
523   }
524 
525   /**
526    * Sets an onkeypress Javascript handler.
527    * 
528    * @param onkeypress  the new onkeypress value
529    */
530   final public void setOnkeypress(String onkeypress)
531   {
532     setProperty(ONKEYPRESS_KEY, (onkeypress));
533   }
534 
535   /**
536    * Gets an onkeydown Javascript handler.
537    *
538    * @return  the new onkeydown value
539    */
540   final public String getOnkeydown()
541   {
542     return ComponentUtils.resolveString(getProperty(ONKEYDOWN_KEY));
543   }
544 
545   /**
546    * Sets an onkeydown Javascript handler.
547    * 
548    * @param onkeydown  the new onkeydown value
549    */
550   final public void setOnkeydown(String onkeydown)
551   {
552     setProperty(ONKEYDOWN_KEY, (onkeydown));
553   }
554 
555   /**
556    * Gets an onkeyup Javascript handler.
557    *
558    * @return  the new onkeyup value
559    */
560   final public String getOnkeyup()
561   {
562     return ComponentUtils.resolveString(getProperty(ONKEYUP_KEY));
563   }
564 
565   /**
566    * Sets an onkeyup Javascript handler.
567    * 
568    * @param onkeyup  the new onkeyup value
569    */
570   final public void setOnkeyup(String onkeyup)
571   {
572     setProperty(ONKEYUP_KEY, (onkeyup));
573   }
574 
575   /**
576    * Gets the event handler for the component losing the focus.
577    *
578    * @return  the new onblur value
579    */
580   final public String getOnblur()
581   {
582     return ComponentUtils.resolveString(getProperty(ONBLUR_KEY));
583   }
584 
585   /**
586    * Sets the event handler for the component losing the focus.
587    * 
588    * @param onblur  the new onblur value
589    */
590   final public void setOnblur(String onblur)
591   {
592     setProperty(ONBLUR_KEY, (onblur));
593   }
594 
595   /**
596    * Gets the event handler for the component gaining the focus.
597    *
598    * @return  the new onfocus value
599    */
600   final public String getOnfocus()
601   {
602     return ComponentUtils.resolveString(getProperty(ONFOCUS_KEY));
603   }
604 
605   /**
606    * Sets the event handler for the component gaining the focus.
607    * 
608    * @param onfocus  the new onfocus value
609    */
610   final public void setOnfocus(String onfocus)
611   {
612     setProperty(ONFOCUS_KEY, (onfocus));
613   }
614 
615   /**
616    * Gets <html>a CSS style class to use for this component.
617    *       The styleClass attribute value is rendered on the root dom element.
618    *       We provide some public style classes you can use that will affect only the 'content' piece of the component:
619    *       AFFieldTextMarker, AFFieldTextLTRMarker, AFFieldNumberMarker.
620    *       </html>
621    *
622    * @return  the new styleClass value
623    */
624   final public String getStyleClass()
625   {
626     return ComponentUtils.resolveString(getProperty(STYLE_CLASS_KEY));
627   }
628 
629   /**
630    * Sets <html>a CSS style class to use for this component.
631    *       The styleClass attribute value is rendered on the root dom element.
632    *       We provide some public style classes you can use that will affect only the 'content' piece of the component:
633    *       AFFieldTextMarker, AFFieldTextLTRMarker, AFFieldNumberMarker.
634    *       </html>
635    * 
636    * @param styleClass  the new styleClass value
637    */
638   final public void setStyleClass(String styleClass)
639   {
640     setProperty(STYLE_CLASS_KEY, (styleClass));
641   }
642 
643   /**
644    * Gets the inline CSS style for this element
645    *
646    * @return  the new inlineStyle value
647    */
648   final public String getInlineStyle()
649   {
650     return ComponentUtils.resolveString(getProperty(INLINE_STYLE_KEY));
651   }
652 
653   /**
654    * Sets the inline CSS style for this element
655    * 
656    * @param inlineStyle  the new inlineStyle value
657    */
658   final public void setInlineStyle(String inlineStyle)
659   {
660     setProperty(INLINE_STYLE_KEY, (inlineStyle));
661   }
662 
663   /**
664    * Gets whether the associated control displays a visual indication of required user input. If a "required" attribute is also present, both the "required" attribute and the
665    *           "showRequired" attribute must be false for the visual indication not to be displayed.
666    *
667    * @return  the new showRequired value
668    */
669   final public boolean isShowRequired()
670   {
671     return ComponentUtils.resolveBoolean(getProperty(SHOW_REQUIRED_KEY), false);
672   }
673 
674   /**
675    * Sets whether the associated control displays a visual indication of required user input. If a "required" attribute is also present, both the "required" attribute and the
676    *           "showRequired" attribute must be false for the visual indication not to be displayed.
677    * 
678    * @param showRequired  the new showRequired value
679    */
680   final public void setShowRequired(boolean showRequired)
681   {
682     setProperty(SHOW_REQUIRED_KEY, showRequired ? Boolean.TRUE : Boolean.FALSE);
683   }
684 
685   /**
686    * Gets the number of columns to display in the text
687    *           control. If no value is specified, a default
688    *           of 1 columns is used. One column is approximately one character
689    *           in the browser's current display font.
690    *
691    * @return  the new columns value
692    */
693   final public int getColumns()
694   {
695     return ComponentUtils.resolveInteger(getProperty(COLUMNS_KEY), 1);
696   }
697 
698   /**
699    * Sets the number of columns to display in the text
700    *           control. If no value is specified, a default
701    *           of 1 columns is used. One column is approximately one character
702    *           in the browser's current display font.
703    * 
704    * @param columns  the new columns value
705    */
706   final public void setColumns(int columns)
707   {
708     setProperty(COLUMNS_KEY, Integer.valueOf(columns));
709   }
710 
711   /**
712    * Gets The maximum number allowed in the input field.
713    *
714    * @return  the new maximum value
715    */
716   final public int getMaximum()
717   {
718     return ComponentUtils.resolveInteger(getProperty(MAXIMUM_KEY), 2147483647);
719   }
720 
721   /**
722    * Sets The maximum number allowed in the input field.
723    * 
724    * @param maximum  the new maximum value
725    */
726   final public void setMaximum(int maximum)
727   {
728     setProperty(MAXIMUM_KEY, Integer.valueOf(maximum));
729   }
730 
731   /**
732    * Gets The minimum number allowed in the input field.
733    *
734    * @return  the new minimum value
735    */
736   final public int getMinimum()
737   {
738     return ComponentUtils.resolveInteger(getProperty(MINIMUM_KEY), 1);
739   }
740 
741   /**
742    * Sets The minimum number allowed in the input field.
743    * 
744    * @param minimum  the new minimum value
745    */
746   final public void setMinimum(int minimum)
747   {
748     setProperty(MINIMUM_KEY, Integer.valueOf(minimum));
749   }
750 
751   /**
752    * Gets The step size by which the spinbox will increase or decrease the number in the input.
753    *
754    * @return  the new stepSize value
755    */
756   final public int getStepSize()
757   {
758     return ComponentUtils.resolveInteger(getProperty(STEP_SIZE_KEY), 1);
759   }
760 
761   /**
762    * Sets The step size by which the spinbox will increase or decrease the number in the input.
763    * 
764    * @param stepSize  the new stepSize value
765    */
766   final public void setStepSize(int stepSize)
767   {
768     setProperty(STEP_SIZE_KEY, Integer.valueOf(stepSize));
769   }
770 
771   /**
772    * Gets event handler for when text becomes selected.
773    *
774    * @return  the new onselect value
775    */
776   final public String getOnselect()
777   {
778     return ComponentUtils.resolveString(getProperty(ONSELECT_KEY));
779   }
780 
781   /**
782    * Sets event handler for when text becomes selected.
783    * 
784    * @param onselect  the new onselect value
785    */
786   final public void setOnselect(String onselect)
787   {
788     setProperty(ONSELECT_KEY, (onselect));
789   }
790 
791   /**
792    * Gets <html>
793    *  Character used to gain quick access to
794    *                the form element specified by the
795    *          <code>for</code>, if set (or this component itself,
796    *               if it is a "non-simple" form element).
797    *               For accessibility reasons, this functionality is not supported
798    *               in screen reader mode.
799    *               If the same access key appears in multiple locations in the
800    *               same page of output, the rendering user agent will cycle
801    *               among the elements accessed by the similar keys.
802    *               <p>
803    *                 This attribute is sometimes referred to as the "mnemonic".
804    *                 </p></html>
805    *
806    * @return  the new accessKey value
807    */
808   final public char getAccessKey()
809   {
810     return ComponentUtils.resolveCharacter((Character)getProperty(ACCESS_KEY_KEY));
811   }
812 
813   /**
814    * Sets <html>
815    *  Character used to gain quick access to
816    *                the form element specified by the
817    *          <code>for</code>, if set (or this component itself,
818    *               if it is a "non-simple" form element).
819    *               For accessibility reasons, this functionality is not supported
820    *               in screen reader mode.
821    *               If the same access key appears in multiple locations in the
822    *               same page of output, the rendering user agent will cycle
823    *               among the elements accessed by the similar keys.
824    *               <p>
825    *                 This attribute is sometimes referred to as the "mnemonic".
826    *                 </p></html>
827    * 
828    * @param accessKey  the new accessKey value
829    */
830   final public void setAccessKey(char accessKey)
831   {
832     setProperty(ACCESS_KEY_KEY, Character.valueOf(accessKey));
833   }
834 
835   /**
836    * Gets If set to TRUE on a form element, the component will automatically submit
837    *      the enclosing form when an appropriate action takes place (a click, text
838    *      change, etc.).
839    *
840    * @return  the new autoSubmit value
841    */
842   final public boolean isAutoSubmit()
843   {
844     return ComponentUtils.resolveBoolean(getProperty(AUTO_SUBMIT_KEY), false);
845   }
846 
847   /**
848    * Sets If set to TRUE on a form element, the component will automatically submit
849    *      the enclosing form when an appropriate action takes place (a click, text
850    *      change, etc.).
851    * 
852    * @param autoSubmit  the new autoSubmit value
853    */
854   final public void setAutoSubmit(boolean autoSubmit)
855   {
856     setProperty(AUTO_SUBMIT_KEY, autoSubmit ? Boolean.TRUE : Boolean.FALSE);
857   }
858 
859   @Override
860   public String getDefaultEventName()
861   {
862     return "change";
863   }
864 
865   @Override
866   public Collection<String> getEventNames()
867   {
868     return _EVENT_NAMES;
869   }
870 
871   @Override
872   public Map<String, List<ClientBehavior>> getClientBehaviors()
873   {
874     return super.getClientBehaviors();
875   }
876 
877   @Override
878   public void addClientBehavior(
879     String         eventName,
880     ClientBehavior behavior)
881   {
882     super.addClientBehavior(eventName, behavior);
883   }
884 
885   @Override
886   public String getFamily()
887   {
888     return COMPONENT_FAMILY;
889   }
890 
891   @Override
892   protected FacesBean.Type getBeanType()
893   {
894     return TYPE;
895   }
896 
897   /**
898    * Construct an instance of the CoreInputNumberSpinbox.
899    */
900   protected CoreInputNumberSpinbox(
901     String rendererType
902     )
903   {
904     super(rendererType);
905   }
906 
907   static
908   {
909     TYPE.lockAndRegister("org.apache.myfaces.trinidad.Input","org.apache.myfaces.trinidad.NumberSpinbox");
910   }
911 }