Search in sources :

Example 36 with KeyFrame

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();
    });
}
Also used : JFXButton(com.jfoenix.controls.JFXButton) Scene(javafx.scene.Scene) KeyFrame(javafx.animation.KeyFrame) Initializable(javafx.fxml.Initializable) URL(java.net.URL) Timeline(javafx.animation.Timeline) IOException(java.io.IOException) Logger(java.util.logging.Logger) Level(java.util.logging.Level) Platform(javafx.application.Platform) FXML(javafx.fxml.FXML) Parent(javafx.scene.Parent) Duration(javafx.util.Duration) ResourceBundle(java.util.ResourceBundle) Stage(javafx.stage.Stage) FXMLLoader(javafx.fxml.FXMLLoader) Tooltip(javafx.scene.control.Tooltip) Timeline(javafx.animation.Timeline) Tooltip(javafx.scene.control.Tooltip) KeyFrame(javafx.animation.KeyFrame)

Example 37 with KeyFrame

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();
}
Also used : JFXButton(com.jfoenix.controls.JFXButton) Scene(javafx.scene.Scene) KeyFrame(javafx.animation.KeyFrame) Initializable(javafx.fxml.Initializable) URL(java.net.URL) Timeline(javafx.animation.Timeline) IOException(java.io.IOException) Logger(java.util.logging.Logger) Level(java.util.logging.Level) Platform(javafx.application.Platform) FXML(javafx.fxml.FXML) Parent(javafx.scene.Parent) Duration(javafx.util.Duration) ResourceBundle(java.util.ResourceBundle) Stage(javafx.stage.Stage) FXMLLoader(javafx.fxml.FXMLLoader) Tooltip(javafx.scene.control.Tooltip) Timeline(javafx.animation.Timeline) Parent(javafx.scene.Parent) KeyFrame(javafx.animation.KeyFrame) Stage(javafx.stage.Stage) IOException(java.io.IOException) Scene(javafx.scene.Scene) FXMLLoader(javafx.fxml.FXMLLoader)

Example 38 with KeyFrame

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();
}
Also used : JFXButton(com.jfoenix.controls.JFXButton) KeyFrame(javafx.animation.KeyFrame) Initializable(javafx.fxml.Initializable) MenuItem(javafx.scene.control.MenuItem) URL(java.net.URL) Timeline(javafx.animation.Timeline) IOException(java.io.IOException) Logger(java.util.logging.Logger) Level(java.util.logging.Level) FXML(javafx.fxml.FXML) Parent(javafx.scene.Parent) ActionEvent(javafx.event.ActionEvent) Duration(javafx.util.Duration) ResourceBundle(java.util.ResourceBundle) AnchorPane(javafx.scene.layout.AnchorPane) FXMLLoader(javafx.fxml.FXMLLoader) MenuButton(javafx.scene.control.MenuButton) ObservableValue(javafx.beans.value.ObservableValue) ChangeListener(javafx.beans.value.ChangeListener) JFXTextField(com.jfoenix.controls.JFXTextField) Pane(javafx.scene.layout.Pane) Timeline(javafx.animation.Timeline) KeyFrame(javafx.animation.KeyFrame) IOException(java.io.IOException) FXMLLoader(javafx.fxml.FXMLLoader) AnchorPane(javafx.scene.layout.AnchorPane) FXML(javafx.fxml.FXML)

Example 39 with KeyFrame

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();
}
Also used : JFXButton(com.jfoenix.controls.JFXButton) KeyFrame(javafx.animation.KeyFrame) Initializable(javafx.fxml.Initializable) MenuItem(javafx.scene.control.MenuItem) URL(java.net.URL) Timeline(javafx.animation.Timeline) IOException(java.io.IOException) Logger(java.util.logging.Logger) Level(java.util.logging.Level) FXML(javafx.fxml.FXML) Parent(javafx.scene.Parent) ActionEvent(javafx.event.ActionEvent) Duration(javafx.util.Duration) ResourceBundle(java.util.ResourceBundle) AnchorPane(javafx.scene.layout.AnchorPane) FXMLLoader(javafx.fxml.FXMLLoader) MenuButton(javafx.scene.control.MenuButton) ObservableValue(javafx.beans.value.ObservableValue) ChangeListener(javafx.beans.value.ChangeListener) JFXTextField(com.jfoenix.controls.JFXTextField) Pane(javafx.scene.layout.Pane) Timeline(javafx.animation.Timeline) KeyFrame(javafx.animation.KeyFrame) FXMLLoader(javafx.fxml.FXMLLoader) AnchorPane(javafx.scene.layout.AnchorPane) IOException(java.io.IOException) FXML(javafx.fxml.FXML)

Example 40 with KeyFrame

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();
}
Also used : JFXButton(com.jfoenix.controls.JFXButton) KeyFrame(javafx.animation.KeyFrame) Initializable(javafx.fxml.Initializable) MenuItem(javafx.scene.control.MenuItem) URL(java.net.URL) Timeline(javafx.animation.Timeline) IOException(java.io.IOException) Logger(java.util.logging.Logger) Level(java.util.logging.Level) FXML(javafx.fxml.FXML) Parent(javafx.scene.Parent) ActionEvent(javafx.event.ActionEvent) Duration(javafx.util.Duration) ResourceBundle(java.util.ResourceBundle) AnchorPane(javafx.scene.layout.AnchorPane) FXMLLoader(javafx.fxml.FXMLLoader) MenuButton(javafx.scene.control.MenuButton) ObservableValue(javafx.beans.value.ObservableValue) ChangeListener(javafx.beans.value.ChangeListener) JFXTextField(com.jfoenix.controls.JFXTextField) Pane(javafx.scene.layout.Pane) Timeline(javafx.animation.Timeline) KeyFrame(javafx.animation.KeyFrame) IOException(java.io.IOException) FXMLLoader(javafx.fxml.FXMLLoader) AnchorPane(javafx.scene.layout.AnchorPane)

Aggregations

KeyFrame (javafx.animation.KeyFrame)232 Timeline (javafx.animation.Timeline)197 KeyValue (javafx.animation.KeyValue)150 ActionEvent (javafx.event.ActionEvent)66 FXML (javafx.fxml.FXML)54 Duration (javafx.util.Duration)48 EventHandler (javafx.event.EventHandler)43 Stage (javafx.stage.Stage)40 Alert (javafx.scene.control.Alert)35 Rotate (javafx.scene.transform.Rotate)26 IOException (java.io.IOException)25 URL (java.net.URL)24 ResourceBundle (java.util.ResourceBundle)24 Initializable (javafx.fxml.Initializable)23 Interpolator (javafx.animation.Interpolator)22 JFXButton (com.jfoenix.controls.JFXButton)21 FXMLLoader (javafx.fxml.FXMLLoader)21 MouseEvent (javafx.scene.input.MouseEvent)18 Pane (javafx.scene.layout.Pane)18 Node (javafx.scene.Node)17