package pl.helion.j2mepp.lokalizator;

import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.Form;
import javax.microedition.lcdui.TextField;

public class RejestracjaForm extends Form {
    private TextField txtLogin = new TextField("Login:", "", 30, TextField.ANY);
    private TextField txtHaslo = new TextField("Hasło:", "", 30, TextField.PASSWORD);
    private TextField txtHaslo2 = new TextField("Powtórz hasło:", "", 30, TextField.PASSWORD);
    private TextField txtImie = new TextField("Imię:", "", 40, TextField.ANY);
    private TextField txtNazwisko = new TextField("Nazwisko:", "", 40, TextField.ANY);

    private Command cmdPowrot = new Command("Powrót", Command.BACK, 0);
    private Command cmdZarejestruj = new Command("Zarejestruj", Command.OK, 0);

    public RejestracjaForm(CommandListener l) {
        super("Rejestracja");
        this.append(txtLogin);
        this.append(txtHaslo);
        this.append(txtHaslo2);
        this.append(txtImie);
        this.append(txtNazwisko);
        this.addCommand(cmdPowrot);
        this.addCommand(cmdZarejestruj);
        this.setCommandListener(l);
    }

    public String getLogin() {
        return txtLogin.getString();
    }

    public String getHaslo() {
        return txtHaslo.getString();
    }

    public String getHaslo2() {
        return txtHaslo2.getString();
    }

    public String getImie() {
        return txtImie.getString();
    }

    public String getNazwisko() {
        return txtNazwisko.getString();
    }
}

