use of javafx.animation.KeyFrame in project arquivoProject by fader-azevedo.
the class LoginController method initialize.
@Override
public void initialize(URL url, ResourceBundle rb) {
Tooltip tp = new Tooltip("Fechar");
btnClose.setTooltip(tp);
btnClose.setOnAction(e -> {
Timeline timeline = new Timeline(new KeyFrame(Duration.millis(500), ev -> {
System.exit(0);
}));
timeline.play();
});
btnLogin.setOnAction(r -> {
logIn();
});
}
use of javafx.animation.KeyFrame in project arquivoProject by fader-azevedo.
the class LoginController method logIn.
public void logIn() {
Timeline timeline = new Timeline(new KeyFrame(Duration.millis(250), ev -> {
try {
FXMLLoader loader = new FXMLLoader();
loader.setLocation(getClass().getResource("/view/PaginaInicial.fxml"));
loader.load();
Parent parent = loader.getRoot();
Scene adminPanelScene = new Scene(parent);
Stage adminPanelStage = new Stage();
adminPanelStage.setScene(adminPanelScene);
adminPanelStage.setResizable(false);
adminPanelStage.setHeight(700);
PaginaInicialController pag = loader.getController();
pag.refresh();
adminPanelStage.setOnCloseRequest(e -> {
Platform.exit();
System.exit(0);
});
adminPanelStage.show();
Stage stage = (Stage) btnLogin.getScene().getWindow();
stage.close();
} catch (IOException ex) {
Logger.getLogger(LoginController.class.getName()).log(Level.SEVERE, null, ex);
}
}));
timeline.play();
}
use of javafx.animation.KeyFrame in project arquivoProject by fader-azevedo.
the class PaginaInicialController method listaTodasEstantes.
@FXML
private void listaTodasEstantes() {
Timeline timeline = new Timeline(new KeyFrame(Duration.millis(220), ev -> {
try {
btnInicio.getStyleClass().clear();
btnEstante.getStyleClass().add("butCriar");
btnPratileira.getStyleClass().clear();
btnPasta.getStyleClass().clear();
btnPauta.getStyleClass().clear();
btnRegistar.getStyleClass().clear();
btnRegistar.getStyleClass().add("begin");
pnInicio.toFront();
pnPesquisa.getChildren().clear();
FXMLLoader fxmlLoader = new FXMLLoader();
fxmlLoader.load(getClass().getResource("/view/ListaEstante.fxml").openStream());
AnchorPane root = fxmlLoader.getRoot();
pnInicio.getChildren().clear();
pnInicio.getChildren().add(root);
} catch (IOException ex) {
Logger.getLogger(PaginaInicialController.class.getName()).log(Level.SEVERE, null, ex);
}
}));
timeline.play();
}
use of javafx.animation.KeyFrame in project arquivoProject by fader-azevedo.
the class PaginaInicialController method listaTodasPratileiras.
@FXML
private void listaTodasPratileiras() throws IOException {
Timeline timeline = new Timeline(new KeyFrame(Duration.millis(150), ev -> {
try {
btnInicio.getStyleClass().clear();
btnEstante.getStyleClass().clear();
btnPratileira.getStyleClass().add("butCriar");
btnPasta.getStyleClass().clear();
btnPauta.getStyleClass().clear();
btnRegistar.getStyleClass().clear();
btnRegistar.getStyleClass().add("begin");
pnInicio.toFront();
pnPesquisa.getChildren().clear();
FXMLLoader fxmlLoader = new FXMLLoader();
fxmlLoader.load(getClass().getResource("/view/ListaPratileira.fxml").openStream());
AnchorPane root = fxmlLoader.getRoot();
ListaPratileiraController listaPrat = fxmlLoader.getController();
listaPrat.scrollBtnPratileira("");
pnInicio.getChildren().clear();
pnInicio.getChildren().add(root);
} catch (Exception e) {
}
}));
timeline.play();
}
use of javafx.animation.KeyFrame in project arquivoProject by fader-azevedo.
the class PaginaInicialController method refresh.
public void refresh() throws IOException {
Timeline timeline = new Timeline(new KeyFrame(Duration.millis(220), ev -> {
try {
btnInicio.getStyleClass().add("butCriar");
btnEstante.getStyleClass().clear();
btnPratileira.getStyleClass().clear();
btnPasta.getStyleClass().clear();
btnPauta.getStyleClass().clear();
btnRegistar.getStyleClass().clear();
btnRegistar.getStyleClass().add("begin");
pnInicio.toFront();
FXMLLoader fxmlLoader = new FXMLLoader();
fxmlLoader.load(getClass().getResource("/view/Menu.fxml").openStream());
AnchorPane root = fxmlLoader.getRoot();
pnInicio.getChildren().clear();
pnInicio.getChildren().add(root);
} catch (IOException ex) {
Logger.getLogger(PaginaInicialController.class.getName()).log(Level.SEVERE, null, ex);
}
}));
timeline.play();
}
Aggregations