View Javadoc

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      	super(StyleType.SUB_LEVEL);
37      }
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      	DisplayItem item = new DisplayItem(style);
45      	if (itemLabel != null) {
46            item.setItemLabel(itemLabel + " " + itemCount);
47      	}
48  
49          return item;
50      }
51      
52      @Override
53      public Widget generateAddWidget() {
54          return null;        
55      }
56      
57      public String getItemLabel() {
58          return itemLabel;
59      }
60  
61      public void setItemLabel(String itemLabel) {
62          this.itemLabel = itemLabel;
63      }
64   
65  }