use of au.gov.asd.tac.constellation.plugins.parameters.types.StringParameterValue in project constellation by constellation-app.
the class CloseGraphPlugin method createParameters.
@Override
public PluginParameters createParameters() {
final PluginParameters parameters = new PluginParameters();
final PluginParameter<StringParameterValue> graphIdParameter = StringParameterType.build(GRAPH_PARAMETER_ID);
graphIdParameter.setName("graphId");
graphIdParameter.setDescription("The Id of the graph");
parameters.addParameter(graphIdParameter);
final PluginParameter<BooleanParameterValue> forcedParameter = BooleanParameterType.build(FORCED_PARAMETER_ID);
forcedParameter.setName("forced");
forcedParameter.setDescription("Whether the graph will be force closed or not");
forcedParameter.setBooleanValue(false);
parameters.addParameter(forcedParameter);
return parameters;
}
use of au.gov.asd.tac.constellation.plugins.parameters.types.StringParameterValue in project constellation by constellation-app.
the class MapViewTopComponent method createParameters.
private PluginParameters createParameters() {
final PluginParameters parameters = new PluginParameters();
final PluginParameter<SingleChoiceParameterValue> geoTypeParameter = SingleChoiceParameterType.build(PARAMETER_TYPE);
geoTypeParameter.setName("Geo Type");
SingleChoiceParameterType.setOptions(geoTypeParameter, Arrays.asList(GEO_TYPE_COORDINATE, GEO_TYPE_GEOHASH, GEO_TYPE_MGRS));
SingleChoiceParameterType.setChoice(geoTypeParameter, GEO_TYPE_COORDINATE);
parameters.addParameter(geoTypeParameter);
final PluginParameter<StringParameterValue> locationParameter = StringParameterType.build(PARAMETER_LOCATION);
locationParameter.setName("Location");
locationParameter.setDescription("Enter a coordinate in decimal degrees (and optionally " + "a radius in kilometers) with components separated by spaces or commas");
locationParameter.setStringValue(null);
parameters.addParameter(locationParameter);
PluginParameterController controller = ((master, params, change) -> {
// master will need to be of type SingleChoiceParameter
@SuppressWarnings("unchecked") final PluginParameter<SingleChoiceParameterValue> typedMaster = (PluginParameter<SingleChoiceParameterValue>) master;
switch(SingleChoiceParameterType.getChoice(typedMaster)) {
case GEO_TYPE_COORDINATE:
params.get(PARAMETER_LOCATION).setDescription("Enter a coordinate in decimal degrees (and optionally a radius " + "in kilometers) with components separated by spaces or commas");
break;
case GEO_TYPE_GEOHASH:
params.get(PARAMETER_LOCATION).setDescription("Enter a base-16 geohash value");
break;
case GEO_TYPE_MGRS:
params.get(PARAMETER_LOCATION).setDescription("Enter an MGRS value");
break;
default:
break;
}
});
parameters.addController(PARAMETER_TYPE, controller);
return parameters;
}
use of au.gov.asd.tac.constellation.plugins.parameters.types.StringParameterValue in project constellation by constellation-app.
the class SynchronizerPlugin method createParameters.
@Override
public PluginParameters createParameters() {
final PluginParameters parameters = new PluginParameters();
parameters.addParameter(StringParameterType.build(NAME_PARAMETER_ID));
parameters.addParameter(StringParameterType.build(COPY_PARAMETER_ID));
parameters.addController(NAME_PARAMETER_ID, (final PluginParameter<?> master, final Map<String, PluginParameter<?>> params, final ParameterChange change) -> {
if (change == ParameterChange.VALUE) {
// COPY_PARAMETER will be of type StringParameter
@SuppressWarnings("unchecked") final PluginParameter<StringParameterValue> slave = (PluginParameter<StringParameterValue>) params.get(COPY_PARAMETER_ID);
slave.setStringValue("COPY: " + master.getStringValue());
}
});
return parameters;
}
use of au.gov.asd.tac.constellation.plugins.parameters.types.StringParameterValue in project constellation by constellation-app.
the class GetIcon method createParameters.
@Override
public PluginParameters createParameters() {
final PluginParameters parameters = new PluginParameters();
final PluginParameter<StringParameterValue> nameParam = StringParameterType.build(ICON_PARAMETER_ID);
nameParam.setName("Icon Name");
nameParam.setDescription("The name of the icon to return as a PNG file.");
nameParam.setRequired(true);
parameters.addParameter(nameParam);
return parameters;
}
use of au.gov.asd.tac.constellation.plugins.parameters.types.StringParameterValue in project constellation by constellation-app.
the class GetPluginDescription method createParameters.
@Override
public PluginParameters createParameters() {
final PluginParameters parameters = new PluginParameters();
final PluginParameter<StringParameterValue> nameParam = StringParameterType.build(PLUGIN_NAME_PARAMETER_ID);
nameParam.setName("Plugin name");
nameParam.setDescription("Plugin name to get the description and parameters.");
nameParam.setRequired(true);
parameters.addParameter(nameParam);
return parameters;
}
Aggregations