Label masterpwd_lbl = (Label) getFromCacheNode("masterpwd_lbl");
EffectFX.neonEffect(username_lbl, Color.WHITE);
EffectFX.neonEffect(masterpwd_lbl, Color.WHITE);
/**
* Se e' possibile per default il campo username e' impostato con il
* valore della property "user.name".
*/
final TextField USER_TXT = (TextField) getFromCacheNode("user_txt");
String def_user = "";
try {
def_user = System.getProperty("user.name");
if (def_user == null || def_user.length() == 0) {
def_user = "";
}
} catch (Exception exc) {
}
USER_TXT.setText(def_user);
/**
* Carico i vari vaori del login, ed imposto gli eventi da gestire.
*/
final PasswordField PASS_TXT = (PasswordField) getFromCacheNode("pass_txt");
PASS_TXT.setText("");
PASS_TXT.requestFocus();
if (DEBUG) {
PASS_TXT.setText("1234567890");
}
btn_exit = (Button) getFromCacheNode("exit_btn");
btn_exit.setFocusTraversable(false);
btn_exit.setOnAction((ActionEvent e) -> {
UtilityFX.sysExit(__EXIT_NO_ERROR__);
});
login_btn = (Button) getFromCacheNode("login_btn");
login_btn.setFocusTraversable(false);
EventHandler<ActionEvent> eh = (ActionEvent event) -> {
try {
checkLogin(USER_TXT, PASS_TXT);
} catch (Exception ex) {
ex.printStackTrace();
}
};
login_btn.setOnAction(eh);
USER_TXT.setOnAction(eh);
PASS_TXT.setOnAction(eh);
//--------------------------------------------------------------------//
//--------------------------------------------------------------------//
//--------------------------------------------------------------------//