< prev index next >
modules/fxml/src/main/java/javafx/fxml/FXMLLoader.java
Print this page
@@ -80,10 +80,11 @@
import com.sun.javafx.fxml.PropertyNotFoundException;
import com.sun.javafx.fxml.expression.Expression;
import com.sun.javafx.fxml.expression.ExpressionValue;
import com.sun.javafx.fxml.expression.KeyPath;
import static com.sun.javafx.FXPermissions.MODIFY_FXML_CLASS_LOADER_PERMISSION;
+import com.sun.javafx.fxml.FXMLLoaderHelper;
import java.net.MalformedURLException;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.EnumMap;
import java.util.Locale;
@@ -304,11 +305,11 @@
// and apply them after build() has been called
if (this.value instanceof Builder) {
throw constructLoadException("Cannot bind to builder property.");
}
- if (!impl_isStaticLoad()) {
+ if (!isStaticLoad()) {
value = value.substring(BINDING_EXPRESSION_PREFIX.length(),
value.length() - 1);
expression = Expression.valueOf(value);
// Create the binding
@@ -1141,11 +1142,11 @@
"Including \"%s\" in \"%s\" created cyclic reference.",
fxmlLoader.location.toExternalForm(),
FXMLLoader.this.location.toExternalForm()));
}
fxmlLoader.setClassLoader(cl);
- fxmlLoader.impl_setStaticLoad(staticLoad);
+ fxmlLoader.setStaticLoad(staticLoad);
Object value = fxmlLoader.loadImpl(callerClass);
if (fx_id != null) {
String id = this.fx_id + CONTROLLER_SUFFIX;
@@ -2043,10 +2044,17 @@
@Override
public String run() {
return System.getProperty("javafx.version");
}
});
+
+ FXMLLoaderHelper.setFXMLLoaderAccessor(new FXMLLoaderHelper.FXMLLoaderAccessor() {
+ @Override
+ public void setStaticLoad(FXMLLoader fxmlLoader, boolean staticLoad) {
+ fxmlLoader.setStaticLoad(staticLoad);
+ }
+ });
}
/**
* Creates a new FXMLLoader instance.
*/
@@ -2351,30 +2359,24 @@
this.classLoader = classLoader;
clearImports();
}
- /**
+ /*
* Returns the static load flag.
- *
- * @treatAsPrivate
- * @deprecated
*/
- public boolean impl_isStaticLoad() {
+ boolean isStaticLoad() {
// SB-dependency: RT-21226 has been filed to track this
return staticLoad;
}
- /**
+ /*
* Sets the static load flag.
*
* @param staticLoad
- *
- * @treatAsPrivate
- * @deprecated
*/
- public void impl_setStaticLoad(boolean staticLoad) {
+ void setStaticLoad(boolean staticLoad) {
// SB-dependency: RT-21226 has been filed to track this
this.staticLoad = staticLoad;
}
/**
@@ -2611,44 +2613,35 @@
for (FXMLLoader loader : loaders) {
messageBuilder.append(loader.location != null ? loader.location.getPath() : "unknown path");
if (loader.current != null) {
messageBuilder.append(":");
- messageBuilder.append(loader.impl_getLineNumber());
+ messageBuilder.append(loader.getLineNumber());
}
messageBuilder.append("\n");
}
return messageBuilder.toString();
}
/**
* Returns the current line number.
- *
- * @treatAsPrivate
- * @deprecated
- * @since JavaFX 2.2
*/
- public int impl_getLineNumber() {
+ int getLineNumber() {
return xmlStreamReader.getLocation().getLineNumber();
}
/**
* Returns the current parse trace.
- *
- * @treatAsPrivate
- * @deprecated
- * @since JavaFX 2.1
*/
- // SB-dependency: RT-21475 has been filed to track this
- public ParseTraceElement[] impl_getParseTrace() {
+ ParseTraceElement[] getParseTrace() {
ParseTraceElement[] parseTrace = new ParseTraceElement[loaders.size()];
int i = 0;
for (FXMLLoader loader : loaders) {
parseTrace[i++] = new ParseTraceElement(loader.location, (loader.current != null) ?
- loader.impl_getLineNumber() : -1);
+ loader.getLineNumber() : -1);
}
return parseTrace;
}
< prev index next >