19 package org.sleuthkit.autopsy.timeline;
21 import java.io.IOException;
22 import java.net.MalformedURLException;
24 import javafx.fxml.FXMLLoader;
25 import javafx.scene.Node;
26 import org.apache.commons.lang3.StringUtils;
27 import org.openide.util.Exceptions;
42 static public void construct(Node n, String fxmlFileName) {
43 final String name =
"nbres:/" + StringUtils.replace(n.getClass().getPackage().getName(),
".",
"/") +
"/" + fxmlFileName;
44 System.out.println(name);
47 FXMLLoader fxmlLoader =
new FXMLLoader(
new URL(name));
48 fxmlLoader.setRoot(n);
49 fxmlLoader.setController(n);
53 }
catch (IOException exception) {
55 fxmlLoader.setClassLoader(FXMLLoader.getDefaultClassLoader());
57 }
catch (IOException ex) {
58 Exceptions.printStackTrace(ex);
61 }
catch (MalformedURLException ex) {
62 Exceptions.printStackTrace(ex);
static void construct(Node n, String fxmlFileName)