<?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.ui.OTChoiceWithFeedback" />
    <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>
              <comboBoxViewEntry>
                <OTViewEntry objectClass="org.concord.otrunk.ui.OTChoice"
                  viewClass="org.concord.otrunk.ui.swing.OTChoiceComboBoxView" />
              </comboBoxViewEntry>
              <menuViewEntry>
                <OTViewEntry objectClass="org.concord.otrunk.ui.OTChoice"
                  viewClass="org.concord.otrunk.ui.swing.OTChoiceMenuView" />
              </menuViewEntry>
            </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/>
                  ComboBox view:<br/>
                </td>
                <td>
                  OTChoice #2<br/>
                  RadioButton view:<br/>
                </td>
                <td>
                  OTChoice #3<br/>
                  RadioButton view (Horizontal):<br/>
                </td>
              </tr>
              <tr valign="top">
                <td>
                  <object refid="${combo_choice}" />
                </td>
                <td>
                  <object refid="${normal_choice}" />
                </td>
                <td>
                  <object refid="${normal_choice_horiz}" />
                </td>
              </tr>
              <tr valign="top">
                <td>
                  OTChoice #4<br/>
                  Menu view:<br/>
                </td>
                <td>
                  OTChoice #5<br/>
                  Checkbox view<br/>
                  (with rationale):<br/>
                </td>
                <td>
                  OTChoice #6<br/>
                  Checkbox view:<br/>
                </td>
              </tr>
              <tr valign="top">
                <td>
                  <object refid="${complex_choice}" />
                </td>
                <td>
                  <object refid="${rationale_choice}" />
                </td>
                <td>
                    <object refid="${normal_choice_checkbox}" />
                </td>
              </tr>
            </table>
          </bodyText>
          <documentRefs>
          
            <OTChoice local_id="combo_choice" selectionUI="2">
              <choices>
                <OTText name="Choice 1" />
                <OTText name="Choice 2" />
                <OTText name="Choice 3" />
              </choices>
            </OTChoice>
            <OTChoice local_id="normal_choice" selectionUI="0">
              <choices>
                <OTText name="Choice 1" />
                <OTText name="Choice 2" />
                <OTText name="Choice 3" />
              </choices>
            </OTChoice>
            <OTChoice local_id="normal_choice_horiz" selectionUI="0" horizontal="true">
              <choices>
                <OTText name="Choice 1" />
                <OTText name="Choice 2" />
                <OTText name="Choice 3" />
              </choices>
            </OTChoice>
            <OTChoice local_id="complex_choice" name="Menu choice" selectionUI="3">
              <choices>
                <OTText name="Choice 1" />
                <OTText name="Choice 2" />
                <OTChoice name="Submenu 1">
                	<choices>
                		<OTText name="Choice 1.1" />
                		<OTText name="Choice 1.2" />
                	</choices>
                </OTChoice>
                <OTChoice name="Submenu 2">
                	<choices>
                		<OTText name="Choice 2.1" />
                		<OTText name="Choice 2.2" />
                		<OTChoice name="Submenu 3">
		                	<choices>
		                		<OTText name="Choice 3.1" />
		                		<OTText name="Choice 3.2" />
		                	</choices>
		                </OTChoice>
                	</choices>
                </OTChoice>
              </choices>
            </OTChoice>
            <OTChoice local_id="rationale_choice" alignContent="0" 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="normal_choice_checkbox" alignContent="2" selectionUI="1">
              <choices>
                <OTCompoundDoc name="Check choice 1" ><bodyText>Check choice 1</bodyText></OTCompoundDoc>
                <OTCompoundDoc name="Check choice 2" ><bodyText>Check choice 2</bodyText></OTCompoundDoc>
                <OTCompoundDoc name="Check choice 3" ><bodyText>Check choice 3</bodyText></OTCompoundDoc>
                <OTCompoundDoc name="Check choice 4" ><bodyText>Check choice 4</bodyText></OTCompoundDoc>
              </choices>
            </OTChoice>
          </documentRefs>
        </OTCompoundDoc>
      </root>

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