GuideTable.java 1.66 KB
/*
 * 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)"");
    }
}