<?xml version="1.0" encoding="UTF-8"?>
<otrunk id="33754150-b594-11d9-9669-0800200c9a66">

  <imports>
    <import class="org.concord.otrunk.OTSystem"/>
    <import class="org.concord.otrunk.view.OTViewEntry"/>
    <import class="org.concord.otrunk.view.OTViewService"/>
    <import class="org.concord.otrunk.view.OTViewBundle" />
    <import class="org.concord.otrunk.ui.swing.OTChoiceViewConfig" />
    <import class="org.concord.otrunk.ui.OTText"/>
    <import class="org.concord.otrunk.ui.OTChoice"/>
    <import class="org.concord.otrunk.view.document.OTCompoundDoc" />
  </imports>

  <objects>
    <OTSystem>
      <bundles>
        <OTViewBundle>
          <views>
            <OTChoiceViewConfig objectClass="org.concord.otrunk.ui.OTChoice" viewClass="org.concord.otrunk.ui.swing.OTChoiceView">
              <radioButtonViewEntry>
                <OTChoiceViewConfig objectClass="org.concord.otrunk.ui.OTChoice"
                  viewClass="org.concord.otrunk.ui.swing.OTChoiceRadioButtonView" />
              </radioButtonViewEntry>
              <checkBoxViewEntry>
                <OTChoiceViewConfig objectClass="org.concord.otrunk.ui.OTChoice"
                  viewClass="org.concord.otrunk.ui.swing.OTChoiceCheckBoxView" useViewsAsChoices="true" />
              </checkBoxViewEntry>
            </OTChoiceViewConfig>
            
            <OTViewEntry objectClass="org.concord.otrunk.view.document.OTCompoundDoc"
              viewClass="org.concord.otrunk.view.document.OTDocumentView"/>
          </views>
        </OTViewBundle>
      </bundles>

      <root>
        <OTCompoundDoc>
          <name>Radio Buttons Test</name>
          <bodyText>
            <table>
              <tr>
                <td colspan="3">Please select any item:</td>
              </tr>
              <tr valign="top">
                <td>
                  OTChoice #1<br/>
                  Checkbox view:<br/>
                </td>
                <td>
                  OTChoice #2<br/>
                  RadioButton view:<br/>
                </td>
                <td>
                  OTChoice #3<br/>
                  RadioButton view (Horizontal):<br/>
                </td>
                <td>
                  OTChoice #4<br/>
                  Checkbox view (horizontal):<br/>
                </td>
              </tr>
              <tr valign="top">
                <td>
                  <object refid="${checkbox_choice}" />
                </td>
                <td>
                  <object refid="${radio_choice}" />
                </td>
                <td>
                  <object refid="${radio_choice_horiz}" />
                </td>
                
                <td>
                  <object refid="${checkbox_choice_horiz}" />
                </td>
              </tr>
            </table>
          </bodyText>
          <documentRefs>
            <OTChoice local_id="radio_choice" selectionUI="0" enableRationale="true" rationalePrompt="Why?">
              <choices>
                <OTText name="Choice 1" />
                <OTText name="Choice 2" />
                <OTText name="Choice 3" />
              </choices>
            </OTChoice>
            <OTChoice local_id="radio_choice_horiz" selectionUI="0" horizontal="true" enableRationale="true" itemsPerRow="3">
              <choices>
                <OTText name="Choice 1" />
                <OTText name="Choice 2" />
                <OTText name="Choice 3" />
                <OTText name="Choice 4" />
                <OTText name="Choice 5" />
                <OTText name="Choice 6" />
                <OTText name="Choice 7" />
                <OTText name="Choice 8" />
              </choices>
            </OTChoice>
            <OTChoice local_id="checkbox_choice" selectionUI="1" enableRationale="true" rationalePrompt="Explain your choice...">
              <choices>
                <OTCompoundDoc><bodyText>Rationale <br/>choice 1</bodyText></OTCompoundDoc>
                <OTCompoundDoc><bodyText>Rationale <br/>choice <br/>2</bodyText></OTCompoundDoc>
                <OTCompoundDoc><bodyText>Rationale choice <br/>3</bodyText></OTCompoundDoc>
                <OTCompoundDoc><bodyText>Rationale choice<br/> 4<br/>With some extra long text lines to see how it handles that.</bodyText></OTCompoundDoc>
              </choices>
            </OTChoice>
            <OTChoice local_id="checkbox_choice_horiz" selectionUI="1" horizontal="true" enableRationale="true" rationalePrompt="Explain your choice..." autoLetter="true">
              <choices>
                <OTCompoundDoc><bodyText>Rationale <br/>choice 1</bodyText></OTCompoundDoc>
                <OTCompoundDoc><bodyText>Rationale <br/>choice <br/>2</bodyText></OTCompoundDoc>
                <OTCompoundDoc><bodyText>Rationale choice <br/>3</bodyText></OTCompoundDoc>
                <OTCompoundDoc><bodyText>Rationale choice<br/> 4<br/>With some extra long text lines to see how it handles that.</bodyText></OTCompoundDoc>
              </choices>
            </OTChoice>
          </documentRefs>
        </OTCompoundDoc>
      </root>

    </OTSystem>
  </objects>
</otrunk>
