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 | |
public class BasicLayoutWithContentHeader extends LayoutController{ |
10 | |
|
11 | 0 | protected FlowPanel viewContainer = new FlowPanel(); |
12 | 0 | protected FlowPanel layout = new FlowPanel(); |
13 | 0 | protected KSDocumentHeader header = new KSDocumentHeader(false); |
14 | |
|
15 | |
public BasicLayoutWithContentHeader(String controllerId) { |
16 | 0 | super(controllerId); |
17 | 0 | layout.add(header); |
18 | 0 | layout.add(viewContainer); |
19 | 0 | this.initWidget(layout); |
20 | 0 | header.addStyleName("Lum-DocumentHeader-Spacing"); |
21 | 0 | } |
22 | |
|
23 | |
public KSDocumentHeader getHeader(){ |
24 | 0 | return header; |
25 | |
} |
26 | |
|
27 | |
@Override |
28 | |
protected void hideView(View view) { |
29 | 0 | viewContainer.clear(); |
30 | 0 | } |
31 | |
|
32 | |
@Override |
33 | |
protected void renderView(View view) { |
34 | 0 | viewContainer.add(view.asWidget()); |
35 | 0 | } |
36 | |
|
37 | |
|
38 | |
|
39 | |
|
40 | |
|
41 | |
@Override |
42 | |
public void updateModel() { |
43 | 0 | this.updateModelFromCurrentView(); |
44 | 0 | } |
45 | |
|
46 | |
} |