de.lessvoid.xml.lwxs.elements.SubstitutionGroup Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of nifty Show documentation
Show all versions of nifty Show documentation
Nifty GUI is a Java Library that supports the building of interactive user interfaces for games or similar applications. It utilizes OpenGL for rendering and it can be easily integrated into many rendering systems. The configuration of the GUI is stored in xml files with little supporting Java code. In short Nifty helps you to layout stuff, display it in a cool way and interact with it :)
package de.lessvoid.xml.lwxs.elements;
import de.lessvoid.xml.lwxs.Schema;
import javax.annotation.Nonnull;
import java.util.ArrayList;
import java.util.Collection;
public class SubstitutionGroup {
@Nonnull
private final Collection elements = new ArrayList();
public void addToProcessor(final Schema schema, @Nonnull final XmlProcessorType processor) throws Exception {
XmlProcessorSubstituitionGroup subst = new XmlProcessorSubstituitionGroup(schema);
for (Element e : elements) {
subst.addElement(e);
}
processor.addSubstituitionGroup(subst);
}
@Nonnull
public Type getHelperType() {
return new Type("none", null) {
@Override
public void addElement(final Element element) {
elements.add(element);
}
};
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy