javafx.fxml.LoadException Java Examples
The following examples show how to use
javafx.fxml.LoadException.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: OCRSettingItem.java From MSPaintIDE with MIT License | 6 votes |
@Override public Pane getPane() throws IOException { FXMLLoader loader = new FXMLLoader(getClass().getClassLoader().getResource(this.file)); loader.setController(this); Parent root = loader.load(); Node node = root.lookup("*"); if (!(node instanceof Pane)) throw new LoadException("Root element of " + this.file + " not a pane!"); this.themeChanger = this.mainGUI.getThemeManager().onDarkThemeChange((Pane) node, Map.of( "#fontSelect", "dark", ".remove-entry", "remove-entry-white" )); this.themeChanger.update(100, TimeUnit.MILLISECONDS); return (Pane) node; }
Example #2
Source File: AppearanceSettingItem.java From MSPaintIDE with MIT License | 6 votes |
@Override public Pane getPane() throws IOException { FXMLLoader loader = new FXMLLoader(getClass().getClassLoader().getResource(this.file)); loader.setController(this); Parent root = loader.load(); Node node = root.lookup("*"); if (!(node instanceof Pane)) throw new LoadException("Root element of " + this.file + " not a pane!"); this.themeChanger = this.mainGUI.getThemeManager().onDarkThemeChange((Pane) node, Map.of( "#fontSelect", "dark", ".remove-entry", "remove-entry-white" )); this.themeChanger.update(100, TimeUnit.MILLISECONDS); return (Pane) node; }
Example #3
Source File: DefaultSettingItem.java From MSPaintIDE with MIT License | 5 votes |
@Override public Pane getPane() throws IOException { FXMLLoader loader = new FXMLLoader(getClass().getClassLoader().getResource(this.file)); Parent root = loader.load(); Node node = root.lookup("*"); if (!(node instanceof Pane)) throw new LoadException("Root element of " + this.file + " not a pane!"); return (Pane) node; }
Example #4
Source File: LSPSettingItem.java From MSPaintIDE with MIT License | 5 votes |
@Override public Pane getPane() throws IOException { FXMLLoader loader = new FXMLLoader(getClass().getClassLoader().getResource(this.file)); loader.setController(this); Parent root = loader.load(); Node node = root.lookup("*"); if (!(node instanceof Pane)) throw new LoadException("Root element of " + this.file + " not a pane!"); return (Pane) node; }
Example #5
Source File: FxmlViewLoaderTests.java From bisq with GNU Affero General Public License v3.0 | 5 votes |
@Test public void malformedFxmlFileShouldThrow() { thrown.expect(ViewfxException.class); thrown.expectMessage("Failed to load view from FXML file"); thrown.expectCause(instanceOf(LoadException.class)); viewLoader.load(Malformed.class); }