| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| KSLabel | 
 | 
 | 1.0;1 | 
| 1 |  /** | |
| 2 |   * Copyright 2010 The Kuali Foundation Licensed under the | |
| 3 |   * Educational Community License, Version 2.0 (the "License"); you may | |
| 4 |   * not use this file except in compliance with the License. You may | |
| 5 |   * obtain a copy of the License at | |
| 6 |   * | |
| 7 |   * http://www.osedu.org/licenses/ECL-2.0 | |
| 8 |   * | |
| 9 |   * Unless required by applicable law or agreed to in writing, | |
| 10 |   * software distributed under the License is distributed on an "AS IS" | |
| 11 |   * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express | |
| 12 |   * or implied. See the License for the specific language governing | |
| 13 |   * permissions and limitations under the License. | |
| 14 |   */ | |
| 15 | ||
| 16 |  package org.kuali.student.common.ui.client.widgets; | |
| 17 | ||
| 18 |  import com.google.gwt.user.client.ui.Label; | |
| 19 | ||
| 20 |  /** | |
| 21 |   * KSLabel wraps gwt Label.  This class provides most of the same functionality, but sets KS css styles | |
| 22 |   * for its default look (for improved browser compatibility and customizability). | |
| 23 |   * | |
| 24 |   * @author Kuali Student Team | |
| 25 |   * | |
| 26 |   */ | |
| 27 | public class KSLabel extends Label{ | |
| 28 |      /** | |
| 29 |       * Creates an empty label. | |
| 30 |       * | |
| 31 |       */ | |
| 32 |      public KSLabel(){ | |
| 33 | 0 |          super(); | 
| 34 | 0 |          setupDefaultStyle(); | 
| 35 | 0 |      } | 
| 36 | ||
| 37 |      /** | |
| 38 |       * Creates a label with the specified text. | |
| 39 |       * | |
| 40 |       * @param text the new label's text | |
| 41 |       */ | |
| 42 |      public KSLabel(String text){ | |
| 43 | 0 |          super(text); | 
| 44 | 0 |          setupDefaultStyle(); | 
| 45 | 0 |      } | 
| 46 | ||
| 47 |      /** | |
| 48 |       * Creates a label with the specified text and sets the word wrap flag. | |
| 49 |       * False will disable word wrap, otherwise word wrap will be enabled. | |
| 50 |       * | |
| 51 |       * @param text the new label's text | |
| 52 |       * @param wordWrap false to disable word wrapping | |
| 53 |       */ | |
| 54 | public KSLabel(String text, boolean wordWrap){ | |
| 55 | 0 |          super(text, wordWrap); | 
| 56 | 0 |          setupDefaultStyle(); | 
| 57 | 0 |      } | 
| 58 | ||
| 59 |      /** | |
| 60 |       * This method sets the default style for labels. | |
| 61 |       * | |
| 62 |       */ | |
| 63 | private void setupDefaultStyle(){ | |
| 64 | 0 |          addStyleName("KS-Label"); | 
| 65 |          //cant think of why you would need a default hover style for labels | |
| 66 | 0 |      } | 
| 67 | } |