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.widgets.tabs;
17  
18  import org.kuali.student.common.ui.client.mvc.Callback;
19  import org.kuali.student.common.ui.client.widgets.tabs.impl.KSTabPanelImpl;
20  
21  import com.google.gwt.core.client.GWT;
22  import com.google.gwt.user.client.ui.Image;
23  import com.google.gwt.user.client.ui.Widget;
24  
25  @Deprecated
26  public class KSTabPanel extends KSTabPanelAbstract {
27  	
28  	public static enum TabPosition{LEFT, RIGHT};
29  	public static enum TabPanelStyle{FULL_PAGE, SMALL}
30  
31      private KSTabPanelAbstract panel = GWT.create(KSTabPanelImpl.class);
32  
33      public KSTabPanel(){
34      	this.initWidget(panel);
35      }
36      
37      public KSTabPanel(TabPanelStyle style){
38      	panel.setTabPanelStyle(style);
39      	this.initWidget(panel);
40      }
41  
42  	@Override
43  	public void addTab(String key, Widget tabWidget, Widget content,
44  			TabPosition position) {
45  		panel.addTab(key, tabWidget, content, position);
46  		
47  	}
48  
49  	@Override
50  	public void addTab(String key, String label, Widget content,
51  			TabPosition position) {
52  		panel.addTab(key, label, content, position);
53  		
54  	}
55  
56  	@Override
57  	public void addTab(String key, String label, Image image, Widget content,
58  			TabPosition position) {
59  		panel.addTab(key, label, image, content, position);
60  		
61  	}
62  
63  	@Override
64  	public void addTab(String key, String label, Image image, Widget content) {
65  		panel.addTab(key, label, image, content);
66  		
67  	}
68  
69  	@Override
70  	public void addTab(String key, String label, Widget content) {
71  		panel.addTab(key, label, content);
72  		
73  	}
74  
75  	@Override
76  	public void addTab(String key, Widget tabWidget, Widget content) {
77  		panel.addTab(key, tabWidget, content);
78  		
79  	}
80  
81  	@Override
82  	public void addTabCustomCallback(String key, Callback<String> callback) {
83  		panel.addTabCustomCallback(key, callback);
84  		
85  	}
86  
87  	@Override
88  	public String getSelectedTabKey() {
89  		return panel.getSelectedTabKey();
90  	}
91  	
92  	@Override
93      public Widget getSelectedTab() {
94          return panel.getSelectedTab();
95      }
96  	
97  	@Override
98      public String getSelectedTabName() {
99          return panel.getSelectedTabName();
100     }
101 
102 	@Override
103 	public void removeTab(String key) {
104 		panel.removeTab(key);
105 		
106 	}
107 
108 	@Override
109 	public void removeTabCustomCallbacks(String key) {
110 		panel.removeTabCustomCallbacks(key);
111 		
112 	}
113 
114 	@Override
115 	public void selectTab(String key) {
116 		panel.selectTab(key);
117 		
118 	}
119 
120 	@Override
121 	public void addStyleName(String style) {
122 		panel.addStyleName(style);
123 		
124 	}
125 
126 	@Override
127 	public int getTabCount() {
128 		return panel.getTabCount();
129 	}
130 
131 	@Override
132 	public boolean hasTabKey(String key) {
133 		return panel.hasTabKey(key);
134 	}
135 
136 	@Override
137 	public void setTabPanelStyle(TabPanelStyle style) {
138 		panel.setTabPanelStyle(style);
139 	}
140 
141 }