use of org.protege.editor.owl.ui.renderer.OWLCellRenderer in project protege-client by protegeproject.
the class ShowUncommittedChangesAction method displayUncommittedChanges.
private void displayUncommittedChanges(OWLOntology ontology, List<OWLOntologyChange> uncommitted) {
String shortOntologyName = "";
OWLOntologyID ontologyId = ontology.getOntologyID();
if (!ontologyId.isAnonymous()) {
shortOntologyName = ontology.getOntologyID().getOntologyIRI().get().getRemainder().get();
}
if (shortOntologyName.isEmpty()) {
shortOntologyName = ontologyId.toString();
}
ChangeListTableModel tableModel = new ChangeListTableModel(uncommitted);
JTable table = new JTable(tableModel);
table.setDefaultRenderer(OWLObject.class, new OWLCellRenderer(getOWLEditorKit()));
JScrollPane pane = new JScrollPane(table);
JDialog dialog = new JDialog((Frame) SwingUtilities.getAncestorOfClass(Frame.class, getOWLWorkspace()));
dialog.setTitle("Uncommitted changes for " + shortOntologyName);
dialog.getContentPane().add(pane);
dialog.setResizable(true);
dialog.setModal(true);
dialog.pack();
dialog.setVisible(true);
}
use of org.protege.editor.owl.ui.renderer.OWLCellRenderer in project protege-client by protegeproject.
the class ChangeHistoryPanel method getChangeListComponent.
private JComponent getChangeListComponent() {
changeListTableModel = new ChangeListTableModel(new ArrayList<OWLOntologyChange>());
changeListTable = new JTable(changeListTableModel);
changeListTable.setDefaultRenderer(OWLObject.class, new OWLCellRenderer(editorKit));
JScrollPane scrollPane = new JScrollPane(changeListTable);
scrollPane.setAlignmentX(Component.LEFT_ALIGNMENT);
return scrollPane;
}
Aggregations