use of au.gov.asd.tac.constellation.plugins.parameters.types.StringParameterValue in project constellation by constellation-app.
the class ExportToJsonPlugin method createParameters.
@Override
public PluginParameters createParameters() {
final PluginParameters parameters = new PluginParameters();
final PluginParameter<StringParameterValue> fnamParam = StringParameterType.build(FILE_NAME_PARAMETER_ID);
fnamParam.setName(FILE_NAME_PARAMETER_ID);
fnamParam.setDescription("The filename");
parameters.addParameter(fnamParam);
return parameters;
}
use of au.gov.asd.tac.constellation.plugins.parameters.types.StringParameterValue in project constellation by constellation-app.
the class FindAndReplaceAttributeTranslator method createParameters.
@Override
public PluginParameters createParameters() {
final PluginParameters parameters = new PluginParameters();
final PluginParameter<StringParameterValue> regexParam = StringParameterType.build(FIND_PARAMETER_ID);
regexParam.setName("Find");
regexParam.setDescription("The pattern to find (regular expression)");
regexParam.setStringValue("");
parameters.addParameter(regexParam);
final PluginParameter<StringParameterValue> replaceParam = StringParameterType.build(REPLACE_PARAMETER_ID);
replaceParam.setName("Replace With");
replaceParam.setDescription("Replace each pattern with");
replaceParam.setStringValue("");
parameters.addParameter(replaceParam);
return parameters;
}
use of au.gov.asd.tac.constellation.plugins.parameters.types.StringParameterValue in project constellation by constellation-app.
the class PasteTextPlugin method createParameters.
@Override
public PluginParameters createParameters() {
final PluginParameters parameters = new PluginParameters();
final PluginParameter<StringParameterValue> textParam = StringParameterType.build(TEXT_PARAMETER_ID);
textParam.setName("Text");
textParam.setDescription("The text to paste onto the current graph");
textParam.setStringValue("");
parameters.addParameter(textParam);
final PluginParameter<ObjectParameterValue> outVxPastedParam = ObjectParameterType.build(OUT_VX_PASTED_PARAMETER_ID);
outVxPastedParam.setName("Vertex Ids");
outVxPastedParam.setDescription("A set of the vertex Ids pasted (output parameter)");
parameters.addParameter(outVxPastedParam);
return parameters;
}
use of au.gov.asd.tac.constellation.plugins.parameters.types.StringParameterValue in project constellation by constellation-app.
the class ExportToTextPlugin method createParameters.
@Override
public PluginParameters createParameters() {
final PluginParameters parameters = new PluginParameters();
final PluginParameter<StringParameterValue> fileParam = StringParameterType.build(FILE_NAME_PARAMETER_ID);
fileParam.setName("File Name");
fileParam.setDescription("The file name");
parameters.addParameter(fileParam);
final PluginParameter<StringParameterValue> textParam = StringParameterType.build(TEXT_PARAMETER_ID);
textParam.setName("Text");
textParam.setDescription("The text to save to a file");
parameters.addParameter(textParam);
return parameters;
}
use of au.gov.asd.tac.constellation.plugins.parameters.types.StringParameterValue in project constellation by constellation-app.
the class DateAttributeTranslator method createParameters.
@Override
public PluginParameters createParameters() {
final PluginParameters parameters = new PluginParameters();
final PluginParameter<SingleChoiceParameterValue> formatParam = SingleChoiceParameterType.build(FORMAT_PARAMETER_ID);
formatParam.setName("Date Format");
formatParam.setDescription("The date format");
final List<String> datetimeLabels = new ArrayList<>(DATE_FORMATS.keySet());
SingleChoiceParameterType.setOptions(formatParam, datetimeLabels);
SingleChoiceParameterType.setChoice(formatParam, datetimeLabels.get(0));
parameters.addParameter(formatParam);
final PluginParameter<StringParameterValue> customParam = StringParameterType.build(CUSTOM_PARAMETER_ID);
customParam.setName("Custom Format");
customParam.setDescription("A custom date format");
customParam.setEnabled(false);
customParam.setStringValue("");
parameters.addParameter(customParam);
parameters.addController(FORMAT_PARAMETER_ID, (final PluginParameter<?> master, final Map<String, PluginParameter<?>> params, final ParameterChange change) -> {
if (change == ParameterChange.VALUE) {
final PluginParameter<?> slave = params.get(CUSTOM_PARAMETER_ID);
slave.setEnabled("CUSTOM".equals(master.getStringValue()));
}
});
return parameters;
}
Aggregations