Coverage Report - org.kuali.rice.krad.uif.widget.LightBox
 
Classes in this File Line Coverage Branch Coverage Complexity
LightBox
0%
0/21
0%
0/6
1.3
 
 1  
 /**
 2  
  * Copyright 2005-2011 The Kuali Foundation
 3  
  *
 4  
  * Licensed under the Educational Community License, Version 2.0 (the "License");
 5  
  * you may not use this file except in compliance with the License.
 6  
  * You may obtain a copy of the License at
 7  
  *
 8  
  * http://www.opensource.org/licenses/ecl2.php
 9  
  *
 10  
  * Unless required by applicable law or agreed to in writing, software
 11  
  * distributed under the License is distributed on an "AS IS" BASIS,
 12  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 13  
  * See the License for the specific language governing permissions and
 14  
  * limitations under the License.
 15  
  */
 16  
 package org.kuali.rice.krad.uif.widget;
 17  
 
 18  
 import java.util.HashMap;
 19  
 
 20  
 /**
 21  
  * Used for rendering a lightbox in the UI to display action links in dialog
 22  
  * popups
 23  
  * 
 24  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 25  
  */
 26  
 public class LightBox extends WidgetBase {
 27  
 
 28  
     private static final long serialVersionUID = -4004284762546700975L;
 29  
 
 30  
     private String actionParameterMapString;
 31  
 
 32  
     private String height;
 33  
     private String width;
 34  
 
 35  
     private boolean lookupReturnByScript;
 36  
 
 37  
     public LightBox() {
 38  0
         super();
 39  0
     }
 40  
 
 41  
     /**
 42  
      * Setter for the action parameter map javascript string
 43  
      *
 44  
      * @param actionParameterMapString the action parameter map javascript string
 45  
      */
 46  
     public void setActionParameterMapString(String actionParameterMapString) {
 47  0
         this.actionParameterMapString = actionParameterMapString;
 48  0
     }
 49  
 
 50  
     /**
 51  
      * Action parameter map javascript string
 52  
      * <p>
 53  
      * The action parameter map string will be used to write these parameters to
 54  
      * the form.
 55  
      * </p>
 56  
      *
 57  
      * @return the action parameter map javascript string
 58  
      */
 59  
     public String getActionParameterMapString() {
 60  0
         return actionParameterMapString;
 61  
     }
 62  
 
 63  
     /**
 64  
      * @return height of light box
 65  
      */
 66  
     public String getHeight() {
 67  0
         return height;
 68  
     }
 69  
 
 70  
     /**
 71  
      * Setter for the height of the light box
 72  
      * Can be percentage. ie. 75%
 73  
      *
 74  
      * @param height
 75  
      */
 76  
     public void setHeight(String height) {
 77  0
         this.height = height;
 78  0
     }
 79  
 
 80  
     /**
 81  
      * @return width of light box
 82  
      */
 83  
     public String getWidth() {
 84  0
         return width;
 85  
     }
 86  
 
 87  
      /**
 88  
      * Setter for the width of the light box
 89  
      * Can be percentage. ie. 75%
 90  
      *
 91  
      * @param width
 92  
      */
 93  
     public void setWidth(String width) {
 94  0
         this.width = width;
 95  0
     }
 96  
 
 97  
      /**
 98  
      * @see org.kuali.rice.krad.uif.component.ComponentBase#getComponentOptionsJSString()
 99  
      */
 100  
     @Override
 101  
     public String getComponentOptionsJSString() {
 102  0
         if (getComponentOptions() == null) {
 103  0
             setComponentOptions(new HashMap<String, String>());
 104  
         }
 105  
 
 106  
         // Add the width and height properties to the ComponentOptions
 107  
         // before the JS String gets generated.
 108  0
         if (width != null) {
 109  0
             getComponentOptions().put("width", width);
 110  
         }
 111  0
         if (height != null) {
 112  0
             getComponentOptions().put("height", height);
 113  
         }
 114  0
         return super.getComponentOptionsJSString();
 115  
     }
 116  
 
 117  
     /**
 118  
      * @return the lookupReturnByScript flag
 119  
      */
 120  
     public boolean isLookupReturnByScript() {
 121  0
         return lookupReturnByScript;
 122  
     }
 123  
 
 124  
 /**
 125  
      * Setter for the flag to indicate that lookups will return the value
 126  
      * by script and not a post
 127  
      *
 128  
      * @param lookupReturnByScript the lookupReturnByScript flag
 129  
      */
 130  
     public void setLookupReturnByScript(boolean lookupReturnByScript) {
 131  0
         this.lookupReturnByScript = lookupReturnByScript;
 132  0
     }
 133  
 }