org.protege.editor.owl.ui.view.cls.OWLDisjointClassesViewComponent Maven / Gradle / Ivy
package org.protege.editor.owl.ui.view.cls;
import org.protege.editor.owl.ui.frame.cls.OWLClassDescriptionFrame;
import org.protege.editor.owl.ui.framelist.OWLFrameList;
import org.semanticweb.owlapi.model.OWLClass;
import javax.swing.*;
import java.awt.*;
/**
* Author: Matthew Horridge
* The University Of Manchester
* Bio-Health Informatics Group
* Date: 19-Jan-2007
*/
public class OWLDisjointClassesViewComponent extends AbstractOWLClassViewComponent {
private OWLFrameList list;
public void initialiseClassView() throws Exception {
list = new OWLFrameList<>(getOWLEditorKit(), new OWLClassDescriptionFrame(getOWLEditorKit()));
setLayout(new BorderLayout());
JScrollPane sp = new JScrollPane(list);
sp.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
add(sp);
}
/**
* This method is called to request that the view is updated with
* the specified class.
* @param selectedClass The class that the view should be updated with. Note
* that this may be null
, which indicates that the view should
* be cleared
* @return The actual class that the view is displaying after it has been updated
* (may be null
)
*/
protected OWLClass updateView(OWLClass selectedClass) {
list.setRootObject(selectedClass);
return selectedClass;
}
public void disposeView() {
list.dispose();
}
}