1 /*
   2  * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package javafx.fxml;
  27 
  28 /**
  29  * Load listener interface.
  30  *
  31  * @since 9
  32  */
  33 public interface LoadListener {
  34     /**
  35      * Called when the loader has read an import processing instruction.
  36      *
  37      * @param target
  38      */
  39     public void readImportProcessingInstruction(String target);
  40 
  41     /**
  42      * Called when the loader has read a language processing instruction.
  43      *
  44      * @param language
  45      */
  46     public void readLanguageProcessingInstruction(String language);
  47 
  48     /**
  49      * Called when the loader has read a comment.
  50      *
  51      * @param comment
  52      */
  53     public void readComment(String comment);
  54 
  55     /**
  56      * Called when the loader has begun reading an instance declaration
  57      * element.
  58      *
  59      * @param type
  60      */
  61     public void beginInstanceDeclarationElement(Class<?> type);
  62 
  63     /**
  64      * Called when the loader has begun reading an instance declaration
  65      * element for an unknown type.
  66      *
  67      * @param name
  68      */
  69     public void beginUnknownTypeElement(String name);
  70 
  71     /**
  72      * Called when the loader has begun reading an include element.
  73      */
  74     public void beginIncludeElement();
  75 
  76     /**
  77      * Called when the loader has begun reading a reference element.
  78      */
  79     public void beginReferenceElement();
  80 
  81     /**
  82      * Called when the loader has begun reading a copy element.
  83      */
  84     public void beginCopyElement();
  85 
  86     /**
  87      * Called when the loader has begun reading a root element.
  88      */
  89     public void beginRootElement();
  90 
  91     /**
  92      * Called when the loader has begun reading a property element.
  93      *
  94      * @param name
  95      * @param sourceType
  96      */
  97     public void beginPropertyElement(String name, Class<?> sourceType);
  98 
  99     /**
 100      * Called when the loader has begun reading a static property element
 101      * defined by an unknown type.
 102      *
 103      * @param name
 104      */
 105     public void beginUnknownStaticPropertyElement(String name);
 106 
 107     /**
 108      * Called when the loader has begun reading a script element.
 109      */
 110     public void beginScriptElement();
 111 
 112     /**
 113      * Called when the loader has begun reading a define element.
 114      */
 115     public void beginDefineElement();
 116 
 117     /**
 118      * Called when the loader has read an internal attribute.
 119      *
 120      * @param name
 121      * @param value
 122      */
 123     public void readInternalAttribute(String name, String value);
 124 
 125     /**
 126      * Called when the loader has read a property attribute.
 127      *
 128      * @param name
 129      * @param sourceType
 130      * @param value
 131      */
 132     public void readPropertyAttribute(String name, Class<?> sourceType, String value);
 133 
 134     /**
 135      * Called when the loader has read an unknown static property attribute.
 136      */
 137     public void readUnknownStaticPropertyAttribute(String name, String value);
 138 
 139     /**
 140      * Called when the loader has read an event handler attribute.
 141      *
 142      * @param name
 143      * @param value
 144      */
 145     public void readEventHandlerAttribute(String name, String value);
 146 
 147     /**
 148      * Called when the loader has finished reading an element.
 149      *
 150      * @param value
 151      */
 152     public void endElement(Object value);
 153 }