/*
 * Copyright (C) 2017 Kleber Kruger
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package br.ufms.banking.view.controller;

import java.io.IOException;
import java.net.URL;
import java.util.ResourceBundle;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.fxml.Initializable;
import javafx.scene.Parent;
import javafx.scene.layout.StackPane;

/**
 * FXML Controller class
 *
 * @author Kleber Kruger
 */
public class MenuBancarioController implements Initializable {

    @FXML
    private StackPane conteudo;
    @FXML
    private StackPane conteudoDireita;

    /**
     * Initializes the controller class.
     *
     * @param url
     * @param rb
     */
    @Override
    public void initialize(URL url, ResourceBundle rb) {

        try {
            FXMLLoader loader = new FXMLLoader();
            Parent formulario = (Parent) loader.load(getClass().getClassLoader().getResourceAsStream(
                    "br/ufms/banking/view/fxml/FormularioConta.fxml"));

            conteudo.getChildren().add(formulario);
            
            FXMLLoader loader2 = new FXMLLoader();
            Parent dadosConta = (Parent) loader2.load(getClass().getClassLoader().getResourceAsStream(
                    "br/ufms/banking/view/fxml/DadosContaSmall.fxml"));

            conteudoDireita.getChildren().add(dadosConta);

        } catch (IOException ex) {
            System.err.println(ex.getMessage());
        }
    }

}
