All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.citytechinc.cq.component.AspectRatio Maven / Gradle / Ivy

There is a newer version: 7.0.0
Show newest version
package com.citytechinc.cq.component;

import com.citytechinc.cq.component.xml.AbstractXmlElement;

public class AspectRatio extends AbstractXmlElement {

    private String value;

    private String ratio;

    private final String text;

    private final String name;

    public AspectRatio(AspectRatioParameters parameters) {
        super(parameters);
        if (parameters.getWidth() != null && parameters.getHeight() != null) {
            value = parameters.getWidth() + "," + parameters.getHeight();
        }
        if (parameters.getRatio() != null) {
            ratio = Double.toString(parameters.getRatio());
        }
        text = parameters.getText();
        name = parameters.getName();
    }

    public String getValue() {
        return value;
    }

    public String getText() {
        return text;
    }

    public String getRatio() {
        return ratio;
    }

    public String getName() {
        return name;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy