<?xml version='1.0' encoding='UTF-8'?>
<section>
  <sectioninfo>
    <keywordset>
      <keyword>bar</keyword>
      <keyword>rich:toolBar</keyword>
      <keyword>HtmlToolBar</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.ToolBar</entry>
        </row>
        <row>
          <entry>component-class</entry>
          <entry>org.richfaces.component.html.HtmlToolBar</entry>
        </row>
        <row>
          <entry>component-family</entry>
          <entry>org.richfaces.ToolBar</entry>
        </row>
        <row>
          <entry>renderer-type</entry>
          <entry>org.richfaces.ToolBarRenderer</entry>
        </row>
        <row>
          <entry>tag-class</entry>
          <entry>org.richfaces.taglib.ToolBarTag</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:toolBar>
        <!--//...Set of action or other JSF components-->
    </rich:toolBar>
...
]]></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.HtmlToolBar;
...
HtmlToolBar myToolBar = new HtmlToolBar();
...
]]></programlisting>
  </section>
  <section>
    <title>Details of Usage</title>
    <para>A <property>toolBar</property> is a wrapper component that facilitates creation of menu
      and <property>tool bars</property>. All components defined inside are located on a stylized
      bar with possibility to group, arrange on the both bar sides, and place predefined separators
      between them.</para>
    <para>Grouping and an input side definition is described for <property>toolBarGroup</property>
      that defines this functionality.</para>
    <para>Separators are located between components with the help of the <emphasis>
        <property>&quot;itemSeparator&quot;</property>
      </emphasis> attribute with four predefined values:</para>
    <itemizedlist>
      <listitem> none </listitem>
      <listitem> line </listitem>
      <listitem> square </listitem>
      <listitem> disc </listitem>
    </itemizedlist>
    <para>For example, when setting a separator of a disc type, the following result is produced:</para>
    <figure>
      <title>&lt;rich:toolBar&gt; with a <emphasis><property>&quot;disc&quot;</property></emphasis> separator</title>

      <mediaobject>
        <imageobject>
          <imagedata fileref="images/toolBar2.png" scalefit="1"/>
        </imageobject>
      </mediaobject>
    </figure>
    <para>Moreover, for <property>toolBar</property> style <emphasis>
        <property>&quot;width&quot;</property>
      </emphasis> and <emphasis>
        <property>&quot;height&quot;</property>
      </emphasis> attributes are placed above all.</para>

  </section>
  <section>
    <title>Look-and-Feel Customization</title>
    
    <para>For skinnability implementation, the components use a <emphasis>
      <property>style class redefinition method.</property>
    </emphasis> Default style classes are mapped on <emphasis>
      <property>skin parameters.</property>
    </emphasis></para>
    
    <para>There are two ways to redefine the appearance of all <emphasis role="bold">
      <property>&lt;rich:toolBar&gt;</property>
    </emphasis> components at once:</para>
    
    <itemizedlist>
      <listitem>
        <para>Redefine the corresponding skin parameters</para>
      </listitem>
      
      <listitem>
        <para>Add to your style sheets <emphasis>
          <property>style classes</property>
        </emphasis> used by a <emphasis role="bold">
          <property>&lt;rich:toolBar&gt;</property>
        </emphasis> component</para>
      </listitem>
    </itemizedlist>
  </section>
  
    <section>
      <title>Skin Parameters Redefinition</title>
    <table>
      <title>Skin parameters redefinition for a component exterior</title>
      <tgroup cols="2">
        <thead>
          <row>
            <entry>Skin parameters</entry>
            <entry>CSS properties</entry>
          </row>
        </thead>
        <tbody>
          <row>
            <entry>panelBorderColor</entry>
            <entry>border-color</entry>
          </row>
          <row>
            <entry>headerBackgroundColor</entry>
            <entry>background-color</entry>
          </row>
        </tbody>
      </tgroup>
    </table>
      
      <table>
        <title>Skin parameters redefinition for a component item</title>
        <tgroup cols="2">
          <thead>
            <row>
              <entry>Skin parameters</entry>
              <entry>CSS properties</entry>
            </row>
          </thead>
          <tbody>
            <row>
              <entry>headerSizeFont</entry>
              <entry>font-size</entry>
            </row>
            <row>
              <entry>headerTextColor</entry>
              <entry>color</entry>
            </row>
            <row>
              <entry>headerWeightFont</entry>
              <entry>font-weight</entry>
            </row>
            <row>
              <entry>headerFamilyFont</entry>
              <entry>font-family</entry>
            </row>
          </tbody>
        </tgroup>
      </table>
      
    </section>
  
  <section>
    <title>Definition of Custom Style Classes</title>
    <table>
      <title>Classes names that define a component appearance</title>
      <tgroup cols="2">
        <thead>
          <row>
            <entry>Class name</entry>
            <entry>Description</entry>
          </row>
        </thead>
        <tbody>
          <row>
            <entry>rich-toolbar</entry>
            <entry>Defines styles for a toolbar element</entry>
          </row>
          <row>
            <entry>rich-toolbar-item</entry>
            <entry>Defines styles for a toolbar item</entry>
          </row>
        </tbody>
      </tgroup>
    </table>
    
    <para>In order to redefine styles for all <emphasis role="bold">
      <property>&lt;rich:toolBar&gt;</property>
    </emphasis> components on a page using CSS, it&apos;s enough to create class with the
      same names and define necessary properties in them.</para>
    
    <para>To change styles of particular <emphasis role="bold">
      <property>&lt;rich:toolBar&gt;</property>
    </emphasis> components define your own style classes in the corresponding <emphasis
      role="bold">
      <property>&lt;rich:toolBar&gt;</property>
    </emphasis>attributes.</para>
    <para>The component also has the standard attributes <emphasis>
        <property>&quot;style&quot;</property>
      </emphasis> and <emphasis>
        <property>&quot;styleClass&quot;</property>
      </emphasis> that could redefine an appearance of a particular component variants.</para>
  </section>
  <section>
    <title>Relevant Resources Links</title>
    <para>
      <ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/toolBar.jsf?c=toolBar"
      >Here</ulink> you can see the example of <emphasis role="bold"
      ><property>&lt;rich:toolBar&gt;</property></emphasis> usage and sources for the given example. </para>
  </section>

</section>
