Coverage Report - org.kuali.student.common.ui.client.widgets.KSBlockingDialog
 
Classes in this File Line Coverage Branch Coverage Complexity
KSBlockingDialog
0%
0/23
0%
0/2
2
 
 1  
 package org.kuali.student.common.ui.client.widgets;
 2  
 
 3  
 import com.google.gwt.user.client.ui.FlowPanel;
 4  
 import com.google.gwt.user.client.ui.Image;
 5  
 import com.google.gwt.user.client.ui.Label;
 6  
 
 7  0
 public class KSBlockingDialog {
 8  0
    private static KSDialog dialog = new KSDialog();
 9  0
    private static Label messageLabel = new Label();
 10  
    static{
 11  0
        FlowPanel mainPanel = new FlowPanel();
 12  
 
 13  0
        messageLabel.setText("Loading...");
 14  0
        Image twiddler = new Image("images/common/twiddler3.gif");
 15  
       
 16  0
        mainPanel.setStyleName("KSBlockingDialog-mainPanel");
 17  0
        messageLabel.setStyleName("KSBlockingDialog-message");
 18  0
        twiddler.setStyleName("KSBlockingDialog-icon");
 19  
        
 20  0
        mainPanel.add(twiddler);
 21  0
        mainPanel.add(messageLabel);
 22  
        
 23  0
        dialog.setCloseLinkVisible(false);
 24  0
        dialog.setWidget(mainPanel);
 25  0
        dialog.setMaxHeight(60);
 26  0
        dialog.setMaxWidth(200);
 27  0
    }
 28  
    public static void show(String message){
 29  0
        messageLabel.setText(message);
 30  
        
 31  0
        if(dialog.isShowing()){
 32  0
            return;
 33  
        }
 34  0
        dialog.center();
 35  0
    }
 36  
    public static void hide(){
 37  0
        dialog.hide();
 38  0
    }
 39  
 }