de.lessvoid.xml.lwxs.elements.XmlProcessorSubstituitionGroup 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 de.lessvoid.xml.lwxs.XmlType;
import de.lessvoid.xml.xpp3.SubstitutionGroup;
import javax.annotation.Nonnull;
import java.util.ArrayList;
import java.util.Collection;
public class XmlProcessorSubstituitionGroup {
@Nonnull
private final Collection elements = new ArrayList();
@Nonnull
private final SubstitutionGroup substitutionGroup = new SubstitutionGroup();
private final Schema schema;
public XmlProcessorSubstituitionGroup(final Schema schemaParam) {
schema = schemaParam;
}
public void addElement(final Element e) throws Exception {
elements.add(e);
}
@Nonnull
public SubstitutionGroup getSubstGroup(@Nonnull final XmlType xmlType) throws Exception {
for (Element e : elements) {
e.addToSubstGroup(schema, substitutionGroup, xmlType);
}
return substitutionGroup;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy