Coverage Report - org.kuali.student.common.ui.client.widgets.layout.LinkContentBlock
 
Classes in this File Line Coverage Branch Coverage Complexity
LinkContentBlock
0%
0/18
N/A
1
 
 1  
 package org.kuali.student.common.ui.client.widgets.layout;
 2  
 
 3  
 import org.kuali.student.common.ui.client.widgets.menus.KSListPanel;
 4  
 
 5  
 import com.google.gwt.event.dom.client.ClickHandler;
 6  
 import com.google.gwt.user.client.ui.Anchor;
 7  
 import com.google.gwt.user.client.ui.Hyperlink;
 8  
 import com.google.gwt.user.client.ui.Widget;
 9  
 
 10  
 public class LinkContentBlock extends ContentBlock{
 11  
 
 12  0
         protected KSListPanel listLayout = new KSListPanel();
 13  
         
 14  
         public LinkContentBlock(String blockTitle, String blockDescriptionHtml,
 15  
                         int blockSize) {
 16  0
                 super(blockTitle, blockDescriptionHtml, blockSize);
 17  0
                 super.add(listLayout);
 18  0
                 listLayout.setStyleName("contentBlock-list");
 19  0
         }
 20  
         
 21  
         public LinkContentBlock(String blockTitle, String blockDescriptionHtml){
 22  0
                 this(blockTitle, blockDescriptionHtml, 1);
 23  0
         }
 24  
         
 25  
         @Override
 26  
         public void add(Widget widget){
 27  0
                 listLayout.add(widget);
 28  0
         }
 29  
         
 30  
         public void addNavLinkWidget(String text, String location){
 31  0
                 Hyperlink hyperlink = new Hyperlink(text, location);
 32  0
                 hyperlink.addStyleName("contentBlock-navLink");
 33  0
                 listLayout.add(hyperlink);
 34  0
         }
 35  
         
 36  
         public void addNavLinkWidget(String text, ClickHandler handler){
 37  0
                 Anchor anchor = new Anchor(text);
 38  0
                 anchor.addClickHandler(handler);
 39  0
                 anchor.addStyleName("contentBlock-navLink");
 40  0
                 this.add(anchor);
 41  0
         }
 42  
 
 43  
 }