Search in sources :

Example 26 with FXMLLoader

use of javafx.fxml.FXMLLoader in project TeachingInSimulation by ScOrPiOzzy.

the class PublishListForTeacher method loadFXML.

/**
 * 加载界面布局文件
 */
private void loadFXML() {
    FXMLLoader loader = new FXMLLoader();
    URL fxmlUrl = this.getClass().getResource("/view/library/PublishList.fxml");
    loader.setLocation(fxmlUrl);
    loader.setController(this);
    loader.setRoot(this);
    loader.setResources(ResourceBundle.getBundle("i18n/messages"));
    try {
        loader.load();
        LOG.debug("加载FXML界面{}完成", fxmlUrl);
    } catch (IOException e) {
        e.printStackTrace();
        LOG.error("加载FXML界面{}失败,错误信息:{}", fxmlUrl, e.getMessage());
    }
}
Also used : IOException(java.io.IOException) FXMLLoader(javafx.fxml.FXMLLoader) URL(java.net.URL)

Example 27 with FXMLLoader

use of javafx.fxml.FXMLLoader in project TeachingInSimulation by ScOrPiOzzy.

the class PreparationDetail method loadFXML.

private void loadFXML() {
    FXMLLoader loader = new FXMLLoader();
    URL fxmlUrl = this.getClass().getResource("/view/preparation/Detail.fxml");
    loader.setLocation(fxmlUrl);
    loader.setController(this);
    loader.setRoot(this);
    loader.setResources(ResourceBundle.getBundle("i18n/messages"));
    try {
        loader.load();
        LOG.debug("加载FXML界面{}完成", fxmlUrl);
    } catch (IOException e) {
        e.printStackTrace();
        LOG.error("加载FXML界面{}失败,错误信息:{}", fxmlUrl, e.getMessage());
    }
}
Also used : IOException(java.io.IOException) FXMLLoader(javafx.fxml.FXMLLoader) URL(java.net.URL)

Example 28 with FXMLLoader

use of javafx.fxml.FXMLLoader in project TeachingInSimulation by ScOrPiOzzy.

the class PreparationMenu method loadFXML.

/**
 * 加载界面布局文件
 */
private void loadFXML() {
    FXMLLoader loader = new FXMLLoader();
    URL fxmlUrl = this.getClass().getResource("/view/preparation/LeftMenu.fxml");
    loader.setLocation(fxmlUrl);
    loader.setController(this);
    loader.setRoot(this);
    try {
        loader.load();
        LOG.debug("加载FXML界面{}完成", fxmlUrl);
    } catch (IOException e) {
        e.printStackTrace();
        LOG.error("加载FXML界面{}失败,错误信息:{}", fxmlUrl, e.getMessage());
    }
}
Also used : IOException(java.io.IOException) FXMLLoader(javafx.fxml.FXMLLoader) URL(java.net.URL)

Example 29 with FXMLLoader

use of javafx.fxml.FXMLLoader in project TeachingInSimulation by ScOrPiOzzy.

the class PreviewQuestionPaper method loadFXML.

/**
 * 加载界面布局文件
 */
private void loadFXML() {
    FXMLLoader loader = new FXMLLoader();
    URL fxmlUrl = this.getClass().getResource("/view/question/Paper.fxml");
    loader.setLocation(fxmlUrl);
    loader.setController(this);
    loader.setRoot(this);
    loader.setResources(ResourceBundle.getBundle("i18n/messages"));
    try {
        loader.load();
        LOG.debug("加载FXML界面{}完成", fxmlUrl);
    } catch (IOException e) {
        e.printStackTrace();
        LOG.error("加载FXML界面{}失败,错误信息:{}", fxmlUrl, e.getMessage());
    }
}
Also used : IOException(java.io.IOException) FXMLLoader(javafx.fxml.FXMLLoader) URL(java.net.URL)

Example 30 with FXMLLoader

use of javafx.fxml.FXMLLoader in project jphp by jphp-compiler.

the class TrayNotification method initTrayNotification.

private void initTrayNotification(String title, String message, NotificationType type) {
    try {
        FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("/tray/views/TrayNotification.fxml"));
        fxmlLoader.setController(this);
        fxmlLoader.load();
        initStage();
        initAnimations();
        setTray(title, message, type);
    } catch (IOException e) {
        e.printStackTrace();
    }
}
Also used : IOException(java.io.IOException) FXMLLoader(javafx.fxml.FXMLLoader)

Aggregations

FXMLLoader (javafx.fxml.FXMLLoader)252 IOException (java.io.IOException)148 Scene (javafx.scene.Scene)120 Parent (javafx.scene.Parent)79 Stage (javafx.stage.Stage)64 FXML (javafx.fxml.FXML)46 URL (java.net.URL)43 Pane (javafx.scene.layout.Pane)34 BorderPane (javafx.scene.layout.BorderPane)30 AnchorPane (javafx.scene.layout.AnchorPane)24 ActionEvent (javafx.event.ActionEvent)19 ResourceBundle (java.util.ResourceBundle)16 Initializable (javafx.fxml.Initializable)14 JFXButton (com.jfoenix.controls.JFXButton)13 KeyFrame (javafx.animation.KeyFrame)13 Timeline (javafx.animation.Timeline)13 StackPane (javafx.scene.layout.StackPane)13 Duration (javafx.util.Duration)13 Level (java.util.logging.Level)12 Logger (java.util.logging.Logger)12