}
private void openTabbedEditor(final CellPropertiesManager EDITOR) {
try {
EncryptedNode NODE = EDITOR.getNode();
String TITLE = NODE.getProperties().get("title");
ObservableList<Tab> tabs = __tabbed.getTabs();
if (tabs != null) {
for (Tab t : tabs) {
if (t.getId() != null && t.getId().equals(EDITOR.getInstanceId())) {
__tabbed.getSelectionModel().select(t);
EDITOR.__tab_edit_title_txt.requestFocus();
return;
}
}
}
EDITOR.initEditor();
final Tab TAB = new Tab(!_IMPOSSIBLE_TITLE_.equals(TITLE) ? TITLE : "");
TAB.setId(EDITOR.getInstanceId());
BorderPane bpane = new BorderPane();
SidePane tab_edit_panel = EDITOR.__sider;
bpane.setCenter(tab_edit_panel);
TAB.setContent(bpane);
//****************************************************************//
//* GESTIONE CLOSE TAB *//
//****************************************************************//
TAB.setOnCloseRequest((javafx.event.Event evt) -> {
closeEditor(EDITOR, evt, TAB);
});
NODE.getProperties().put("is_open", "true");
//----------------------------------------------------------------//
// SETTO I CAMPI DELLA MASCHERA //
//----------------------------------------------------------------//
EDITOR.__tab = TAB;
if (!_IMPOSSIBLE_TITLE_.equals(TITLE)) {
EDITOR.__tab_edit_title_txt.setText(TITLE);
} else {
EDITOR.__tab_edit_title_txt.setPromptText(RBLoader.ll("Please enter your Title here."));
}
EDITOR.__tab_edit_email_txt.setText(NODE.getProperties().get("email_value"));
EDITOR.__tab_edit_url_txt.setText(NODE.getProperties().get("url_value"));
EDITOR.__tab_edit_area_comment.setText(escaper.unescapeValue(NODE.getProperties().get("comment_value")));
initSensibleEditor(getSensibleType(NODE, "user_type"), EDITOR.__username_editor, NODE, "user_name_value");
initSensibleEditor(getSensibleType(NODE, "password1_type"), EDITOR.__pass1_editor, NODE, "password1_value");
initSensibleEditor(getSensibleType(NODE, "password2_type"), EDITOR.__pass2_editor, NODE, "password2_value");
//----------------------------------------------------------------//
//----------------------------------------------------------------//
//----------------------------------------------------------------//
EDITOR.__tab_edit_btn_copy_user.setOnAction((ActionEvent e) -> {
try {
EncryptedNode NODE1 = EDITOR.getNode();
String value = null;
if (SensibleValueTypeListener.HIDDEN_VALUE_TYPE == EDITOR.__username_editor.getType()) {
value = getSensibleValue(NODE1, "user_name_value");
} else {
value = EDITOR.__username_editor.getValue();
}
manager.copyToScrambledClipboard(value);
} catch (Exception exc) {
exc.printStackTrace();
}
});
EDITOR.__tab_edit_btn_copy_pass1.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent e) {
try {
EncryptedNode NODE = EDITOR.getNode();
String value = null;
if (SensibleValueTypeListener.HIDDEN_VALUE_TYPE == EDITOR.__pass1_editor.getType()) {
value = getSensibleValue(NODE, "password1_value");
} else {
value = EDITOR.__pass1_editor.getValue();
}
manager.copyToScrambledClipboard(value);
} catch (Exception exc) {
exc.printStackTrace();
}
}
});
EDITOR.__tab_edit_btn_copy_pass2.setOnAction((ActionEvent e) -> {
try {
EncryptedNode NODE1 = EDITOR.getNode();
String value = null;
if (SensibleValueTypeListener.HIDDEN_VALUE_TYPE == EDITOR.__pass2_editor.getType()) {
value = getSensibleValue(NODE1, "password2_value");
} else {
value = EDITOR.__pass2_editor.getValue();