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