1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.student.common.ui.client.widgets.field.layout.layouts; |
17 | |
|
18 | |
import org.kuali.student.common.ui.client.configurable.mvc.SectionTitle; |
19 | |
import org.kuali.student.common.ui.client.widgets.field.layout.button.ButtonLayout; |
20 | |
import org.kuali.student.common.ui.client.widgets.field.layout.element.FieldElement; |
21 | |
import org.kuali.student.common.ui.client.widgets.search.CollapsablePanel; |
22 | |
|
23 | |
import com.google.gwt.user.client.ui.Widget; |
24 | |
|
25 | |
public class CollapsableLayout extends FieldLayout{ |
26 | |
|
27 | 0 | private VerticalFieldLayout verticalLayout = new VerticalFieldLayout(); |
28 | |
private CollapsablePanel panel; |
29 | |
|
30 | 0 | public CollapsableLayout(String title){ |
31 | 0 | panel = new CollapsablePanel(title, verticalLayout, false); |
32 | 0 | this.add(panel); |
33 | 0 | } |
34 | |
|
35 | 0 | public CollapsableLayout(String title, boolean isOpen){ |
36 | 0 | panel = new CollapsablePanel(title, verticalLayout, isOpen); |
37 | 0 | this.add(panel); |
38 | 0 | } |
39 | |
|
40 | |
@Override |
41 | |
public void addFieldToLayout(FieldElement field) { |
42 | 0 | verticalLayout.addField(field); |
43 | |
|
44 | 0 | } |
45 | |
|
46 | |
@Override |
47 | |
public void addLayoutToLayout(FieldLayout layout) { |
48 | 0 | verticalLayout.addLayoutToLayout(layout); |
49 | |
|
50 | 0 | } |
51 | |
|
52 | |
@Override |
53 | |
public void addWidgetToLayout(Widget widget) { |
54 | 0 | verticalLayout.addWidgetToLayout(widget); |
55 | 0 | } |
56 | |
|
57 | |
@Override |
58 | |
public void removeFieldLayoutComponentFromLayout( |
59 | |
FieldLayoutComponent component) { |
60 | 0 | verticalLayout.removeFieldLayoutComponentFromLayout(component); |
61 | |
|
62 | 0 | } |
63 | |
|
64 | |
@Override |
65 | |
public void removeWidgetFromLayout(Widget widget) { |
66 | 0 | verticalLayout.removeWidgetFromLayout(widget); |
67 | 0 | } |
68 | |
|
69 | |
@Override |
70 | |
public void setLayoutTitle(SectionTitle layoutTitle) { |
71 | 0 | verticalLayout.setLayoutTitle(layoutTitle); |
72 | |
|
73 | 0 | } |
74 | |
|
75 | |
@Override |
76 | |
public void addButtonLayoutToLayout(ButtonLayout buttonLayout) { |
77 | 0 | verticalLayout.addButtonLayout(buttonLayout); |
78 | |
|
79 | 0 | } |
80 | |
|
81 | |
} |