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

com.citytechinc.cq.component.dialog.AbstractDialogElement Maven / Gradle / Ivy

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

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

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public abstract class AbstractDialogElement extends AbstractXmlElement implements DialogElement {

    private double ranking;

    public AbstractDialogElement(DefaultDialogElementParameters parameters) {
        super(parameters);
        if (containedElements != null) {
            Collections.sort(containedElements, new DialogElementComparator());
        }
        if (parameters.getListeners() != null) {
            List newElements = new ArrayList();
            if (containedElements != null) {
                newElements.addAll(containedElements);
            }
            newElements.add(parameters.getListeners());
            containedElements = newElements;
        }
    }

    public void setFieldName(String fieldName) {
        this.fieldName = fieldName;
    }

    public void setRanking(double ranking) {
        this.ranking = ranking;
    }

    public double getRanking() {
        return ranking;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy