All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.protege.editor.owl.ui.ontology.imports.missing.ResolutionTypePanel Maven / Gradle / Ivy

package org.protege.editor.owl.ui.ontology.imports.missing;

import org.protege.editor.core.ui.wizard.WizardPanel;
import org.protege.editor.owl.OWLEditorKit;
import org.protege.editor.owl.ui.AbstractOWLWizardPanel;

import javax.swing.*;
import java.awt.*;


/**
 * Author: Matthew Horridge
* The University Of Manchester
* Medical Informatics Group
* Date: 17-Oct-2006

* [email protected]
* www.cs.man.ac.uk/~horridgm

*/ public class ResolutionTypePanel extends AbstractOWLWizardPanel { private JRadioButton specifyFileRadioButton; private JRadioButton specifyLibraryButton; public static final String ID = "ResolutionTypePanel"; public ResolutionTypePanel(OWLEditorKit owlEditorKit) { super(ID, "Missing import resolution type", owlEditorKit); } protected void createUI(JComponent parent) { parent.setLayout(new BorderLayout()); setInstructions("Please choose what you want to do in order to resolve the missing import"); ButtonGroup bg = new ButtonGroup(); Box box = new Box(BoxLayout.Y_AXIS); specifyFileRadioButton = new JRadioButton("Specify a file containing the ontology"); box.add(specifyFileRadioButton); bg.add(specifyFileRadioButton); box.add(Box.createVerticalStrut(3)); specifyLibraryButton = new JRadioButton("Add a new ontology library that contains the ontology"); box.add(specifyLibraryButton); bg.add(specifyLibraryButton); specifyFileRadioButton.setSelected(true); parent.add(box, BorderLayout.NORTH); } public Object getNextPanelDescriptor() { if (specifyFileRadioButton.isSelected()) { return SpecifyFilePathPanel.ID; } else { return WizardPanel.FINISH; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy