Skip to content

Commit

Permalink
gui: fix code cell renderer in find/usage dialogs
Browse files Browse the repository at this point in the history
  • Loading branch information
skylot committed Sep 19, 2015
1 parent d060f5b commit 28e334a
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions jadx-gui/src/main/java/jadx/gui/ui/CommonSearchDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.List;

import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea;
Expand Down Expand Up @@ -155,14 +156,20 @@ protected JPanel initResultsTable() {
resultsModel = new ResultsModel();
resultsTable = new ResultsTable(resultsModel);
resultsTable.setShowHorizontalLines(false);
// resultsTable.setAutoCreateColumnsFromModel(true);
resultsTable.setDragEnabled(false);
resultsTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
resultsTable.setBackground(ContentArea.BACKGROUND);
resultsTable.setColumnSelectionAllowed(false);
resultsTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
resultsTable.setAutoscrolls(false);
resultsTable.setDefaultRenderer(Object.class, new ResultsTableCellRenderer());

ResultsTableCellRenderer renderer = new ResultsTableCellRenderer();
Enumeration<TableColumn> columns = resultsTable.getColumnModel().getColumns();
while (columns.hasMoreElements()) {
TableColumn column = columns.nextElement();
column.setCellRenderer(renderer);
}

resultsTable.addMouseListener(new MouseAdapter() {
public void mouseClicked(MouseEvent evt) {
if (evt.getClickCount() == 2) {
Expand Down

0 comments on commit 28e334a

Please sign in to comment.