■ ■ ■ ■ ■ ■
src/main/java/com/nccgroup/loggerplusplus/logview/logtable/LogTable.java
| skipped 88 lines |
89 | 89 | | this.getSelectionModel().setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); |
90 | 90 | | |
91 | 91 | | registerListeners(); |
92 | | - | |
93 | | - | //TODO AUTOSCROLL ON ENTRY ADDED |
94 | | - | // if (this.preferences.getSetting(Globals.PREF_AUTO_SCROLL)) { |
95 | | - | // JScrollBar scrollBar = LoggerPlusPlus.instance.getLogScrollPanel().getVerticalScrollBar(); |
96 | | - | // scrollBar.setValue(scrollBar.getMaximum() + 100); |
97 | | - | // } |
98 | 92 | | } |
99 | 93 | | |
100 | 94 | | @Override |
| skipped 19 lines |
120 | 114 | | } |
121 | 115 | | } |
122 | 116 | | |
123 | | - | if(entry == null){ |
124 | | - | return new JLabel("Error, view the logs for info."); |
125 | | - | } |
126 | | - | |
127 | 117 | | Component c = super.prepareRenderer(renderer, row, column); |
128 | 118 | | |
129 | 119 | | IntStream selectedRows = IntStream.of(this.getSelectedRows()); |
| skipped 2 lines |
132 | 122 | | c.setBackground(this.getSelectionBackground()); |
133 | 123 | | c.setForeground(this.getSelectionForeground()); |
134 | 124 | | }else { |
| 125 | + | if(entry == null){ |
| 126 | + | System.err.println("Could not convert row index to model. Table entry might not be highlighted properly."); |
| 127 | + | return c; |
| 128 | + | } |
135 | 129 | | if(entry.getMatchingColorFilters().size() != 0){ |
136 | 130 | | ColorFilter colorFilter = null; |
137 | 131 | | Map<UUID, ColorFilter> colorFilters = this.preferences.getSetting(Globals.PREF_COLOR_FILTERS); |
| skipped 102 lines |