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

io.webfolder.ui4j.api.dom.Input Maven / Gradle / Ivy

There is a newer version: 4.0.0
Show newest version
package io.webfolder.ui4j.api.dom;

public class Input {

    protected Element element;

    public Input(Element element) {
        this.element = element;
    }

    public boolean isDisabled() {
        return Boolean.parseBoolean(String.valueOf(element.getProperty("disabled")));
    }

    public Input setDisabled(boolean disabled) {
        element.setProperty("disabled", disabled);
        return this;
    }

    public boolean isReadOnly() {
        return Boolean.parseBoolean(String.valueOf(element.getProperty("readOnly")));
    }

    public Input setReadOnly(boolean readOnly) {
        element.setProperty("readOnly", readOnly);
        return this;
    }

    public Element getElement() {
        return element;
    }

    public boolean isHidden() {
        return "hidden".equals(element.getAttribute("type").get());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy