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);