Coverage Report - org.homeunix.thecave.buddi.view.swing.ScheduledTransactionListCellRenderer
 
Classes in this File Line Coverage Branch Coverage Complexity
ScheduledTransactionListCellRenderer
16%
1/6
0%
0/2
2
 
 1  
 /*
 2  
  * Created on Aug 7, 2007 by wyatt
 3  
  */
 4  
 package org.homeunix.thecave.buddi.view.swing;
 5  
 
 6  
 import java.awt.Component;
 7  
 
 8  
 import javax.swing.DefaultListCellRenderer;
 9  
 import javax.swing.JList;
 10  
 
 11  
 import org.homeunix.thecave.buddi.model.ScheduledTransaction;
 12  
 
 13  1845
 public class ScheduledTransactionListCellRenderer extends DefaultListCellRenderer {
 14  
         public static final long serialVersionUID = 0;
 15  
 
 16  
         @Override
 17  
         public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
 18  0
                 super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
 19  
 
 20  0
                 if (value instanceof ScheduledTransaction)
 21  0
                         this.setText(((ScheduledTransaction) value).getScheduleName());
 22  
                 else
 23  0
                         this.setText("");
 24  
                 
 25  0
                 return this;
 26  
         }
 27  
 }