1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
|
17 | |
|
18 | |
package org.kuali.student.common.ui.client.widgets.field.layout.layouts; |
19 | |
|
20 | |
import org.kuali.student.common.ui.client.configurable.mvc.SectionTitle; |
21 | |
|
22 | |
|
23 | |
|
24 | |
|
25 | |
|
26 | |
|
27 | |
public class BorderedHeadedLayout extends HeadedLayout{ |
28 | |
|
29 | |
|
30 | |
public BorderedHeadedLayout(){ |
31 | 0 | super(); |
32 | 0 | verticalLayout.addStyleName("ks-form-bordered-body"); |
33 | 0 | body.setStyleName("ks-form-bordered"); |
34 | 0 | body.add(verticalLayout); |
35 | |
|
36 | 0 | } |
37 | |
|
38 | |
public BorderedHeadedLayout(String titleText, boolean updateable){ |
39 | 0 | super(); |
40 | 0 | this.updateable = updateable; |
41 | |
|
42 | 0 | buildHeader(titleText, updateable); |
43 | |
|
44 | 0 | body.add(header); |
45 | 0 | body.add(verticalLayout); |
46 | |
|
47 | 0 | body.setStyleName("ks-form-bordered"); |
48 | 0 | verticalLayout.addStyleName("ks-form-bordered-body"); |
49 | 0 | } |
50 | |
|
51 | |
@Override |
52 | |
public void setLayoutTitle(SectionTitle layoutTitle) { |
53 | 0 | layoutTitle.addStyleName("ks-form-bordered-header-title"); |
54 | 0 | header.setHeaderTitle(layoutTitle); |
55 | |
|
56 | 0 | } |
57 | |
|
58 | |
@Override |
59 | |
protected void buildHeader(String titleText, boolean updateable) { |
60 | 0 | SectionTitle title = SectionTitle.generateH4Title(titleText); |
61 | 0 | header = new Header(title, updateable); |
62 | 0 | header.setStyleName("ks-form-bordered-header"); |
63 | 0 | title.addStyleName("ks-form-bordered-header-title"); |
64 | |
|
65 | 0 | } |
66 | |
|
67 | |
} |