use of javafx.animation.Timeline in project arquivoProject by fader-azevedo.
the class ListaPastaController method playThis.
private void playThis(JFXButton button) {
Timeline timeline = new Timeline(new KeyFrame(Duration.millis(250), ev -> {
clipRectNextDocument.setHeight(pnCarregaDocumentos.getHeight());
if (clipRectNextDocument.widthProperty().get() != 0) {
Timeline timelineUp = new Timeline();
final KeyValue kvUp1 = new KeyValue(clipRectNextDocument.widthProperty(), 0);
final KeyValue kvUp2 = new KeyValue(clipRectNextDocument.translateXProperty(), pnCarregaDocumentos.getWidth());
final KeyValue kvUp4 = new KeyValue(pnCarregaDocumentos.prefWidthProperty(), 0);
final KeyValue kvUp3 = new KeyValue(pnCarregaDocumentos.translateXProperty(), pnCarregaDocumentos.getWidth());
final KeyFrame kfUp = new KeyFrame(Duration.millis(1000), kvUp1, kvUp2, kvUp3, kvUp4);
timelineUp.getKeyFrames().add(kfUp);
timelineUp.play();
} else {
try {
if (b == true) {
Pasta past = (Pasta) db.getEstOrPratOrPastByCodigo(button.getText(), Pasta.class);
Pratileira prat = (Pratileira) db.buscarPorId(Pratileira.class, past.getPratileira());
codigoPratileiraLb.setText(prat.getCodigo());
Estante es = (Estante) db.buscarPorId(Estante.class, prat.getEstante());
codigoEstanteLb.setText(es.getCodigo());
}
clipRectNextDocument.setHeight(pnCarregaDocumentos.getHeight());
pnCarregaDocumentos.toFront();
FXMLLoader fxmlLoader = new FXMLLoader();
fxmlLoader.load(getClass().getResource("/view/ListaDocumento.fxml").openStream());
ListaDocumentoController lDocController = fxmlLoader.getController();
lDocController.btnBack.setOnAction(xs -> {
this.playThis(button);
});
lDocController.scrollBtnPauta(codigoEstanteLb.getText(), codigoPratileiraLb.getText(), button.getText());
lDocController.removeClass();
lDocController.boxCaminho.setVisible(true);
lDocController.btnBack.setVisible(true);
lDocController.btnCloseDoc.setVisible(false);
clipRectNextDocument.toFront();
AnchorPane root = fxmlLoader.getRoot();
pnCarregaDocumentos.getChildren().clear();
pnCarregaDocumentos.getChildren().add(root);
Timeline timeDireita = new Timeline();
final KeyValue kvDwn1 = new KeyValue(clipRectNextDocument.widthProperty(), pnCarregaDocumentos.getWidth());
final KeyValue kvDwn2 = new KeyValue(clipRectNextDocument.translateXProperty(), 0);
final KeyValue kvDwn4 = new KeyValue(pnCarregaDocumentos.prefWidthProperty(), pnCarregaDocumentos.getWidth());
final KeyValue kvDwn3 = new KeyValue(pnCarregaDocumentos.translateXProperty(), 0);
final KeyFrame kfDwn = new KeyFrame(Duration.millis(600), kvDwn1, kvDwn2, kvDwn3, kvDwn4);
timeDireita.getKeyFrames().add(kfDwn);
timeDireita.play();
} catch (Exception ex) {
Logger.getLogger(ListaDocumentoController.class.getName()).log(Level.SEVERE, null, ex);
}
}
}));
timeline.play();
}
use of javafx.animation.Timeline in project arquivoProject by fader-azevedo.
the class MenuController method getPratileirasPane.
public void getPratileirasPane() throws IOException {
Timeline timeline = new Timeline(new KeyFrame(Duration.millis(150), ev -> {
try {
pnCarregador.toFront();
FXMLLoader fxmlLoader = new FXMLLoader();
fxmlLoader.load(getClass().getResource("/view/ListaPratileira.fxml").openStream());
AnchorPane root = fxmlLoader.getRoot();
ListaPratileiraController listaPrat = fxmlLoader.getController();
listaPrat.scrollBtnPratileira("");
pnCarregador.getChildren().clear();
pnCarregador.getChildren().add(root);
} catch (Exception e) {
}
}));
timeline.play();
}
use of javafx.animation.Timeline 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.Timeline 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.Timeline 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();
}
Aggregations