* Shortcut F5: Cari Barang & F6: Cari Pelanggan, serta CTRL+L: Logout * Form: Login * Dialog Cari Barang & Dialog Cari Pelangganpull/1/head
| @@ -23,7 +23,7 @@ public class App extends Application { | |||||
| // var label = new Label("Hello, JavaFX " + javafxVersion + ", running on Java " + javaVersion + "."); | // var label = new Label("Hello, JavaFX " + javafxVersion + ", running on Java " + javaVersion + "."); | ||||
| Locale.setDefault(Locale.forLanguageTag("in-ID")); | Locale.setDefault(Locale.forLanguageTag("in-ID")); | ||||
| Parent root = FXMLLoader.load(getClass().getResource("/fxml/FormUtama.fxml")); | |||||
| Parent root = FXMLLoader.load(getClass().getResource("/fxml/FormLogin.fxml")); | |||||
| Scene scene = new Scene(root); | Scene scene = new Scene(root); | ||||
| @@ -1,20 +1,30 @@ | |||||
| package id.amigogroup.posterminal; | package id.amigogroup.posterminal; | ||||
| import id.amigogroup.posterminal.pencarian.DialogCariBarangController; | |||||
| import id.amigogroup.posterminal.pencarian.DialogCariPelangganController; | |||||
| import id.amigogroup.posterminal.util.Fucout; | |||||
| import java.io.IOException; | |||||
| import java.net.URL; | import java.net.URL; | ||||
| import java.util.HashMap; | import java.util.HashMap; | ||||
| import java.util.Map; | import java.util.Map; | ||||
| import java.util.Optional; | |||||
| import java.util.ResourceBundle; | import java.util.ResourceBundle; | ||||
| import java.util.logging.Level; | import java.util.logging.Level; | ||||
| import java.util.logging.Logger; | import java.util.logging.Logger; | ||||
| import javafx.application.Platform; | import javafx.application.Platform; | ||||
| import javafx.fxml.FXML; | import javafx.fxml.FXML; | ||||
| import javafx.fxml.FXMLLoader; | |||||
| import javafx.fxml.Initializable; | import javafx.fxml.Initializable; | ||||
| import javafx.scene.Node; | import javafx.scene.Node; | ||||
| import javafx.scene.Parent; | |||||
| import javafx.scene.Scene; | |||||
| import javafx.scene.control.ScrollPane; | import javafx.scene.control.ScrollPane; | ||||
| import javafx.scene.image.Image; | |||||
| import javafx.scene.input.KeyCode; | import javafx.scene.input.KeyCode; | ||||
| import javafx.scene.input.KeyCodeCombination; | import javafx.scene.input.KeyCodeCombination; | ||||
| import javafx.scene.input.KeyCombination; | import javafx.scene.input.KeyCombination; | ||||
| import javafx.scene.layout.BorderPane; | import javafx.scene.layout.BorderPane; | ||||
| import javafx.stage.Stage; | |||||
| public class FormUtamaController implements Initializable { | public class FormUtamaController implements Initializable { | ||||
| @@ -38,15 +48,47 @@ public class FormUtamaController implements Initializable { | |||||
| private void initShorcuts() { | private void initShorcuts() { | ||||
| Map<KeyCombination,Runnable> listShortcuts = new HashMap<>(); | Map<KeyCombination,Runnable> listShortcuts = new HashMap<>(); | ||||
| KeyCombination kcCariBarang = new KeyCodeCombination(KeyCode.F5); | |||||
| Runnable rnCariBarang = () -> { | |||||
| DialogCariBarangController dialogCariBarang = new DialogCariBarangController(); | |||||
| dialogCariBarang.initOwner((Stage) bpMain.getScene().getWindow()); | |||||
| Optional<String> result = dialogCariBarang.showAndWait(); | |||||
| System.out.println(result); | |||||
| }; | |||||
| listShortcuts.put(kcCariBarang, rnCariBarang); | |||||
| KeyCombination kcCariPelanggan = new KeyCodeCombination(KeyCode.F6); | |||||
| Runnable rnCariPelanggan = () -> { | |||||
| DialogCariPelangganController dialogCariPelanggan = new DialogCariPelangganController(); | |||||
| dialogCariPelanggan.initOwner((Stage) bpMain.getScene().getWindow()); | |||||
| Optional<String> result = dialogCariPelanggan.showAndWait(); | |||||
| System.out.println(result); | |||||
| }; | |||||
| listShortcuts.put(kcCariPelanggan, rnCariPelanggan); | |||||
| KeyCombination kcCheckout = new KeyCodeCombination(KeyCode.F8); | KeyCombination kcCheckout = new KeyCodeCombination(KeyCode.F8); | ||||
| Runnable rnCheckout = () -> setContent(formFactory.getForm(FormConstanta.BAYAR, this)); | Runnable rnCheckout = () -> setContent(formFactory.getForm(FormConstanta.BAYAR, this)); | ||||
| listShortcuts.put(kcCheckout, rnCheckout); | listShortcuts.put(kcCheckout, rnCheckout); | ||||
| KeyCombination kcLogout = new KeyCodeCombination(KeyCode.L,KeyCombination.CONTROL_DOWN); | |||||
| Runnable rnLogout = () -> { | |||||
| try { | |||||
| generateNewWindow("/fxml/FormLogin.fxml").show(); | |||||
| Stage thisStage = (Stage) bpMain.getScene().getWindow(); | |||||
| thisStage.close(); | |||||
| } catch (IOException ex) { | |||||
| Logger.getLogger(FormUtamaController.class.getName()).log(Level.SEVERE, null, ex); | |||||
| } | |||||
| }; | |||||
| listShortcuts.put(kcLogout, rnLogout); | |||||
| Platform.runLater(() -> { | Platform.runLater(() -> { | ||||
| bpMain.getScene().getAccelerators().putAll(listShortcuts); | bpMain.getScene().getAccelerators().putAll(listShortcuts); | ||||
| }); | }); | ||||
| } | } | ||||
| public void setContent(Node node) { | public void setContent(Node node) { | ||||
| try { | try { | ||||
| spMainContent.setContent(node); | spMainContent.setContent(node); | ||||
| @@ -56,4 +98,16 @@ public class FormUtamaController implements Initializable { | |||||
| // AlertGenerate.getAlert(AlertGenerate.FXML_FAIL).show(); | // AlertGenerate.getAlert(AlertGenerate.FXML_FAIL).show(); | ||||
| } | } | ||||
| } | } | ||||
| public Stage generateNewWindow(String url) throws IOException { | |||||
| Stage stage = new Stage(); | |||||
| Parent root; | |||||
| root = FXMLLoader.load(getClass().getResource(url)); | |||||
| Scene scene = new Scene(root); | |||||
| stage.setTitle(Fucout.APP_TITLE); | |||||
| stage.getIcons().add(new Image(Fucout.APP_ICON)); | |||||
| stage.setScene(scene); | |||||
| return stage; | |||||
| } | |||||
| } | } | ||||
| @@ -8,8 +8,6 @@ package id.amigogroup.posterminal.bayar; | |||||
| import id.amigogroup.posterminal.util.Fucout; | import id.amigogroup.posterminal.util.Fucout; | ||||
| import java.net.URL; | import java.net.URL; | ||||
| import java.util.ResourceBundle; | import java.util.ResourceBundle; | ||||
| import javafx.beans.value.ChangeListener; | |||||
| import javafx.beans.value.ObservableValue; | |||||
| import javafx.fxml.FXML; | import javafx.fxml.FXML; | ||||
| import javafx.fxml.Initializable; | import javafx.fxml.Initializable; | ||||
| import javafx.scene.control.TextField; | import javafx.scene.control.TextField; | ||||
| @@ -0,0 +1,66 @@ | |||||
| /* | |||||
| * To change this license header, choose License Headers in Project Properties. | |||||
| * To change this template file, choose Tools | Templates | |||||
| * and open the template in the editor. | |||||
| */ | |||||
| package id.amigogroup.posterminal.keamanan; | |||||
| import id.amigogroup.posterminal.util.Fucout; | |||||
| import java.io.IOException; | |||||
| import java.net.URL; | |||||
| import java.util.ResourceBundle; | |||||
| import java.util.logging.Level; | |||||
| import java.util.logging.Logger; | |||||
| import javafx.event.ActionEvent; | |||||
| import javafx.fxml.FXML; | |||||
| import javafx.fxml.FXMLLoader; | |||||
| import javafx.fxml.Initializable; | |||||
| import javafx.scene.Parent; | |||||
| import javafx.scene.Scene; | |||||
| import javafx.scene.image.Image; | |||||
| import javafx.scene.layout.AnchorPane; | |||||
| import javafx.stage.Stage; | |||||
| /** | |||||
| * FXML Controller class | |||||
| * | |||||
| * @author ronal | |||||
| */ | |||||
| public class FormLoginController implements Initializable { | |||||
| @FXML | |||||
| private AnchorPane apMain; | |||||
| /** | |||||
| * Initializes the controller class. | |||||
| */ | |||||
| @Override | |||||
| public void initialize(URL url, ResourceBundle rb) { | |||||
| } | |||||
| public Stage generateNewWindow(String url) throws IOException { | |||||
| Stage stage = new Stage(); | |||||
| Parent root; | |||||
| root = FXMLLoader.load(getClass().getResource(url)); | |||||
| Scene scene = new Scene(root); | |||||
| stage.setTitle(Fucout.APP_TITLE); | |||||
| stage.getIcons().add(new Image(Fucout.APP_ICON)); | |||||
| stage.setScene(scene); | |||||
| return stage; | |||||
| } | |||||
| @FXML | |||||
| public void btnLoginOnAction(ActionEvent event) { | |||||
| try { | |||||
| generateNewWindow("/fxml/FormUtama.fxml").show(); | |||||
| Stage thisStage = (Stage) apMain.getScene().getWindow(); | |||||
| //close current stage | |||||
| thisStage.hide(); | |||||
| } catch (IOException ex) { | |||||
| Logger.getLogger(FormLoginController.class.getName()).log(Level.SEVERE, null, ex); | |||||
| } | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,100 @@ | |||||
| /* | |||||
| * To change this license header, choose License Headers in Project Properties. | |||||
| * To change this template file, choose Tools | Templates | |||||
| * and open the template in the editor. | |||||
| */ | |||||
| package id.amigogroup.posterminal.pencarian; | |||||
| import id.amigogroup.posterminal.FormUtamaController; | |||||
| import java.io.IOException; | |||||
| import java.net.URL; | |||||
| import java.util.ArrayList; | |||||
| import java.util.List; | |||||
| import java.util.ResourceBundle; | |||||
| import java.util.logging.Level; | |||||
| import java.util.logging.Logger; | |||||
| import javafx.collections.FXCollections; | |||||
| import javafx.collections.ObservableList; | |||||
| import javafx.fxml.FXML; | |||||
| import javafx.fxml.FXMLLoader; | |||||
| import javafx.fxml.Initializable; | |||||
| import javafx.scene.Parent; | |||||
| import javafx.scene.control.Button; | |||||
| import javafx.scene.control.ButtonType; | |||||
| import javafx.scene.control.Dialog; | |||||
| import javafx.scene.control.TableColumn; | |||||
| import javafx.scene.control.TableView; | |||||
| import javafx.scene.control.cell.PropertyValueFactory; | |||||
| import javafx.scene.layout.AnchorPane; | |||||
| import javafx.stage.Window; | |||||
| /** | |||||
| * FXML Controller class | |||||
| * | |||||
| * @author ronal | |||||
| */ | |||||
| public class DialogCariBarangController extends Dialog<String> implements Initializable { | |||||
| @FXML | |||||
| AnchorPane apContent; | |||||
| @FXML | |||||
| private TableView<TabelBarang> tbvBarang; | |||||
| @FXML | |||||
| private TableColumn<TabelBarang, String> tcKode; | |||||
| @FXML | |||||
| private TableColumn<TabelBarang, String> tcNama; | |||||
| @FXML | |||||
| private TableColumn<TabelBarang, String> tcNo; | |||||
| @FXML | |||||
| private TableColumn<TabelBarang, String> tcHarga; | |||||
| @FXML | |||||
| private TableColumn<TabelBarang, Button> tcBtnTambah; | |||||
| final ObservableList<TabelBarang> daftarTabelBarang = FXCollections.observableArrayList(); | |||||
| // String str = "Halo"; | |||||
| /** | |||||
| * Initializes the controller class. | |||||
| */ | |||||
| @Override | |||||
| public void initialize(URL url, ResourceBundle rb) { | |||||
| tcKode.setCellValueFactory(new PropertyValueFactory<>("kode")); | |||||
| tcNama.setCellValueFactory(new PropertyValueFactory<>("nama")); | |||||
| tcNo.setCellValueFactory(new PropertyValueFactory<>("nomor")); | |||||
| tcBtnTambah.setCellValueFactory(new PropertyValueFactory<>("btnTambah")); | |||||
| tbvBarang.setItems(daftarTabelBarang); | |||||
| fillTable(new ArrayList<>()); | |||||
| } | |||||
| public DialogCariBarangController(/*FormPresensiController parent*/) { | |||||
| try { | |||||
| FXMLLoader loader = new FXMLLoader(getClass().getResource("/fxml/DialogCariBarang.fxml")); | |||||
| loader.setController(this); | |||||
| // DialogCariBarangController controller = loader.<DialogCariBarangController>getController(); | |||||
| Parent root = loader.load(); | |||||
| getDialogPane().setContent(root); | |||||
| setTitle("Cari Barang"); | |||||
| // getDialogPane().getButtonTypes().add(ButtonType.CANCEL); | |||||
| // setResultConverter(buttonType -> { | |||||
| // return str; | |||||
| // }); | |||||
| Window window = getDialogPane().getScene().getWindow(); | |||||
| window.setOnCloseRequest(event -> this.close()); | |||||
| } catch (IOException e) { | |||||
| Logger.getLogger(DialogCariBarangController.class | |||||
| .getName()).log(Level.SEVERE, null, e); | |||||
| } | |||||
| } | |||||
| public void fillTable(List<TabelBarang> daftarBarang) { | |||||
| Button btnTambah = new Button("Tambah"); | |||||
| btnTambah.setOnAction((event) -> { | |||||
| setResult("Barang x"); | |||||
| this.close(); | |||||
| }); | |||||
| daftarTabelBarang.add(new TabelBarang("AACOBA001ABCDXL", "Barang x","79.900", "XL", btnTambah)); | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,94 @@ | |||||
| /* | |||||
| * To change this license header, choose License Headers in Project Properties. | |||||
| * To change this template file, choose Tools | Templates | |||||
| * and open the template in the editor. | |||||
| */ | |||||
| package id.amigogroup.posterminal.pencarian; | |||||
| import java.io.IOException; | |||||
| import java.net.URL; | |||||
| import java.util.ArrayList; | |||||
| import java.util.List; | |||||
| import java.util.ResourceBundle; | |||||
| import java.util.logging.Level; | |||||
| import java.util.logging.Logger; | |||||
| import javafx.collections.FXCollections; | |||||
| import javafx.collections.ObservableList; | |||||
| import javafx.fxml.FXML; | |||||
| import javafx.fxml.FXMLLoader; | |||||
| import javafx.fxml.Initializable; | |||||
| import javafx.scene.Parent; | |||||
| import javafx.scene.control.Dialog; | |||||
| import javafx.scene.control.TableColumn; | |||||
| import javafx.scene.control.TableView; | |||||
| import javafx.scene.control.cell.PropertyValueFactory; | |||||
| import javafx.scene.layout.AnchorPane; | |||||
| import javafx.stage.Window; | |||||
| /** | |||||
| * FXML Controller class | |||||
| * | |||||
| * @author ronal | |||||
| */ | |||||
| public class DialogCariPelangganController extends Dialog<String> implements Initializable { | |||||
| @FXML | |||||
| AnchorPane apContent; | |||||
| @FXML | |||||
| private TableView<TabelPelanggan> tbvPelanggan; | |||||
| @FXML | |||||
| private TableColumn<TabelPelanggan, String> tcKode; | |||||
| @FXML | |||||
| private TableColumn<TabelPelanggan, String> tcNama; | |||||
| @FXML | |||||
| private TableColumn<TabelPelanggan, String> tcAlamat; | |||||
| @FXML | |||||
| private TableColumn<TabelPelanggan, String> tcUpline; | |||||
| final ObservableList<TabelPelanggan> daftarTabelPelanggan = FXCollections.observableArrayList(); | |||||
| /** | |||||
| * Initializes the controller class. | |||||
| */ | |||||
| @Override | |||||
| public void initialize(URL url, ResourceBundle rb) { | |||||
| tcKode.setCellValueFactory(new PropertyValueFactory<>("kode")); | |||||
| tcNama.setCellValueFactory(new PropertyValueFactory<>("nama")); | |||||
| tcAlamat.setCellValueFactory(new PropertyValueFactory<>("nomor")); | |||||
| tcUpline.setCellValueFactory(new PropertyValueFactory<>("upline")); | |||||
| tbvPelanggan.setItems(daftarTabelPelanggan); | |||||
| fillTable(new ArrayList<>()); | |||||
| } | |||||
| public DialogCariPelangganController(/*FormPresensiController parent*/) { | |||||
| try { | |||||
| FXMLLoader loader = new FXMLLoader(getClass().getResource("/fxml/DialogCariPelanggan.fxml")); | |||||
| loader.setController(this); | |||||
| // DialogCariBarangController controller = loader.<DialogCariBarangController>getController(); | |||||
| Parent root = loader.load(); | |||||
| getDialogPane().setContent(root); | |||||
| setTitle("Cari Barang"); | |||||
| // getDialogPane().getButtonTypes().add(ButtonType.CANCEL); | |||||
| // setResultConverter(buttonType -> { | |||||
| // return str; | |||||
| // }); | |||||
| Window window = getDialogPane().getScene().getWindow(); | |||||
| window.setOnCloseRequest(event -> this.close()); | |||||
| } catch (IOException e) { | |||||
| Logger.getLogger(DialogCariBarangController.class | |||||
| .getName()).log(Level.SEVERE, null, e); | |||||
| } | |||||
| } | |||||
| public void fillTable(List<TabelPelanggan> daftarBarang) { | |||||
| // Button btnTambah = new Button("Tambah"); | |||||
| // btnTambah.setOnAction((event) -> { | |||||
| // setResult("Pak Coba"); | |||||
| // this.close(); | |||||
| // }); | |||||
| daftarTabelPelanggan.add(new TabelPelanggan("0103201401", "Pak Coba","Jl. Wates Percobaan", "-")); | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,100 @@ | |||||
| /* | |||||
| * To change this license header, choose License Headers in Project Properties. | |||||
| * To change this template file, choose Tools | Templates | |||||
| * and open the template in the editor. | |||||
| */ | |||||
| package id.amigogroup.posterminal.pencarian; | |||||
| import javafx.beans.property.SimpleObjectProperty; | |||||
| import javafx.beans.property.SimpleStringProperty; | |||||
| import javafx.scene.control.Button; | |||||
| /** | |||||
| * | |||||
| * @author ronal | |||||
| */ | |||||
| public class TabelBarang { | |||||
| private final SimpleStringProperty kode; | |||||
| private final SimpleStringProperty nama; | |||||
| private final SimpleStringProperty nomor; | |||||
| private final SimpleStringProperty harga; | |||||
| private final SimpleObjectProperty<Button> btnTambah; | |||||
| public TabelBarang(String kode, String nama, String nomor,String harga,Button btnTambah) { | |||||
| this.kode = new SimpleStringProperty(kode); | |||||
| this.nama = new SimpleStringProperty(nama); | |||||
| this.nomor = new SimpleStringProperty(nomor); | |||||
| this.harga = new SimpleStringProperty(harga); | |||||
| this.btnTambah = new SimpleObjectProperty<>(btnTambah); | |||||
| } | |||||
| /** | |||||
| * @return the kode | |||||
| */ | |||||
| public String getKode() { | |||||
| return kode.get(); | |||||
| } | |||||
| /** | |||||
| * @param kode the kode to set | |||||
| */ | |||||
| public void setKode(String kode) { | |||||
| this.kode.set(kode); | |||||
| } | |||||
| /** | |||||
| * @return the nama | |||||
| */ | |||||
| public String getNama() { | |||||
| return nama.get(); | |||||
| } | |||||
| /** | |||||
| * @param nama the nama to set | |||||
| */ | |||||
| public void setNama(String nama) { | |||||
| this.nama.set(nama); | |||||
| } | |||||
| /** | |||||
| * @return the nomor | |||||
| */ | |||||
| public String getNomor() { | |||||
| return nomor.get(); | |||||
| } | |||||
| /** | |||||
| * @param nomor the nomor to set | |||||
| */ | |||||
| public void setNomor(String nomor) { | |||||
| this.nomor.set(nomor); | |||||
| } | |||||
| /** | |||||
| * @return the nomor | |||||
| */ | |||||
| public String getHarga() { | |||||
| return harga.get(); | |||||
| } | |||||
| /** | |||||
| * @param harga the nomor to set | |||||
| */ | |||||
| public void setHarga(String harga) { | |||||
| this.harga.set(harga); | |||||
| } | |||||
| /** | |||||
| * @return the btnTambah | |||||
| */ | |||||
| public Button getBtnTambah() { | |||||
| return btnTambah.get(); | |||||
| } | |||||
| /** | |||||
| * @param btnTambah the btnTambah to set | |||||
| */ | |||||
| public void setBtnTambah(Button btnTambah) { | |||||
| this.btnTambah.set(btnTambah); | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,84 @@ | |||||
| /* | |||||
| * To change this license header, choose License Headers in Project Properties. | |||||
| * To change this template file, choose Tools | Templates | |||||
| * and open the template in the editor. | |||||
| */ | |||||
| package id.amigogroup.posterminal.pencarian; | |||||
| import javafx.beans.property.SimpleObjectProperty; | |||||
| import javafx.beans.property.SimpleStringProperty; | |||||
| import javafx.scene.control.Button; | |||||
| /** | |||||
| * | |||||
| * @author ronal | |||||
| */ | |||||
| public class TabelPelanggan { | |||||
| private final SimpleStringProperty kode; | |||||
| private final SimpleStringProperty nama; | |||||
| private final SimpleStringProperty alamat; | |||||
| private final SimpleStringProperty upline; | |||||
| public TabelPelanggan(String kode, String nama, String alamat,String upline) { | |||||
| this.kode = new SimpleStringProperty(kode); | |||||
| this.nama = new SimpleStringProperty(nama); | |||||
| this.alamat = new SimpleStringProperty(alamat); | |||||
| this.upline = new SimpleStringProperty(upline); | |||||
| } | |||||
| /** | |||||
| * @return the kode | |||||
| */ | |||||
| public String getKode() { | |||||
| return kode.get(); | |||||
| } | |||||
| /** | |||||
| * @param kode the kode to set | |||||
| */ | |||||
| public void setKode(String kode) { | |||||
| this.kode.set(kode); | |||||
| } | |||||
| /** | |||||
| * @return the nama | |||||
| */ | |||||
| public String getNama() { | |||||
| return nama.get(); | |||||
| } | |||||
| /** | |||||
| * @param nama the nama to set | |||||
| */ | |||||
| public void setNama(String nama) { | |||||
| this.nama.set(nama); | |||||
| } | |||||
| /** | |||||
| * @return the no | |||||
| */ | |||||
| public String getNomor() { | |||||
| return alamat.get(); | |||||
| } | |||||
| /** | |||||
| * @param no the no to set | |||||
| */ | |||||
| public void setNomor(String nomor) { | |||||
| this.alamat.set(nomor); | |||||
| } | |||||
| /** | |||||
| * @return the btnTambah | |||||
| */ | |||||
| public String getUpline() { | |||||
| return upline.get(); | |||||
| } | |||||
| /** | |||||
| * @param upline the upline to set | |||||
| */ | |||||
| public void setUpline(String upline) { | |||||
| this.upline.set(upline); | |||||
| } | |||||
| } | |||||
| @@ -16,7 +16,7 @@ import javafx.scene.control.TextField; | |||||
| public class Fucout { | public class Fucout { | ||||
| //STRINGS | //STRINGS | ||||
| public static final String APP_TITLE = "Pos Terminal"; | |||||
| public static final String APP_TITLE = "Pos Terminal Amigo"; | |||||
| //IMAGES URL | //IMAGES URL | ||||
| public static final String APP_ICON = "/assets/logo-mini-squared.png"; | public static final String APP_ICON = "/assets/logo-mini-squared.png"; | ||||
| @@ -0,0 +1,32 @@ | |||||
| <?xml version="1.0" encoding="UTF-8"?> | |||||
| <?import javafx.scene.control.Label?> | |||||
| <?import javafx.scene.control.TableColumn?> | |||||
| <?import javafx.scene.control.TableView?> | |||||
| <?import javafx.scene.control.TextField?> | |||||
| <?import javafx.scene.layout.AnchorPane?> | |||||
| <?import javafx.scene.text.Font?> | |||||
| <AnchorPane id="AnchorPane" fx:id="apContent" minHeight="-Infinity" minWidth="-Infinity" prefHeight="450.0" prefWidth="500.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1"> | |||||
| <children> | |||||
| <Label layoutX="24.0" layoutY="24.0" text="Cari Barang" AnchorPane.leftAnchor="4.0" AnchorPane.topAnchor="4.0"> | |||||
| <font> | |||||
| <Font size="16.0" /> | |||||
| </font> | |||||
| </Label> | |||||
| <TextField layoutX="14.0" layoutY="56.0" promptText="Nama Barang" AnchorPane.leftAnchor="4.0" AnchorPane.rightAnchor="4.0" AnchorPane.topAnchor="46.0" /> | |||||
| <Label layoutX="14.0" layoutY="39.0" text="Nama Barang" AnchorPane.leftAnchor="4.0" AnchorPane.topAnchor="29.0" /> | |||||
| <TableView fx:id="tbvBarang" layoutX="14.0" layoutY="91.0" AnchorPane.bottomAnchor="-5.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="81.0"> | |||||
| <columns> | |||||
| <TableColumn fx:id="tcKode" prefWidth="75.0" text="Kode" /> | |||||
| <TableColumn fx:id="tcNama" prefWidth="75.0" text="Nama" /> | |||||
| <TableColumn fx:id="tcNo" maxWidth="30.0" minWidth="30.0" prefWidth="30.0" resizable="false" text="No" /> | |||||
| <TableColumn fx:id="tcHarga" prefWidth="75.0" text="Harga" /> | |||||
| <TableColumn fx:id="tcBtnTambah" maxWidth="80.0" minWidth="80.0" resizable="false" text="Tambah" /> | |||||
| </columns> | |||||
| <columnResizePolicy> | |||||
| <TableView fx:constant="CONSTRAINED_RESIZE_POLICY" /> | |||||
| </columnResizePolicy> | |||||
| </TableView> | |||||
| </children> | |||||
| </AnchorPane> | |||||
| @@ -0,0 +1,31 @@ | |||||
| <?xml version="1.0" encoding="UTF-8"?> | |||||
| <?import javafx.scene.control.Label?> | |||||
| <?import javafx.scene.control.TableColumn?> | |||||
| <?import javafx.scene.control.TableView?> | |||||
| <?import javafx.scene.control.TextField?> | |||||
| <?import javafx.scene.layout.AnchorPane?> | |||||
| <?import javafx.scene.text.Font?> | |||||
| <AnchorPane id="AnchorPane" fx:id="apContent" minHeight="-Infinity" minWidth="-Infinity" prefHeight="450.0" prefWidth="500.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1"> | |||||
| <children> | |||||
| <Label layoutX="24.0" layoutY="24.0" text="Cari Pelanggan" AnchorPane.leftAnchor="4.0" AnchorPane.topAnchor="4.0"> | |||||
| <font> | |||||
| <Font size="16.0" /> | |||||
| </font> | |||||
| </Label> | |||||
| <TextField layoutX="14.0" layoutY="56.0" promptText="Nama Pelanggan" AnchorPane.leftAnchor="4.0" AnchorPane.rightAnchor="4.0" AnchorPane.topAnchor="46.0" /> | |||||
| <Label layoutX="14.0" layoutY="39.0" text="Nama Pelanggan" AnchorPane.leftAnchor="4.0" AnchorPane.topAnchor="29.0" /> | |||||
| <TableView fx:id="tbvPelanggan" layoutX="14.0" layoutY="91.0" AnchorPane.bottomAnchor="-5.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="81.0"> | |||||
| <columns> | |||||
| <TableColumn fx:id="tcKode" prefWidth="75.0" text="Kode" /> | |||||
| <TableColumn fx:id="tcNama" prefWidth="75.0" text="Nama" /> | |||||
| <TableColumn fx:id="tcAlamat" text="Alamat" /> | |||||
| <TableColumn fx:id="tcUpline" prefWidth="75.0" text="Upline" /> | |||||
| </columns> | |||||
| <columnResizePolicy> | |||||
| <TableView fx:constant="CONSTRAINED_RESIZE_POLICY" /> | |||||
| </columnResizePolicy> | |||||
| </TableView> | |||||
| </children> | |||||
| </AnchorPane> | |||||
| @@ -0,0 +1,35 @@ | |||||
| <?xml version="1.0" encoding="UTF-8"?> | |||||
| <?import javafx.scene.control.Button?> | |||||
| <?import javafx.scene.control.Label?> | |||||
| <?import javafx.scene.control.PasswordField?> | |||||
| <?import javafx.scene.control.TextField?> | |||||
| <?import javafx.scene.image.Image?> | |||||
| <?import javafx.scene.image.ImageView?> | |||||
| <?import javafx.scene.layout.AnchorPane?> | |||||
| <?import javafx.scene.layout.HBox?> | |||||
| <?import javafx.scene.text.Font?> | |||||
| <AnchorPane id="AnchorPane" fx:id="apMain" prefHeight="165.0" prefWidth="350.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="id.amigogroup.posterminal.keamanan.FormLoginController"> | |||||
| <children> | |||||
| <Label layoutX="14.0" layoutY="14.0" text="Login" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="5.0"> | |||||
| <font> | |||||
| <Font size="16.0" /> | |||||
| </font> | |||||
| </Label> | |||||
| <ImageView fitHeight="80.0" fitWidth="80.0" layoutX="14.0" layoutY="29.0" pickOnBounds="true" preserveRatio="true" AnchorPane.leftAnchor="14.0" AnchorPane.topAnchor="29.0"> | |||||
| <image> | |||||
| <Image url="@../assets/icons8-group-96.png" /> | |||||
| </image> | |||||
| </ImageView> | |||||
| <Label layoutX="104.0" layoutY="22.0" text="Nama Pengguna" AnchorPane.leftAnchor="104.0" AnchorPane.topAnchor="22.0" /> | |||||
| <TextField layoutX="104.0" layoutY="39.0" promptText="Nama Pengguna" AnchorPane.leftAnchor="104.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="39.0" /> | |||||
| <PasswordField layoutX="104.0" layoutY="86.0" promptText="Kata Sandi" AnchorPane.leftAnchor="104.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="86.0" /> | |||||
| <Label layoutX="104.0" layoutY="69.0" text="Kata Sandi" AnchorPane.leftAnchor="104.0" AnchorPane.topAnchor="69.0" /> | |||||
| <HBox alignment="CENTER" layoutY="122.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="122.0"> | |||||
| <children> | |||||
| <Button mnemonicParsing="false" onAction="#btnLoginOnAction" text="Masuk" /> | |||||
| </children> | |||||
| </HBox> | |||||
| </children> | |||||
| </AnchorPane> | |||||