1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.student.common.ui.client.widgets.impl; |
17 | |
|
18 | |
import org.kuali.student.common.ui.client.widgets.KSTabPanelAbstract; |
19 | |
|
20 | |
import com.google.gwt.event.logical.shared.SelectionHandler; |
21 | |
import com.google.gwt.user.client.ui.DecoratedTabPanel; |
22 | |
import com.google.gwt.user.client.ui.TabBar; |
23 | |
import com.google.gwt.user.client.ui.Widget; |
24 | |
|
25 | |
@Deprecated |
26 | |
public class KSTabPanelImpl extends KSTabPanelAbstract { |
27 | |
|
28 | 0 | private final DecoratedTabPanel panel = new DecoratedTabPanel(); |
29 | |
|
30 | |
public KSTabPanelImpl() { |
31 | 0 | super(); |
32 | 0 | panel.addStyleName("KS-Tab-Panel"); |
33 | 0 | TabBar tabBar = panel.getTabBar(); |
34 | 0 | tabBar.addStyleName("KS-Tab-Panel-BarItem"); |
35 | 0 | initWidget(panel); |
36 | 0 | } |
37 | |
|
38 | |
@Override |
39 | |
public void addTab(Widget w, String tabText){ |
40 | 0 | panel.add(w, tabText); |
41 | 0 | } |
42 | |
|
43 | |
@Override |
44 | |
public void addTab(Widget w, Widget tab){ |
45 | 0 | panel.add(w, tab); |
46 | 0 | } |
47 | |
|
48 | |
@Override |
49 | |
public boolean removeTab(int index) { |
50 | 0 | return panel.remove(index); |
51 | |
} |
52 | |
|
53 | |
@Override |
54 | |
public void removeTab(Widget widget) { |
55 | 0 | panel.remove(widget); |
56 | 0 | } |
57 | |
|
58 | |
@Override |
59 | |
public void selectTab(int index) { |
60 | 0 | panel.selectTab(index); |
61 | 0 | } |
62 | |
|
63 | |
@Override |
64 | |
public int getTabCount() { |
65 | 0 | return panel.getWidgetCount(); |
66 | |
} |
67 | |
|
68 | |
@Override |
69 | |
public void addStyleName(String style) { |
70 | 0 | panel.addStyleName(style); |
71 | 0 | } |
72 | |
|
73 | |
|
74 | |
@Override |
75 | |
public void addSelectionHandler(SelectionHandler<Integer> handler) { |
76 | 0 | panel.addSelectionHandler(handler); |
77 | 0 | } |
78 | |
|
79 | |
@Override |
80 | |
public int getWidgetIndex(Widget widget) { |
81 | 0 | return panel.getWidgetIndex(widget); |
82 | |
} |
83 | |
} |