mirror of
https://github.com/oliverschmidt/contiki.git
synced 2025-01-10 11:29:38 +00:00
Minor optimization: only lookup data when needed
This commit is contained in:
parent
5c30aed814
commit
16a3f710a4
@ -26,7 +26,7 @@
|
|||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Id: LogListener.java,v 1.29 2010/04/28 09:39:26 fros4943 Exp $
|
* $Id: LogListener.java,v 1.30 2010/05/19 12:58:15 nifi Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package se.sics.cooja.plugins;
|
package se.sics.cooja.plugins;
|
||||||
@ -244,8 +244,8 @@ public class LogListener extends VisPlugin {
|
|||||||
public Component getTableCellRendererComponent(JTable table,
|
public Component getTableCellRendererComponent(JTable table,
|
||||||
Object value, boolean isSelected, boolean hasFocus, int row,
|
Object value, boolean isSelected, boolean hasFocus, int row,
|
||||||
int column) {
|
int column) {
|
||||||
|
if (backgroundColors) {
|
||||||
LogData d = logs.get(logTable.getRowSorter().convertRowIndexToModel(row));
|
LogData d = logs.get(logTable.getRowSorter().convertRowIndexToModel(row));
|
||||||
if (backgroundColors && d != null) {
|
|
||||||
char last = d.strID.charAt(d.strID.length()-1);
|
char last = d.strID.charAt(d.strID.length()-1);
|
||||||
if (last >= '0' && last <= '9') {
|
if (last >= '0' && last <= '9') {
|
||||||
setBackground(BG_COLORS[last - '0']);
|
setBackground(BG_COLORS[last - '0']);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user