-
Notifications
You must be signed in to change notification settings - Fork 5
/
GSHeader.java
38 lines (33 loc) · 1.07 KB
/
GSHeader.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package org.genericsystem.reactor.gstag;
import org.genericsystem.reactor.gs.FlexDirection;
import org.genericsystem.reactor.gs.GSSubcellDisplayer.GSTagConstructor;
import org.genericsystem.reactor.gs.GSSection;
import org.genericsystem.reactor.gs.GSTag;
public class GSHeader extends GSSection {
public GSHeader(GSTag parent, String string, GSTagConstructor tag1, String string1, GSTagConstructor tag2, String string2) {
super(parent, FlexDirection.ROW);
addStyle("justify-content", "space-around");
addStyle("padding", "10px");
if (tag1 != null) {
GSTag leftTag = tag1.build(this);
leftTag.addStyle("flex", "1");
leftTag.setText(string1);
} else {
GSTag leftTag = new GSSection(this, FlexDirection.COLUMN);
leftTag.addStyle("flex", "1");
}
new GenericH1Section(this, string) {
{
addStyle("flex", "3");
}
};
if (tag2 != null) {
GSTag rightTag = tag2.build(this);
rightTag.addStyle("flex", "1");
rightTag.setText(string2);
} else {
GSTag rightTag = new GSSection(this, FlexDirection.COLUMN);
rightTag.addStyle("flex", "1");
}
};
}