// Path: src/main/java/org/coode/matrix/model/api/MatrixModel.java
// public interface MatrixModel<R extends OWLObject> extends TreeTableModel<R> {
// 
//     String getTreeColumnLabel();
// 
//     Object getMatrixValue(R rowObject, Object columnObject);
// 
//     List<OWLOntologyChange> setMatrixValue(R rowObj, Object columnObj, Object value);
// 
//     List<OWLOntologyChange> addMatrixValue(R rowObj, Object columnObj, Object value);
// 
//     boolean isSuitableCellValue(Object value, int row, int col);
// 
//     Object getSuitableColumnObject(Object columnObject);
// 
//     boolean isValueRestricted(R rowObject, Object columnObject);
// 
//     Set getSuggestedFillers(R rowObject, Object columnObject, int threshold);
// 
// //    void setFilterForColumn(Object columnObject, Object filter);
// //
// //    Object getFilterForColumn(Object obj);
// 
//     void dispose();
// }
// 
// Path: src/main/java/org/coode/matrix/ui/renderer/MatrixHeaderCellRenderer.java
// public class MatrixHeaderCellRenderer extends DefaultTableCellRenderer {
//     private static final long serialVersionUID = 1L;
//     @Override
//     public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int col) {
//         // use getColumnName from the model
//         col = table.convertColumnIndexToModel(col);
//         value = table.getModel().getColumnName(col);
//         super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, col);
//         // Inherit the colors and font from the header component
//         JTableHeader header = table.getTableHeader();
//         if (header != null) {
//             setForeground(header.getForeground());
//             setBackground(header.getBackground());
//             setFont(header.getFont());
//         }
// 
//         setBorder(UIManager.getBorder("TableHeader.cellBorder"));
//         setHorizontalAlignment(SwingConstants.CENTER);
//         return this;
//     }
// }


import java.awt.Color;
import java.awt.Container;
import java.awt.Cursor;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.datatransfer.Transferable;
import java.awt.dnd.DropTarget;
import java.awt.dnd.DropTargetDragEvent;
import java.awt.dnd.DropTargetEvent;
import java.util.List;
import javax.swing.JComponent;
import javax.swing.table.TableCellRenderer;
import javax.swing.table.TableColumn;
import javax.swing.table.TableColumnModel;
import javax.swing.tree.TreeSelectionModel;
import org.coode.matrix.model.api.MatrixModel;
import org.coode.matrix.ui.renderer.MatrixHeaderCellRenderer;
import org.protege.editor.owl.model.OWLModelManager;
import org.protege.editor.owl.model.event.EventType;
import org.protege.editor.owl.model.event.OWLModelManagerChangeEvent;
import org.protege.editor.owl.model.event.OWLModelManagerListener;
import org.protege.editor.owl.ui.renderer.LinkedObjectComponent;
import org.protege.editor.owl.ui.renderer.OWLRendererPreferences;
import org.protege.editor.owl.ui.table.OWLObjectDropTargetListener;
import org.protege.editor.owl.ui.transfer.OWLObjectDropTarget;
import org.protege.editor.owl.ui.tree.OWLObjectTree;
import org.semanticweb.owlapi.model.OWLEntity;
import org.semanticweb.owlapi.model.OWLObject;
import org.semanticweb.owlapi.model.OWLOntologyChange;
import uk.ac.manchester.cs.bhig.jtreetable.JTreeTable;
/*
* Copyright (C) 2007, University of Manchester
*/
package org.coode.matrix.ui.component;





/**
 * Author: Nick Drummond<br>
 * http://www.cs.man.ac.uk/~drummond/<br><br>
 * <p/>
 * The University Of Manchester<br>
 * Bio Health Informatics Group<br>
 * Date: Jan 3, 2008<br><br>
 */
