btnNewProfile.setOnAction(new EventHandler<ActionEvent>()
{
@Override
public void handle(ActionEvent e)
{
Response resp = Dialogs.showTextInputDialog(MainConfigStage.this, "Enter Profile Name", S_EMPTY);
if (resp == Response.YES)
{
String name = Dialogs.getTextInput();
if (name != null)
{
if (DEBUG_LOGGING)
{
logger.debug("setting new name: {}", name);
}
config.setProfileName(name);
chooserSource.setItems(config.getSourceLocations());
chooserClasses.setItems(config.getClassLocations());
createComboOptions(config);
if (DEBUG_LOGGING)
{
logger.debug("setting combo name: {}", name);
}
comboBox.setValue(name);
}
}
}
});
Button btnDelete = new Button("Delete");
btnDelete.setOnAction(new EventHandler<ActionEvent>()
{
@Override
public void handle(ActionEvent e)
{
String profileName = comboBox.getValue();
if (profileName != null && !config.isBuiltInProfile(profileName))
{
Response resp = Dialogs.showYesNoDialog(MainConfigStage.this, "Really Delete Profile?", "Delete profile '"
+ profileName + C_QUOTE);
if (resp == Response.YES)
{
if (DEBUG_LOGGING)