// referenceMappingHolder expects an MWReferenceMapping
 public static JCheckBox buildPrivateOwnedCheckBox(
     ValueModel referenceMappingHolder,
     ResourceRepository resourceRepository,
     HelpManager helpManager) {
   JCheckBox checkBox =
       buildCheckBox(
           "MAPPING_PRIVATE_OWNED_CHECK_BOX",
           buildPrivateOwnedCheckBoxAdapter(referenceMappingHolder),
           resourceRepository);
   helpManager.addTopicID(checkBox, "mapping.privateOwned");
   return checkBox;
 }
  /** indirectableMappingHolder must have a MWIndirectableMapping value */
  public static JCheckBox buildUsesIndirectionCheckBox(
      ValueModel indirectableMappingHolder,
      ResourceRepository resourceRepository,
      HelpManager helpManager) {
    JCheckBox checkBox =
        buildCheckBox(
            "MAPPING_USE_INDIRECTION_CHECK_BOX",
            buildUsesIndirectionCheckBoxModel(indirectableMappingHolder),
            resourceRepository);
    helpManager.addTopicID(checkBox, "mapping.indirection");

    return checkBox;
  }
  /** transformationMappingHolder must have a MWTransformationMapping value */
  public static JCheckBox buildMutableCheckBox(
      ValueModel transformationMappingHolder,
      ResourceRepository resourceRepository,
      HelpManager helpManager) {
    JCheckBox checkBox =
        buildCheckBox(
            "TRANSFORMATION_MAPPING_IS_MUTABLE",
            buildMutableCheckBoxModel(transformationMappingHolder),
            resourceRepository);

    helpManager.addTopicID(checkBox, "mapping.transformation.mutable");

    return checkBox;
  }
  private static JPanel buildContainerOptionsBrowser(
      final WorkbenchContextHolder holder,
      final PropertyValueModel subjectHolder,
      final JPanel subPanel,
      final String topicId) {

    GridBagConstraints constraints = new GridBagConstraints();

    HelpManager help = holder.getWorkbenchContext().getApplicationContext().getHelpManager();

    JPanel container = new JPanel(new GridBagLayout());
    String advancedContainerOptionsTitle =
        holder
            .getWorkbenchContext()
            .getApplicationContext()
            .getResourceRepository()
            .getString("COLLECTION_OPTIONS_ADVANCED_BUTTON");

    subPanel.setVisible(false);
    subPanel.setBorder(
        buildTitledBorder(
            holder.getWorkbenchContext().getApplicationContext().getResourceRepository(),
            "COLLECTION_OPTIONS_ADVANCED_BUTTON"));

    JButton button =
        buildButton(
            "COLLECTION_OPTIONS_ADVANCED_BUTTON",
            holder.getWorkbenchContext().getApplicationContext().getResourceRepository());
    String buttonText = button.getText();
    buttonText += " >>";
    button.setText(buttonText);

    constraints.gridx = 0;
    constraints.gridy = 0;
    constraints.gridwidth = 1;
    constraints.gridheight = 1;
    constraints.weightx = 1;
    constraints.weighty = 0;
    constraints.fill = GridBagConstraints.NONE;
    constraints.anchor = GridBagConstraints.LINE_START;
    constraints.insets = new Insets(0, 0, 0, 0);

    help.addTopicID(button, topicId + ".advancedContainerOptions");
    container.add(button, constraints);

    constraints.gridx = 0;
    constraints.gridy = 1;
    constraints.gridwidth = 1;
    constraints.gridheight = 1;
    constraints.weightx = 1;
    constraints.weighty = 0;
    constraints.fill = GridBagConstraints.HORIZONTAL;
    constraints.anchor = GridBagConstraints.CENTER;
    constraints.insets = new Insets(0, 0, 0, 0);

    help.addTopicID(subPanel, topicId + ".advancedContainerOptions");
    container.add(subPanel, constraints);

    button.addActionListener(
        MappingComponentFactory.buildAdvancedCollectionOptionsButtonActionListener(
            button, subPanel, advancedContainerOptionsTitle));

    return container;
  }