This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| gist test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package test; | |
| import javafx.scene.*; | |
| import javafx.scene.control.*; | |
| public class FXUtils { | |
| /** | |
| * Find a {@link Node} within a {@link Parent} by it's ID. | |
| * <p> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * A JavaFX controller factory for constructing controllers via Guice DI. To | |
| * install this in the {@link FXMLLoader}, pass it as a parameter to | |
| * {@link FXMLLoader#setControllerFactory(Callback)}. | |
| * <p> | |
| * Once set, make sure you do <b>not</b> use the static methods on | |
| * {@link FXMLLoader} when creating your JavaFX node. | |
| */ | |
| class GuiceControllerFactory implements Callback<Class<?>, Object> { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import javafx.beans.InvalidationListener; | |
| import javafx.beans.Observable; | |
| import javafx.beans.property.SimpleStringProperty; | |
| import javafx.beans.property.StringProperty; | |
| import javafx.collections.FXCollections; | |
| import javafx.collections.ListChangeListener; | |
| import javafx.collections.ObservableList; | |
| import javafx.util.Callback; | |
| import java.util.ArrayList; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.io.IOException; | |
| import java.util.Arrays; | |
| import javafx.application.Application; | |
| import javafx.application.Platform; | |
| import javafx.beans.Observable; | |
| import javafx.beans.property.SimpleStringProperty; | |
| import javafx.beans.property.StringProperty; | |
| import javafx.collections.FXCollections; | |
| import javafx.collections.ObservableList; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import javafx.fxml.FXML; | |
| import javafx.scene.Parent; | |
| @FXMLLoadingScoped | |
| public class ListBuilderController<T> implements IdentifiableController { | |
| @FXML | |
| private Parent root; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <AnchorPane fx:id="factorsList" minHeight="138.0" prefHeight="138.0" prefWidth="418.0"> | |
| <children> | |
| <fx:include source="listBuilder.fxml" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" /> | |
| </children> | |
| <VBox.margin> | |
| <Insets left="2.0" right="2.0" /> | |
| </VBox.margin> | |
| </AnchorPane> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public interface IdentifiableController { | |
| String getId(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * JavaFX CSS light grey/white 'brume' theme. | |
| */ | |
| .titled-pane { | |
| -fx-effect: dropshadow(three-pass-box, #9F9F9F, 15, 0, 0, 0); | |
| -fx-animated: true; | |
| -fx-text-fill: #505050; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.List; | |
| public class ControllerLookup { | |
| private final List<IdentifiableController> identifiables; | |
| public ControllerLookup(List<IdentifiableController> identifiables) { | |
| this.identifiables = identifiables; | |
| } | |
| @SuppressWarnings("unchecked") |
OlderNewer