1 /*
   2  * Copyright (c) 2010, 2013, 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 public interface LoadListener {
  32     /**
  33      * Called when the loader has read an import processing instruction.
  34      *
  35      * @param target
  36      */
  37     public void readImportProcessingInstruction(String target);
  38 
  39     /**
  40      * Called when the loader has read a language processing instruction.
  41      *
  42      * @param language
  43      */
  44     public void readLanguageProcessingInstruction(String language);
  45 
  46     /**
  47      * Called when the loader has read a comment.
  48      *
  49      * @param comment
  50      */
  51     public void readComment(String comment);
  52 
  53     /**
  54      * Called when the loader has begun reading an instance declaration
  55      * element.
  56      *
  57      * @param type
  58      */
  59     public void beginInstanceDeclarationElement(Class<?> type);
  60 
  61     /**
  62      * Called when the loader has begun reading an instance declaration
  63      * element for an unknown type.
  64      *
  65      * @param name
  66      */
  67     public void beginUnknownTypeElement(String name);
  68 
  69     /**
  70      * Called when the loader has begun reading an include element.
  71      */
  72     public void beginIncludeElement();
  73 
  74     /**
  75      * Called when the loader has begun reading a reference element.
  76      */
  77     public void beginReferenceElement();
  78 
  79     /**
  80      * Called when the loader has begun reading a copy element.
  81      */
  82     public void beginCopyElement();
  83 
  84     /**
  85      * Called when the loader has begun reading a root element.
  86      */
  87     public void beginRootElement();
  88 
  89     /**
  90      * Called when the loader has begun reading a property element.
  91      *
  92      * @param name
  93      * @param sourceType
  94      */
  95     public void beginPropertyElement(String name, Class<?> sourceType);
  96 
  97     /**
  98      * Called when the loader has begun reading a static property element
  99      * defined by an unknown type.
 100      *
 101      * @param name
 102      * @param sourceType
 103      */
 104     public void beginUnknownStaticPropertyElement(String name);
 105 
 106     /**
 107      * Called when the loader has begun reading a script element.
 108      */
 109     public void beginScriptElement();
 110 
 111     /**
 112      * Called when the loader has begun reading a define element.
 113      */
 114     public void beginDefineElement();
 115 
 116     /**
 117      * Called when the loader has read an internal attribute.
 118      *
 119      * @param name
 120      * @param value
 121      */
 122     public void readInternalAttribute(String name, String value);
 123 
 124     /**
 125      * Called when the loader has read a property attribute.
 126      *
 127      * @param name
 128      * @param sourceType
 129      * @param value
 130      */
 131     public void readPropertyAttribute(String name, Class<?> sourceType, String value);
 132 
 133     /**
 134      * Called when the loader has read an unknown static property attribute.
 135      */
 136     public void readUnknownStaticPropertyAttribute(String name, String value);
 137 
 138     /**
 139      * Called when the loader has read an event handler attribute.
 140      *
 141      * @param name
 142      * @param value
 143      */
 144     public void readEventHandlerAttribute(String name, String value);
 145 
 146     /**
 147      * Called when the loader has finished reading an element.
 148      *
 149      * @param value
 150      */
 151     public void endElement(Object value);
 152 }