GuideTable.java
1.66 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/*
* Decompiled with CFR 0_118.
*
* Could not load the following classes:
* org.apache.sling.api.SlingHttpServletRequest
* org.apache.sling.api.resource.Resource
* org.apache.sling.api.resource.ResourceResolver
* org.apache.sling.api.resource.ValueMap
*/
package com.adobe.aemds.guide.common;
import com.adobe.aemds.guide.common.GuideNode;
import com.adobe.aemds.guide.common.GuidePanel;
import java.util.List;
import org.apache.sling.api.SlingHttpServletRequest;
import org.apache.sling.api.resource.Resource;
import org.apache.sling.api.resource.ResourceResolver;
import org.apache.sling.api.resource.ValueMap;
public class GuideTable
extends GuidePanel {
public int getColumns(GuideNode row) {
GuidePanel panel = new GuidePanel();
panel.setResource(this.slingRequest.getResourceResolver().getResource(row.getPath()));
panel.setSlingRequest(this.slingRequest);
return panel.getItems().size();
}
public int getColumns() {
List<GuideNode> elements = this.getItems();
int max = -1;
int size = elements.size();
for (int j = 0; j < size; ++j) {
GuideNode par = elements.get(j);
int columns = this.getColumns(par);
if (columns <= max) continue;
max = columns;
}
return max;
}
public String getMobileLayout() {
return (String)this.resourceProps.get("./layout/mobileLayout", (Object)"");
}
public String getSummary() {
return (String)this.resourceProps.get("./tableSummaryText", (Object)"");
}
public String getColumnWidth() {
return (String)this.resourceProps.get("columnWidth", (Object)"");
}
}