protected void prepareGUIBeforeConflictResolutionStarts() {
    RelationMemberConflictResolverModel relModel = getRelationMemberConflictResolverModel();
    TagConflictResolverModel tagModel = getTagConflictResolverModel();
    getContentPane().removeAll();

    if (relModel.getNumDecisions() > 0 && tagModel.getNumDecisions() > 0) {
      // display both, the dialog for resolving relation conflicts and for resolving tag conflicts
      spTagConflictTypes.setTopComponent(pnlTagConflictResolver);
      spTagConflictTypes.setBottomComponent(pnlRelationMemberConflictResolver);
      getContentPane().add(spTagConflictTypes, BorderLayout.CENTER);
    } else if (relModel.getNumDecisions() > 0) {
      // relation conflicts only
      getContentPane().add(pnlRelationMemberConflictResolver, BorderLayout.CENTER);
    } else if (tagModel.getNumDecisions() > 0) {
      // tag conflicts only
      getContentPane().add(pnlTagConflictResolver, BorderLayout.CENTER);
    } else {
      getContentPane().add(buildEmptyConflictsPanel(), BorderLayout.CENTER);
    }

    getContentPane().add(pnlButtons, BorderLayout.SOUTH);
    validate();
    adjustDividerLocation();
    pnlRelationMemberConflictResolver.prepareForEditing();
  }
 protected final void build() {
   getContentPane().setLayout(new BorderLayout());
   updateTitle();
   spTagConflictTypes = new AutoAdjustingSplitPane(JSplitPane.VERTICAL_SPLIT);
   spTagConflictTypes.setTopComponent(buildTagConflictResolverPanel());
   spTagConflictTypes.setBottomComponent(buildRelationMemberConflictResolverPanel());
   getContentPane().add(pnlButtons = buildButtonPanel(), BorderLayout.SOUTH);
   addWindowListener(new AdjustDividerLocationAction());
   HelpUtil.setHelpContext(getRootPane(), ht("/"));
 }
 private void adjustDividerLocation() {
   int numTagDecisions = getTagConflictResolverModel().getNumDecisions();
   int numRelationDecisions = getRelationMemberConflictResolverModel().getNumDecisions();
   if (numTagDecisions > 0 && numRelationDecisions > 0) {
     double nTop = 1.0 + numTagDecisions;
     double nBottom = 2.5 + numRelationDecisions;
     spTagConflictTypes.setDividerLocation(nTop / (nTop + nBottom));
   }
 }