1 | |
package org.kuali.student.common.ui.client.configurable.mvc.layouts; |
2 | |
|
3 | |
import org.kuali.student.common.ui.client.configurable.mvc.LayoutController; |
4 | |
import org.kuali.student.common.ui.client.mvc.View; |
5 | |
import org.kuali.student.common.ui.client.widgets.headers.KSDocumentHeader; |
6 | |
|
7 | |
import com.google.gwt.user.client.ui.FlowPanel; |
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
public class BasicLayoutWithContentHeader extends LayoutController{ |
17 | |
|
18 | 0 | protected FlowPanel viewContainer = new FlowPanel(); |
19 | 0 | protected FlowPanel layout = new FlowPanel(); |
20 | 0 | protected KSDocumentHeader header = new KSDocumentHeader(false); |
21 | |
|
22 | |
public BasicLayoutWithContentHeader(String controllerId) { |
23 | 0 | super(controllerId); |
24 | 0 | layout.add(header); |
25 | 0 | layout.add(viewContainer); |
26 | 0 | this.initWidget(layout); |
27 | 0 | header.addStyleName("Lum-DocumentHeader-Spacing"); |
28 | 0 | } |
29 | |
|
30 | |
public KSDocumentHeader getHeader(){ |
31 | 0 | return header; |
32 | |
} |
33 | |
|
34 | |
@Override |
35 | |
protected void hideView(View view) { |
36 | 0 | viewContainer.clear(); |
37 | 0 | } |
38 | |
|
39 | |
@Override |
40 | |
protected void renderView(View view) { |
41 | 0 | viewContainer.add(view.asWidget()); |
42 | 0 | } |
43 | |
|
44 | |
|
45 | |
|
46 | |
|
47 | |
|
48 | |
@Override |
49 | |
public void updateModel() { |
50 | 0 | this.updateModelFromCurrentView(); |
51 | 0 | } |
52 | |
|
53 | |
} |