Package edu.spbstu.hoteldb

Examples of edu.spbstu.hoteldb.Main


  public void create(List<Object> args) {   
    this.setHgap(10);
    this.setVgap(10);
   
    final TextArea results = (TextArea)args.get(0);
    final Main main = (Main)args.get(1);
   
    Label llogin = new Label("Login: ");
    TextField tflogin = new TextField();
    tflogin.addEventHandler(KeyEvent.KEY_TYPED, new NameFilter());
    tflogin.setPromptText("3-16 symbols");
    Label lemail = new Label("Email: ");
    TextField tfemail = new TextField();
    tfemail.addEventHandler(KeyEvent.KEY_TYPED, new NameFilter());
    tfemail.setPromptText("Required");
    Label lpass = new Label("Password: ");
    PasswordField tfpass = new PasswordField();
    tfpass.addEventHandler(KeyEvent.KEY_TYPED, new NameFilter());
    tfpass.setPromptText("Required");
    Label lname = new Label("Name: ");
    TextField tfname = new TextField();
    tfname.setPromptText("Required");
    tfname.addEventHandler(KeyEvent.KEY_TYPED, new NameFilter());
    Label lcountry = new Label("Country: ");
    ChoiceBox<String> cbcountry = new ChoiceBox<String>(
        FXCollections.observableArrayList("Russia", "Spain", "USA",
            "UK"));
    Label llang = new Label("Language: ");
    ChoiceBox<String> cblang = new ChoiceBox<String>(
        FXCollections.observableArrayList("ru", "es", "en", "ger"));
    Button btnthis = new Button("Register");
    List<Node> hargs = new ArrayList<Node>(6);
    hargs.add(0, tflogin);
    hargs.add(1, tfemail);
    hargs.add(2, tfpass);
    hargs.add(3, tfname);
    hargs.add(4, cbcountry);
    hargs.add(5, cblang);
    btnthis.setOnAction(new RegisterQueryEventHandler(connect, results,
        main, hargs));
    Button btnback = new Button("Back");
    btnback.setOnAction(new EventHandler<ActionEvent>() {
      @Override
      public void handle(ActionEvent event) {
        main.setPanel(PanelType.LoginPanel, null);
      }
    });
    this.add(llogin, 0, 0);
    this.add(tflogin, 1, 0);
    this.add(lpass, 0, 1);
View Full Code Here


public class RootPanel extends GridPane implements Panel {
 
  @Override
  public void create(List<Object> args) {
    final Main main = (Main) args.get(1);
   
    this.setHgap(50);
    this.setVgap(50);
    this.setPadding(new Insets(10, 10, 10, 10));
   
    Label lwelcome = new Label("Welcome to admin panel!");
   
    Button btnfin = new Button("Finance");
    btnfin.setOnAction(new EventHandler<ActionEvent>() {
      @Override
      public void handle(ActionEvent event) {
        main.setPanel(PanelType.FinancePanel, null);
      }
    });
    Button btnpers = new Button("Personnel");
    btnpers.setOnAction(new EventHandler<ActionEvent>() {
      @Override
      public void handle(ActionEvent event) {
        main.setPanel(PanelType.PersonnelPanel, null);
      }
    });
    Button btnstat = new Button("Statistics");
    btnstat.setOnAction(new EventHandler<ActionEvent>() {
      @Override
      public void handle(ActionEvent event) {
        main.setPanel(PanelType.StatisticsPanel, null);
      }
    });
    Button btnsearch = new Button("Search");
    btnsearch.setOnAction(new EventHandler<ActionEvent>() {
      @Override
      public void handle(ActionEvent event) {
        main.setPanel(PanelType.RootSearchPanel, null);
      }
    });
    int w = 200;
    btnfin.setMaxWidth(w);
    btnpers.setMaxWidth(w);
View Full Code Here

  final RoomSearchPanel rsearch = new RoomSearchPanel();

  @Override
  public void create(List<Object> args) {
    final TextArea results = (TextArea) args.get(0);
    final Main main = (Main) args.get(1);
    this.setSpacing(10);
    this.setPadding(new Insets(10, 10, 10, 10));
    TextField login = new TextField();
    login.setMaxWidth(200);
    login.setPromptText("Login");
View Full Code Here

TOP

Related Classes of edu.spbstu.hoteldb.Main

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.