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

com.github.czyzby.lml.parser.impl.attribute.scroll.ScrollDisabledXLmlAttribute Maven / Gradle / Ivy

Go to download

Templates for LibGDX Scene2D UI with HTML-like syntax and FreeMarker-inspired macros.

There is a newer version: 1.9.1.9.6
Show newest version
package com.github.czyzby.lml.parser.impl.attribute.scroll;

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane;
import com.github.czyzby.lml.parser.LmlParser;
import com.github.czyzby.lml.parser.tag.LmlAttribute;
import com.github.czyzby.lml.parser.tag.LmlTag;

/** See {@link ScrollPane#setScrollingDisabled(boolean, boolean)}. Sets X scrolling to the parsed value and Y to default
 * value: false, because there were no getters or individual setters available. If you want to disable both, use
 * {@link ScrollDisabledLmlAttribute} instead. Mapped to "disableX", "disabledX".
 *
 * @author MJ */
public class ScrollDisabledXLmlAttribute implements LmlAttribute {
    @Override
    public Class getHandledType() {
        return ScrollPane.class;
    }

    @Override
    public void process(final LmlParser parser, final LmlTag tag, final ScrollPane actor,
            final String rawAttributeData) {
        actor.setScrollingDisabled(parser.parseBoolean(rawAttributeData, actor), false);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy