use of javafx.fxml.FXMLLoader in project TeachingInSimulation by ScOrPiOzzy.
the class DialogPane method loadFXML.
private void loadFXML() {
FXMLLoader loader = new FXMLLoader();
URL fxmlUrl = this.getClass().getResource("/view/Dialog.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());
}
}
use of javafx.fxml.FXMLLoader in project TeachingInSimulation by ScOrPiOzzy.
the class ClassList method loadFXML.
/**
* 加载界面布局文件
*/
private void loadFXML() {
FXMLLoader loader = new FXMLLoader();
URL fxmlUrl = this.getClass().getResource("/view/information/List.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());
}
}
use of javafx.fxml.FXMLLoader in project TeachingInSimulation by ScOrPiOzzy.
the class TeacherList method loadFXML.
/**
* 加载界面布局文件
*/
private void loadFXML() {
FXMLLoader loader = new FXMLLoader();
URL fxmlUrl = this.getClass().getResource("/view/information/List.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());
}
}
use of javafx.fxml.FXMLLoader in project TeachingInSimulation by ScOrPiOzzy.
the class TypicalCaseBtnController method showDrawingWin.
@FXML
private void showDrawingWin(ActionEvent event) {
((Button) event.getSource()).setDisable(true);
try {
if (drawingWin == null) {
drawingWin = new Stage();
drawingWin.initStyle(StageStyle.TRANSPARENT);
drawingWin.setX(GUIState.getStage().getX() + 100);
drawingWin.setY(GUIState.getStage().getY() + 100);
FXMLLoader loader = new FXMLLoader();
loader.setResources(ResourceBundle.getBundle("i18n/messages"));
Region root = loader.load(TypicalCaseBtnController.class.getResourceAsStream("/view/jme/Drawing.fxml"));
DrawingController controller = loader.getController();
controller.setStage(drawingWin);
controller.setUI(typicalCase3D);
Scene scene = new Scene(root);
drawingWin.setScene(scene);
drawingWin.setOnHidden(e -> {
((Button) event.getSource()).setDisable(false);
});
}
drawingWin.show();
} catch (IOException e) {
e.printStackTrace();
}
}
use of javafx.fxml.FXMLLoader in project TeachingInSimulation by ScOrPiOzzy.
the class PublishListForStudent 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());
}
}
Aggregations