use of au.gov.asd.tac.constellation.plugins.parameters.types.StringParameterValue in project constellation by constellation-app.
the class SaveTemplateAction method actionPerformed.
@Override
public void actionPerformed(final ActionEvent e) {
final Plugin plugin = PluginRegistry.get(GraphNodePluginRegistry.SAVE_TEMPLATE);
final PluginParameters params = plugin.createParameters();
while (true) {
final PluginParametersSwingDialog dialog = new PluginParametersSwingDialog(Bundle.CTL_SaveTemplateAction(), params);
dialog.showAndWait();
if (PluginParametersDialog.OK.equals(dialog.getResult())) {
if (NewSchemaGraphAction.getTemplateNames().containsKey(params.getStringValue(SaveTemplatePlugin.TEMPLATE_NAME_PARAMETER_ID))) {
final PluginParameters warningParams = new PluginParameters();
final PluginParameter<StringParameterValue> warningMessageParam = StringParameterType.build("");
warningMessageParam.setName("");
warningMessageParam.setStringValue("Warning template with that name already exists - really overwrite?");
StringParameterType.setIsLabel(warningMessageParam, true);
warningParams.addParameter(warningMessageParam);
final PluginParametersSwingDialog overwrite = new PluginParametersSwingDialog("Overwrite?", warningParams);
overwrite.showAndWait();
if (!PluginParametersDialog.OK.equals(overwrite.getResult())) {
continue;
}
}
Future<?> f = PluginExecution.withPlugin(plugin).withParameters(params).executeLater(context.getGraph());
PluginExecution.withPlugin(new SimplePlugin() {
@Override
public String getName() {
return "Update Template Menu";
}
@Override
protected void execute(final PluginGraphs graphs, final PluginInteraction interaction, final PluginParameters parameters) throws InterruptedException, PluginException {
NewSchemaGraphAction.recreateTemplateMenuItems();
}
}).waitingFor(f).executeLater(null);
}
break;
}
}
use of au.gov.asd.tac.constellation.plugins.parameters.types.StringParameterValue in project constellation by constellation-app.
the class LoadTemplatePlugin method createParameters.
@Override
public PluginParameters createParameters() {
final PluginParameters params = new PluginParameters();
final PluginParameter<ObjectParameterValue> fileParam = ObjectParameterType.build(TEMPLATE_FILE_PARAMETER_ID);
final PluginParameter<StringParameterValue> nameParam = StringParameterType.build(TEMPLATE_NAME_PARAMETER_ID);
params.addParameter(fileParam);
params.addParameter(nameParam);
return params;
}
use of au.gov.asd.tac.constellation.plugins.parameters.types.StringParameterValue in project constellation by constellation-app.
the class DateTimeCustomFormatter method createParameters.
@Override
public PluginParameters createParameters() {
final PluginParameters params = new PluginParameters();
final PluginParameter<StringParameterValue> formatParameter = StringParameterType.build(FORMAT_PARAMETER_ID);
formatParameter.setName("Format");
formatParameter.setStringValue("yyyy-MM-dd hh:mm:ss");
params.addParameter(formatParameter);
return params;
}
use of au.gov.asd.tac.constellation.plugins.parameters.types.StringParameterValue in project constellation by constellation-app.
the class ExportToImagePlugin method createParameters.
@Override
public PluginParameters createParameters() {
final PluginParameters parameters = new PluginParameters();
final PluginParameter<StringParameterValue> imageFileParam = StringParameterType.build(FILE_NAME_PARAMETER_ID);
imageFileParam.setDescription("File to write to");
parameters.addParameter(imageFileParam);
return parameters;
}
use of au.gov.asd.tac.constellation.plugins.parameters.types.StringParameterValue in project constellation by constellation-app.
the class SubstringFormatter method createParameters.
@Override
public PluginParameters createParameters() {
PluginParameters params = new PluginParameters();
final PluginParameter<StringParameterValue> startParameter = StringParameterType.build(START_PARAMETER_ID);
startParameter.setName("Start");
startParameter.setStringValue("");
params.addParameter(startParameter);
final PluginParameter<StringParameterValue> endParameter = StringParameterType.build(END_PARAMETER_ID);
endParameter.setName("End");
endParameter.setStringValue("");
params.addParameter(endParameter);
return params;
}
Aggregations