public class MatrixTreeTable<R extends OWLObject> extends JTreeTable<R>
        implements OWLObjectDropTarget, LinkedObjectComponent {
    private static final long serialVersionUID = 1L;

    private OWLModelManager mngr;

// Path: src/main/java/org/coode/matrix/model/api/MatrixModel.java
// public interface MatrixModel<R extends OWLObject> extends TreeTableModel<R> {
// 
//     String getTreeColumnLabel();
// 
//     Object getMatrixValue(R rowObject, Object columnObject);
// 
//     List<OWLOntologyChange> setMatrixValue(R rowObj, Object columnObj, Object value);
// 
//     List<OWLOntologyChange> addMatrixValue(R rowObj, Object columnObj, Object value);
// 
//     boolean isSuitableCellValue(Object value, int row, int col);
// 
//     Object getSuitableColumnObject(Object columnObject);
// 
//     boolean isValueRestricted(R rowObject, Object columnObject);
// 
//     Set getSuggestedFillers(R rowObject, Object columnObject, int threshold);
// 
// //    void setFilterForColumn(Object columnObject, Object filter);
// //
// //    Object getFilterForColumn(Object obj);
// 
//     void dispose();
// }
// 
// Path: src/main/java/org/coode/matrix/ui/renderer/MatrixHeaderCellRenderer.java
// public class MatrixHeaderCellRenderer extends DefaultTableCellRenderer {
//     private static final long serialVersionUID = 1L;
//     @Override
//     public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int col) {
//         // use getColumnName from the model
//         col = table.convertColumnIndexToModel(col);
//         value = table.getModel().getColumnName(col);
//         super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, col);
//         // Inherit the colors and font from the header component
//         JTableHeader header = table.getTableHeader();
//         if (header != null) {
//             setForeground(header.getForeground());
//             setBackground(header.getBackground());
//             setFont(header.getFont());
//         }
// 
//         setBorder(UIManager.getBorder("TableHeader.cellBorder"));
//         setHorizontalAlignment(SwingConstants.CENTER);
//         return this;
//     }
// }


// Path: src/main/java/org/coode/matrix/ui/component/MatrixTreeTable.java
import java.awt.Color;
import java.awt.Container;
import java.awt.Cursor;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.datatransfer.Transferable;
import java.awt.dnd.DropTarget;
import java.awt.dnd.DropTargetDragEvent;
import java.awt.dnd.DropTargetEvent;
import java.util.List;
import javax.swing.JComponent;
import javax.swing.table.TableCellRenderer;
import javax.swing.table.TableColumn;
import javax.swing.table.TableColumnModel;
import javax.swing.tree.TreeSelectionModel;
import org.coode.matrix.model.api.MatrixModel;
import org.coode.matrix.ui.renderer.MatrixHeaderCellRenderer;
import org.protege.editor.owl.model.OWLModelManager;
import org.protege.editor.owl.model.event.EventType;
import org.protege.editor.owl.model.event.OWLModelManagerChangeEvent;
import org.protege.editor.owl.model.event.OWLModelManagerListener;
import org.protege.editor.owl.ui.renderer.LinkedObjectComponent;
import org.protege.editor.owl.ui.renderer.OWLRendererPreferences;
import org.protege.editor.owl.ui.table.OWLObjectDropTargetListener;
import org.protege.editor.owl.ui.transfer.OWLObjectDropTarget;
import org.protege.editor.owl.ui.tree.OWLObjectTree;
import org.semanticweb.owlapi.model.OWLEntity;
import org.semanticweb.owlapi.model.OWLObject;
import org.semanticweb.owlapi.model.OWLOntologyChange;
import uk.ac.manchester.cs.bhig.jtreetable.JTreeTable;

/*
* Copyright (C) 2007, University of Manchester
*/
package org.coode.matrix.ui.component;





/**
 * Author: Nick Drummond<br>
 * http://www.cs.man.ac.uk/~drummond/<br><br>
 * <p/>
 * The University Of Manchester<br>
 * Bio Health Informatics Group<br>
 * Date: Jan 3, 2008<br><br>
 */
public class MatrixTreeTable<R extends OWLObject> extends JTreeTable<R>
        implements OWLObjectDropTarget, LinkedObjectComponent {
    private static final long serialVersionUID = 1L;

    private OWLModelManager mngr;

    protected MatrixModel<R> model;