use of au.gov.asd.tac.constellation.plugins.parameters.types.IntegerParameterType.IntegerParameterValue in project constellation by constellation-app.
the class TestParameterBuildingPlugin method createParameters.
@Override
public PluginParameters createParameters() {
final PluginParameters params = new PluginParameters();
final PluginParameter<SingleChoiceParameterValue> fupChoiceParam = SingleChoiceParameterType.build(CHOICE_PARAMETER_ID);
fupChoiceParam.setName(SOME_CHOICE_NAME);
fupChoiceParam.setDescription(SOME_CHOICE_DESCRIPTION);
SingleChoiceParameterType.setOptions(fupChoiceParam, Arrays.asList("Choice 1", "Choice 2", "Choice 3"));
SingleChoiceParameterType.setChoice(fupChoiceParam, "Choice 1");
params.addParameter(fupChoiceParam);
final PluginParameter<LocalDateParameterValue> ldParam = LocalDateParameterType.build(LOCALDATE_PARAMETER_ID);
ldParam.setName("Date");
ldParam.setDescription("Pick a day");
params.addParameter(ldParam);
final PluginParameter<IntegerParameterValue> lenParam = IntegerParameterType.build(INT_PARAMETER_ID);
lenParam.setName(SOME_INT_NAME);
lenParam.setDescription(SOME_INT_DESCRIPTION);
lenParam.setIntegerValue(5);
params.addParameter(lenParam);
final PluginParameter<FloatParameterValue> thresholdParam = FloatParameterType.build(FLOAT_PARAMETER_ID);
thresholdParam.setName(FLOAT_NAME);
thresholdParam.setDescription(FLOAT_DESCRIPTION);
thresholdParam.setFloatValue(0F);
FloatParameterType.setMinimum(thresholdParam, 0);
FloatParameterType.setMaximum(thresholdParam, 1);
FloatParameterType.setStep(thresholdParam, 0.1F);
params.addParameter(thresholdParam);
final PluginParameter<BooleanParameterValue> caseParam = BooleanParameterType.build(BOOLEAN_PARAMETER_ID);
caseParam.setName(SOME_BOOLEAN_NAME);
caseParam.setDescription(SOME_BOOLEAN_DESCRIPTION);
params.addParameter(caseParam);
for (int i = 0; i < 2; i++) {
final PluginParameter<StringParameterValue> text = StringParameterType.build("text" + i);
text.setName("Some text " + i);
text.setDescription("Type some text into this thing");
text.setStringValue("Value " + i);
params.addParameter(text);
}
return params;
}
Aggregations