/** Get the object that will be passed to the RowModel to fetch values * for the given row. * @param row The row we need the tree node for */ private Object getNodeForRow(int row) { return getOutlineModel().getValueAt(row, 0); }
/** * @see java.awt.event.MouseAdapter#mouseClicked(java.awt.event.MouseEvent) */ @Override public void mouseClicked(MouseEvent e) { Point mousePoint = e.getPoint(); int colIndex = resultsOutline.columnAtPoint(mousePoint); int rowIndex = resultsOutline.rowAtPoint(mousePoint); int colModelIndex = resultsOutline.convertColumnIndexToModel(resultsOutline.columnAtPoint(mousePoint)); if (colModelIndex == OutlineColumn.IDENTIFICATION_COUNT.ordinal() + 1) { DirectoryComparableLong count = (DirectoryComparableLong) resultsOutline .getValueAt(rowIndex, colIndex); if (count != null && count.getSource() != null && count.getSource() > 1) { int rowModelIndex = resultsOutline.convertRowIndexToModel(rowIndex); DefaultMutableTreeNode treeNode = (DefaultMutableTreeNode) mdl.getValueAt(rowModelIndex, 0); ProfileResourceNode node = (ProfileResourceNode) treeNode.getUserObject(); multiIdentificationDialog.showDialog(node); } } } }
/** * @see java.awt.event.MouseAdapter#mouseClicked(java.awt.event.MouseEvent) */ @Override public void mouseClicked(MouseEvent e) { Point mousePoint = e.getPoint(); int colIndex = resultsOutline.columnAtPoint(mousePoint); int rowIndex = resultsOutline.rowAtPoint(mousePoint); int colModelIndex = resultsOutline.convertColumnIndexToModel(resultsOutline.columnAtPoint(mousePoint)); if (colModelIndex == OutlineColumn.IDENTIFICATION_COUNT.ordinal() + 1) { DirectoryComparableLong count = (DirectoryComparableLong) resultsOutline .getValueAt(rowIndex, colIndex); if (count != null && count.getSource() != null && count.getSource() > 1) { int rowModelIndex = resultsOutline.convertRowIndexToModel(rowIndex); DefaultMutableTreeNode treeNode = (DefaultMutableTreeNode) mdl.getValueAt(rowModelIndex, 0); ProfileResourceNode node = (ProfileResourceNode) treeNode.getUserObject(); multiIdentificationDialog.showDialog(node); } } } }