package scenegraphdemo; import java.util.HashMap; import java.util.Map; import javafx.scene.Node; /** * Base template class. * @author Mr. Java * */ public class Template { Map<Object, Object> resources = new HashMap<Object, Object>(); /** * Named resources. * @return */ public Map<Object, Object> getProperties() { return resources; } /** * Validates the parent of the template. The base implementation * checks for non-null. * @param node */ public void validateParent(Node node) { if(node == null) throw new IllegalStateException("Templated parent must not be null"); } }