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

de.lessvoid.xml.lwxs.elements.XmlProcessorSubstituitionGroup Maven / Gradle / Ivy

Go to download

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 :)

There is a newer version: 1.4.3
Show newest version
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