|
- package id.amigogroup.posterminal;
-
- import id.amigogroup.posterminal.bayar.FormBayarController;
- import java.io.IOException;
- import java.util.logging.Level;
- import java.util.logging.Logger;
- import javafx.fxml.FXMLLoader;
- import javafx.scene.Node;
-
- public class FormFactory {
-
- public Node getForm(String form, FormUtamaController parent) {
- Node node = null;
- FXMLLoader loader = new FXMLLoader();
- try {
- switch (form) {
- //daftarkan halaman yang implement mainContenInterface disini
- // case FormConstanta.TRANSAKSI_TUNAI:
- // loader.setLocation(getClass().getResource("/fxml/FormTransaksi.fxml"));
- // node = loader.load();
- // FormTransaksiTunaiController fetc = loader.getController();
- //// fetc.initData(parent);
- // break;
- case FormConstanta.BAYAR:
- loader.setLocation(getClass().getResource("/fxml/FormBayar.fxml"));
- node = loader.load();
- FormBayarController fbc = loader.getController();
- // fetc.initData(parent);
- break;
- }
- } catch (IOException ex) {
- Logger.getLogger(FormFactory.class.getName()).log(Level.SEVERE, null, ex);
- }
- return node;
- }
- }
|