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

com.github.czyzby.lml.parser.impl.attribute.building.StyleLmlAttribute Maven / Gradle / Ivy

package com.github.czyzby.lml.parser.impl.attribute.building;

import com.github.czyzby.lml.parser.LmlParser;
import com.github.czyzby.lml.parser.tag.LmlActorBuilder;
import com.github.czyzby.lml.parser.tag.LmlBuildingAttribute;
import com.github.czyzby.lml.parser.tag.LmlTag;

/** Chooses widget's style name (as it appears in Skin). Expects a string. By default, mapped to "style" and "class"
 * attribute names.
 *
 * @author MJ */
public class StyleLmlAttribute implements LmlBuildingAttribute {
    @Override
    public Class getBuilderType() {
        return LmlActorBuilder.class;
    }

    @Override
    public boolean process(final LmlParser parser, final LmlTag tag, final LmlActorBuilder builder,
            final String rawAttributeData) {
        builder.setStyleName(parser.parseString(rawAttributeData));
        return FULLY_PARSED;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy