001 /** 002 * Copyright 2010 The Kuali Foundation Licensed under the 003 * Educational Community License, Version 2.0 (the "License"); you may 004 * not use this file except in compliance with the License. You may 005 * obtain a copy of the License at 006 * 007 * http://www.osedu.org/licenses/ECL-2.0 008 * 009 * Unless required by applicable law or agreed to in writing, 010 * software distributed under the License is distributed on an "AS IS" 011 * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 012 * or implied. See the License for the specific language governing 013 * permissions and limitations under the License. 014 */ 015 016 package org.kuali.student.common.ui.client.widgets.tabs; 017 018 import org.kuali.student.common.ui.client.mvc.Callback; 019 import org.kuali.student.common.ui.client.widgets.tabs.impl.KSTabPanelImpl; 020 021 import com.google.gwt.core.client.GWT; 022 import com.google.gwt.user.client.ui.Image; 023 import com.google.gwt.user.client.ui.Widget; 024 025 @Deprecated 026 public class KSTabPanel extends KSTabPanelAbstract { 027 028 public static enum TabPosition{LEFT, RIGHT}; 029 public static enum TabPanelStyle{FULL_PAGE, SMALL} 030 031 private KSTabPanelAbstract panel = GWT.create(KSTabPanelImpl.class); 032 033 public KSTabPanel(){ 034 this.initWidget(panel); 035 } 036 037 public KSTabPanel(TabPanelStyle style){ 038 panel.setTabPanelStyle(style); 039 this.initWidget(panel); 040 } 041 042 @Override 043 public void addTab(String key, Widget tabWidget, Widget content, 044 TabPosition position) { 045 panel.addTab(key, tabWidget, content, position); 046 047 } 048 049 @Override 050 public void addTab(String key, String label, Widget content, 051 TabPosition position) { 052 panel.addTab(key, label, content, position); 053 054 } 055 056 @Override 057 public void addTab(String key, String label, Image image, Widget content, 058 TabPosition position) { 059 panel.addTab(key, label, image, content, position); 060 061 } 062 063 @Override 064 public void addTab(String key, String label, Image image, Widget content) { 065 panel.addTab(key, label, image, content); 066 067 } 068 069 @Override 070 public void addTab(String key, String label, Widget content) { 071 panel.addTab(key, label, content); 072 073 } 074 075 @Override 076 public void addTab(String key, Widget tabWidget, Widget content) { 077 panel.addTab(key, tabWidget, content); 078 079 } 080 081 @Override 082 public void addTabCustomCallback(String key, Callback<String> callback) { 083 panel.addTabCustomCallback(key, callback); 084 085 } 086 087 @Override 088 public String getSelectedTabKey() { 089 return panel.getSelectedTabKey(); 090 } 091 092 @Override 093 public Widget getSelectedTab() { 094 return panel.getSelectedTab(); 095 } 096 097 @Override 098 public String getSelectedTabName() { 099 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 }