| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| DisplayMultiplicityComposite | 
 | 
 | 1.2;1.2 | 
| 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.configurable.mvc.multiplicity; | |
| 17 | ||
| 18 |  import com.google.gwt.user.client.ui.Widget; | |
| 19 | ||
| 20 |  /** | |
| 21 |   * This is a read only version of MultiplicityComposite for use in read only screens. | |
| 22 |   *  | |
| 23 |   *  | |
| 24 |   * @author Kuali Student Team | |
| 25 |   * | |
| 26 |   */ | |
| 27 | ||
| 28 |  /** | |
| 29 |   * @deprecated | |
| 30 |   */ | |
| 31 | public abstract class DisplayMultiplicityComposite extends MultiplicityComposite { | |
| 32 | ||
| 33 |      protected String itemLabel; | |
| 34 | ||
| 35 |      public DisplayMultiplicityComposite(){ | |
| 36 | 0 |              super(StyleType.SUB_LEVEL); | 
| 37 | 0 |      } | 
| 38 | ||
| 39 |      /** | |
| 40 |       * @see org.kuali.student.common.ui.client.configurable.mvc.multiplicity.MultiplicityComposite#getItemDecorator() | |
| 41 |       */ | |
| 42 | @Override | |
| 43 |      public MultiplicityItem getItemDecorator(StyleType style) { | |
| 44 | 0 |              DisplayItem item = new DisplayItem(style); | 
| 45 | 0 |              if (itemLabel != null) { | 
| 46 | 0 |            item.setItemLabel(itemLabel + " " + itemCount); | 
| 47 | } | |
| 48 | ||
| 49 | 0 |          return item; | 
| 50 | } | |
| 51 | ||
| 52 | @Override | |
| 53 |      public Widget generateAddWidget() { | |
| 54 | 0 |          return null;         | 
| 55 | } | |
| 56 | ||
| 57 |      public String getItemLabel() { | |
| 58 | 0 |          return itemLabel; | 
| 59 | } | |
| 60 | ||
| 61 | public void setItemLabel(String itemLabel) { | |
| 62 | 0 |          this.itemLabel = itemLabel; | 
| 63 | 0 |      } | 
| 64 | ||
| 65 | } |