<?xml version='1.0' encoding='UTF-8'?>
<section>
  <sectioninfo>
    <keywordset>
      <keyword>dragged handle control</keyword>
      <keyword>rich:unputNumberSlider</keyword>
      <keyword>HtmlInputNumberSlider</keyword>
    </keywordset>
  </sectioninfo>
  <table>
    <title>Component identification parameters </title>
    <tgroup cols="2">
      <thead>
        <row>
          <entry>Name</entry>
          <entry>Value</entry>
        </row>
      </thead>
      <tbody>
        <row>
          <entry>component-type</entry>
          <entry>org.richfaces.inputNumberSlider</entry>
        </row>
        <row>
          <entry>component-class</entry>
          <entry>org.richfaces.component.html.HtmlInputNumberSlider</entry>
        </row>
        <row>
          <entry>component-family</entry>
          <entry>org.richfaces.inputNumberSlider</entry>
        </row>
        <row>
          <entry>renderer-type</entry>
          <entry>org.richfaces.InputNumberSliderRenderer</entry>
        </row>
        <row>
          <entry>tag-class</entry>
          <entry>org.richfaces.taglib.InputNumberSliderTag</entry>
        </row>
      </tbody>
    </tgroup>
  </table>

  <section>
    <title>Creating the Component with a Page Tag</title>
    <para>Here is a simple example as it could be used on a page: </para>

    <para>
      <emphasis role="bold">Example:</emphasis>
    </para>
    <programlisting role="XML"><![CDATA[...
    <rich:inputNumberSlider minValue="0" maxValue="100" step="1"/>	
...
]]></programlisting>
  </section>
  <section>
    <title>Creating the Component Dynamically Using Java</title>

    <para>
      <emphasis role="bold">Example:</emphasis>
    </para>
    <programlisting role="JAVA"><![CDATA[import org.richfaces.component.html.HtmlInputNumberSlider;
...
HtmlInputNumberSlider mySlider = new HtmlInputNumberSlider();
...
]]></programlisting>
  </section>
  <section>
    <title>Details of Usage</title>
    <para><emphasis role="bold">
        <property>&lt;rich:inputNumberSlider&gt;</property>
      </emphasis> is used to facilitate your data input with rich UI Controls.</para>
    <para>Here is the simplest variant of a slider definition with
          <emphasis><property>&quot;minValue&quot;</property>,</emphasis>
      <emphasis>
        <property>&quot;maxValue&quot;</property>
      </emphasis> and <emphasis>
        <property>&quot;step&quot;</property>
      </emphasis> (on default = &quot;1&quot;) attributes, which define the beginning and
      the end of a numerical area and a <property>slider</property> property step.</para>


    <para>
      <emphasis role="bold">Example:</emphasis>
    </para>
    <programlisting role="XML"><![CDATA[<rich:inputNumberSlider></rich:inputNumberSlider>]]></programlisting>

    <para>It generates on a page:</para>
    <figure>
      <title>Generated inputNumberSlider</title>
      <mediaobject>
        <imageobject>
          <imagedata fileref="images/slider2.gif"/>
        </imageobject>
      </mediaobject>
    </figure>
    <para> Using <emphasis>
        <property>&quot;showInput&quot;</property>
      </emphasis> (default is true) and <emphasis>
        <property>&quot;enableManualInput&quot;</property>
      </emphasis> (default value is true) attributes, it&apos;s possible to output the input
      area near the slider, and make it read-only or editable.</para>
    <para>To remove input area use <emphasis>
        <property>&quot;showInput=&quot;false&quot;</property>
      </emphasis>:</para>

    <para>
      <emphasis role="bold">Example:</emphasis>
    </para>
    <programlisting role="XML"><![CDATA[<rich:inputNumberSlider minValue="1"  maxValue="100" showInput="false"/>]]></programlisting>
    <para>It looks at page like:</para>
    <figure>
      <title>InputNumberSlider without input field</title>
      <mediaobject>
        <imageobject>
          <imagedata fileref="images/slider3.gif"/>
        </imageobject>
      </mediaobject>
    </figure>
    <para>It&apos;s also possible to switch off displaying of &quot;boundary
      values&quot; and a tooltip showing on a handle drawing. This could be performed with the
      help of the component defined attributes: <emphasis>
        <property>&quot;showBoundaryValues&quot;</property>
      </emphasis> which is responsible for &quot;boundary values&quot; displaying (default
      is true) and <emphasis>
        <property>&quot;showToolTip&quot;</property>
      </emphasis> which is responsible for tooltip displaying (default is true).</para>

    <para>Moreover, to add e.g. some JavaScript effects, events defined on it are used.</para>
    <itemizedlist>
      <listitem> onchange </listitem>
      <listitem> onmouseover </listitem>
      <listitem> onclick </listitem>
      <listitem> onfocus </listitem>
      <listitem> onmouseout </listitem>
      <listitem> etc. </listitem>
    </itemizedlist>

  </section>
  <section>
    <title>Look-and-Feel Customization</title>
    <para>For skinnability implementation the components use a <emphasis>
        <property>style class redefinition method</property>
      </emphasis>.</para>
    <para>Default style classes are mapped on <emphasis><property>skin
      parameters</property>.</emphasis></para>
    <para>To redefine appearance of all inputNumberSliders at once, there are two ways:</para>
    <itemizedlist>
      <listitem>to redefine corresponding skin parameters</listitem>
      <listitem>to add <emphasis>
          <property>style classes</property>
        </emphasis> used by the inputNumberSlider to your page style sheets</listitem>
    </itemizedlist>
    <table>
      <title>Skin parameters redefinition:</title>
      <tgroup cols="2">
        <thead>
          <row>
            <entry>Skin parameters for a hint</entry>
            <entry>CSS properties</entry>
          </row>
        </thead>
        <tbody>
          <row>
            <entry>generalTextColor</entry>
            <entry>color</entry>
          </row>
          <row>
            <entry>buttonSizeFont</entry>
            <entry>font-size</entry>
          </row>
        </tbody>
      </tgroup>
    </table>
    <table>
      <title>Parameters for header element:</title>
      <tgroup cols="2">
        <thead>
          <row>
            <entry>Skin parameters</entry>
            <entry>CSS properties</entry>
          </row>
        </thead>
        <tbody>
          <row>
            <entry>headerBackgroundColor</entry>
            <entry>background-color</entry>
          </row>
        </tbody>
      </tgroup>
    </table>
  </section>
  <section>
    <title>Definition custom style classes</title>
    <figure>
      <title>Custom style classes of inputNumberSlider</title>
      <mediaobject>
        <imageobject>
          <imagedata fileref="images/slider5.gif"/>
        </imageobject>
      </mediaobject>
    </figure>
    <para>On the screenshot, there are classes names that define specified elements</para>
    <table>
      <title>Predefined component skin class</title>
      <tgroup cols="2">
        <thead>
          <row>
            <entry>Class name</entry>
            <entry>Class description</entry>
          </row>
        </thead>
        <tbody>
          <row>
            <entry>rich-slider-bound</entry>
            <entry>The class defines panel common style. It&apos;s used in the outside <emphasis
                role="bold">
                <property>&lt;div&gt;</property>
              </emphasis>element</entry>
          </row>
          <row>
            <entry>rich-slider-track</entry>
            <entry>a bar to move a pointer</entry>
          </row>
          <row>
            <entry>rich-slider-handle</entry>
            <entry>a slider handle</entry>
          </row>
          <row>
            <entry>rich-slider-input</entry>
            <entry>a text field</entry>
          </row>
          <row>
            <entry>rich-slider-tip</entry>
            <entry>a tooltip</entry>
          </row>
        </tbody>
      </tgroup>
    </table>
    <para>It&apos;s necessary only to define a class according to the corresponding name, so as
      an appearance of all <property>sliders</property> on a page is changed at once. </para>
    <para>To redefine appearance of particular <property>sliders</property>, it&apos;s possible
      to define your own CSS class with one of the names listed there. And then just define one of
      the components class attributes modifying component style properties.</para>
    <para>
      <emphasis role="bold">Example:</emphasis>
    </para>
    <para>CSS code piece used on a page:</para>

    <para>
      <emphasis role="bold">Example:</emphasis>
    </para>
    <programlisting role="HTML"><![CDATA[...
    .rich-slider-handle{
        border:2px solid;
    }
    .myClass{
        font-style:italic;
    }
...
]]></programlisting>
    <para>The component is defined in the following way:</para>

    <para>
      <emphasis role="bold">Example:</emphasis>
    </para>
    <programlisting role="XML"><![CDATA[<rich:inputNumberSlider ... inputClass="myClass" .../>
]]></programlisting>
    <para>Hence, header border width of all <property>sliders</property> is redefined on a page as
      well as a style font for an input field of a particular <property>slider</property>.</para>
  </section>
  <section>
    <title>Relevant resources links</title>
    <para>
      <ulink
        url="http://livedemo.exadel.com/richfaces-demo/richfaces/inputNumberSlider.jsf?c=inputNumberSlider"
        >Here</ulink> you can see the example of <emphasis role="bold"
        >&lt;rich:inputNumberSlider&gt;</emphasis> usage and sources for the given example.
    </para>
  </section>

</section>
