PDFPageBoundary.java 1.01 KB
/*
 * Decompiled with CFR 0_118.
 * 
 * Could not load the following classes:
 *  com.adobe.internal.pdftoolkit.core.types.ASName
 */
package com.adobe.internal.pdftoolkit.pdf.page;

import com.adobe.internal.pdftoolkit.core.types.ASName;
import com.adobe.internal.pdftoolkit.pdf.document.PDFASNameInterface;

/*
 * This class specifies class file version 49.0 but uses Java 6 signatures.  Assumed Java 6.
 */
public enum PDFPageBoundary implements PDFASNameInterface
{
    MediaBox(ASName.k_MediaBox),
    CropBox(ASName.k_CropBox),
    BleedBox(ASName.k_BleedBox),
    TrimBox(ASName.k_TrimBox),
    ArtBox(ASName.k_ArtBox);
    
    private ASName mBox;

    private PDFPageBoundary(ASName box) {
        this.mBox = box;
    }

    public static PDFPageBoundary getInstance(ASName box) {
        for (PDFPageBoundary p : PDFPageBoundary.values()) {
            if (p.getName() != box) continue;
            return p;
        }
        return null;
    }

    @Override
    public ASName getName() {
        return this.mBox;
    }
}