/** * Constructs a WizardPanel that will ask the user whether they want to make siblings disjoint. * @param owlEditorKit The relevant editor kit. * @param entityType The type of sibling. * @param recommendation Whether or not it is recommended that siblings be disjoint. */ public MakeSiblingsDisjointPanel(OWLEditorKit owlEditorKit, EntityType<?> entityType, Recommendation recommendation) { super(ID, String.format("Make sibling %s disjoint?", entityType.getPluralPrintName().toLowerCase()), owlEditorKit); this.checkBox = new JCheckBox(String.format("Do you want to make sibling %s disjoint? (%s)", entityType.getPluralPrintName().toLowerCase(), recommendation.getPrintName()), recommendation == Recommendation.RECOMMENDED); checkBox.setBackground(null); this.entityType = entityType; this.recommendation = recommendation; setInstructions(String.format("Make sibling %s disjoint (%s)", entityType.getPluralPrintName().toLowerCase(), recommendation.getPrintName())); JPanel parent = new JPanel(new BorderLayout()); parent.add(checkBox, BorderLayout.NORTH); setContent(parent); }
/** * Constructs a WizardPanel that will ask the user whether they want to make siblings disjoint. * @param owlEditorKit The relevant editor kit. * @param entityType The type of sibling. * @param recommendation Whether or not it is recommended that siblings be disjoint. */ public MakeSiblingsDisjointPanel(OWLEditorKit owlEditorKit, EntityType<?> entityType, Recommendation recommendation) { super(ID, String.format("Make sibling %s disjoint?", entityType.getPluralPrintName().toLowerCase()), owlEditorKit); this.checkBox = new JCheckBox(String.format("Do you want to make sibling %s disjoint? (%s)", entityType.getPluralPrintName().toLowerCase(), recommendation.getPrintName()), recommendation == Recommendation.RECOMMENDED); checkBox.setBackground(null); this.entityType = entityType; this.recommendation = recommendation; setInstructions(String.format("Do you want to make sibling %s disjoint? (%s)", entityType.getPluralPrintName().toLowerCase(), recommendation.getPrintName())); JPanel parent = new JPanel(new BorderLayout()); parent.add(checkBox, BorderLayout.NORTH); setContent(parent); }