use of au.gov.asd.tac.constellation.plugins.parameters.types.IntegerParameterType.IntegerParameterValue in project constellation by constellation-app.
the class LevenshteinDistancePlugin method createParameters.
@Override
public PluginParameters createParameters() {
final PluginParameters parameters = new PluginParameters();
final PluginParameter<SingleChoiceParameterType.SingleChoiceParameterValue> attributeType = SingleChoiceParameterType.build(ATTRIBUTE_PARAMETER_ID);
attributeType.setName("Compare Attribute");
attributeType.setDescription("The node attribute to compare");
parameters.addParameter(attributeType);
final PluginParameter<IntegerParameterValue> maxDistance = IntegerParameterType.build(MAXIMUM_DISTANCE_PARAMETER_ID);
maxDistance.setName("Maximum Distance");
maxDistance.setDescription("Only draws links between nodes whose attributes are at most this far apart");
maxDistance.setIntegerValue(1);
IntegerParameterType.setMinimum(maxDistance, 0);
parameters.addParameter(maxDistance);
final PluginParameter<BooleanParameterValue> caseInsensitiveParameter = BooleanParameterType.build(CASE_INSENSITIVE_PARAMETER_ID);
caseInsensitiveParameter.setName("Case Insensitive");
caseInsensitiveParameter.setDescription("Ignore case when comparing attribute");
caseInsensitiveParameter.setBooleanValue(false);
parameters.addParameter(caseInsensitiveParameter);
final PluginParameter<BooleanParameterValue> selectedOnlyParameter = BooleanParameterType.build(SELECTED_ONLY_PARAMETER_ID);
selectedOnlyParameter.setName("Selected Only");
selectedOnlyParameter.setDescription("Compare selected nodes only");
selectedOnlyParameter.setBooleanValue(false);
parameters.addParameter(selectedOnlyParameter);
return parameters;
}
use of au.gov.asd.tac.constellation.plugins.parameters.types.IntegerParameterType.IntegerParameterValue in project constellation by constellation-app.
the class GatherNodesPlugin method createParameters.
@Override
public PluginParameters createParameters() {
final PluginParameters parameters = new PluginParameters();
final PluginParameter<IntegerParameterValue> vxIdParam = IntegerParameterType.build(VXID_PARAMETER_ID);
vxIdParam.setName("Vertex Id");
vxIdParam.setDescription("The vertex id to gather around");
parameters.addParameter(vxIdParam);
final PluginParameter<ObjectParameterValue> gathersParam = ObjectParameterType.build(GATHERS_PARAMETER_ID);
gathersParam.setName("Gather Vertex Ids");
gathersParam.setDescription("A set of vertex ids to gather");
parameters.addParameter(gathersParam);
return parameters;
}
use of au.gov.asd.tac.constellation.plugins.parameters.types.IntegerParameterType.IntegerParameterValue in project constellation by constellation-app.
the class ArrangeInGridGeneralPlugin method createParameters.
@Override
public PluginParameters createParameters() {
final PluginParameters parameters = new PluginParameters();
// Use the GridChoiceParameters defaults to set the plugin defaults.
final GridChoiceParameters defaults = GridChoiceParameters.getDefaultParameters();
final PluginParameter<SingleChoiceParameterValue> gridChoiceParam = SingleChoiceParameterType.build(GRID_CHOICE_PARAMETER_ID);
gridChoiceParam.setName("Grid choice");
gridChoiceParam.setDescription("The type of grid arrangement");
SingleChoiceParameterType.setOptions(gridChoiceParam, GridChoice.getChoices());
SingleChoiceParameterType.setChoice(gridChoiceParam, defaults.getGridChoice().toString());
parameters.addParameter(gridChoiceParam);
final PluginParameter<FloatParameterValue> sizeGainParam = FloatParameterType.build(SIZE_GAIN_PARAMETER_ID);
sizeGainParam.setName("Size gain");
sizeGainParam.setDescription("The size gain, the default is " + defaults.getSizeGain());
sizeGainParam.setFloatValue(defaults.getSizeGain());
parameters.addParameter(sizeGainParam);
final PluginParameter<IntegerParameterValue> horizontalGapParam = IntegerParameterType.build(HORIZONTAL_GAP_PARAMETER_ID);
horizontalGapParam.setName("Horizontal gap");
horizontalGapParam.setDescription("The horizontal gap, the default is " + defaults.getHorizontalGap());
horizontalGapParam.setIntegerValue(defaults.getHorizontalGap());
parameters.addParameter(horizontalGapParam);
final PluginParameter<IntegerParameterValue> verticalGapParam = IntegerParameterType.build(VERTICAL_GAP_PARAMETER_ID);
verticalGapParam.setName("Vertical gap");
verticalGapParam.setDescription("The verticle gap, the default is " + defaults.getVerticalGap());
verticalGapParam.setIntegerValue(defaults.getVerticalGap());
parameters.addParameter(verticalGapParam);
final PluginParameter<BooleanParameterValue> offsetRowsParam = BooleanParameterType.build(OFFSET_ROWS_PARAMETER_ID);
offsetRowsParam.setName("Offset even numbered rows");
offsetRowsParam.setDescription("Offset even numbered rows, the default is " + defaults.hasRowOffsets());
offsetRowsParam.setBooleanValue(defaults.hasRowOffsets());
parameters.addParameter(offsetRowsParam);
final PluginParameter<BooleanParameterValue> maintainMeanParam = BooleanParameterType.build(MAINTAIN_MEAN_PARAMETER_ID);
maintainMeanParam.setName("Maintain Mean");
maintainMeanParam.setDescription("Maintain Mean, default is True");
maintainMeanParam.setBooleanValue(true);
parameters.addParameter(maintainMeanParam);
return parameters;
}
use of au.gov.asd.tac.constellation.plugins.parameters.types.IntegerParameterType.IntegerParameterValue in project constellation by constellation-app.
the class LayerByTimePlugin method createParameters.
@Override
public PluginParameters createParameters() {
final PluginParameters parameters = new PluginParameters();
dtAttrParam = SingleChoiceParameterType.build(DATETIME_ATTRIBUTE_PARAMETER_ID);
dtAttrParam.setName(DATETIME_PARAMETER_ID_NAME);
dtAttrParam.setDescription(DATETIME_ATTRIBUTE_PARAMETER_ID_DESCRIPTION);
parameters.addParameter(dtAttrParam);
dateRangeParam = DateTimeRangeParameterType.build(DATE_RANGE_PARAMETER_ID);
dateRangeParam.setName(DATE_RANGE_PARAMETER_ID_NAME);
dateRangeParam.setDescription(DATE_RANGE_PARAM_DESCRIPTION);
dateRangeParam.setDateTimeRangeValue(DATE_RANGE_PARAMETER_ID_DEFAULT);
parameters.addParameter(dateRangeParam);
final PluginParameter<SingleChoiceParameterValue> layerByParam = SingleChoiceParameterType.build(LAYER_BY_PARAMETER_ID);
layerByParam.setName(LAYER_BY_PARAMETER_ID_NAME);
layerByParam.setDescription(LAYER_BY_PARAMETER_ID_DESCRIPTION);
SingleChoiceParameterType.setOptions(layerByParam, LAYER_BY_PARAM_VALUES);
SingleChoiceParameterType.setChoice(layerByParam, LAYER_BY_PARAMETER_ID_DEFAULT);
parameters.addParameter(layerByParam);
final PluginParameter<IntegerParameterValue> amountParam = IntegerParameterType.build(AMOUNT_PARAMETER_ID);
amountParam.setName(AMOUNT_PARAMETER_ID_NAME);
amountParam.setDescription(AMOUNT_PARAMETER_ID_DESCRIPTION);
amountParam.setIntegerValue(AMOUNT_PARAMETER_ID_DEFAULT);
parameters.addParameter(amountParam);
final PluginParameter<SingleChoiceParameterValue> unitParam = SingleChoiceParameterType.build(UNIT_PARAMETER_ID);
unitParam.setName(UNIT_PARAMETER_ID_NAME);
unitParam.setDescription(UNIT_PARAMETER_ID_DESCRIPTION);
SingleChoiceParameterType.setOptions(unitParam, new ArrayList<>(LAYER_INTERVALS.keySet()));
SingleChoiceParameterType.setChoice(unitParam, UNIT_PARAMETER_ID_DEFAULT);
parameters.addParameter(unitParam);
final PluginParameter<BooleanParameterValue> transactionParam = BooleanParameterType.build(TRANSACTION_AS_LAYER_PARAMETER_ID);
transactionParam.setName(TRANSACTION_AS_LAYER_NAME);
transactionParam.setDescription(TRANSACTION_AS_LAYER_DESCRIPTION);
transactionParam.setBooleanValue(TRANSACTION_AS_LAYER_DEFAULT);
parameters.addParameter(transactionParam);
final PluginParameter<BooleanParameterValue> keepTxColorsParam = BooleanParameterType.build(KEEP_TX_COLORS_PARAMETER_ID);
keepTxColorsParam.setName(KEEP_TX_COLORS_NAME);
keepTxColorsParam.setDescription(KEEP_TX_COLORS_DESCRIPTION);
keepTxColorsParam.setBooleanValue(KEEP_TX_COLORS_DEFAULT);
parameters.addParameter(keepTxColorsParam);
final PluginParameter<BooleanParameterValue> drawTxGuidesParam = BooleanParameterType.build(DRAW_TX_GUIDES_PARAMETER_ID);
drawTxGuidesParam.setName(DRAW_TX_GUIDES_NAME);
drawTxGuidesParam.setDescription(DRAW_TX_GUIDES_DESCRIPTION);
drawTxGuidesParam.setBooleanValue(DRAW_TX_GUIDES_DEFAULT);
parameters.addParameter(drawTxGuidesParam);
parameters.addController(LAYER_BY_PARAMETER_ID, (masterId, paramMap, change) -> {
if (change == ParameterChange.VALUE) {
if (paramMap.get(LAYER_BY_PARAMETER_ID).getStringValue().equals(INTERVAL_METHOD)) {
SingleChoiceParameterType.setOptions(unitParam, new ArrayList<>(LAYER_INTERVALS.keySet()));
SingleChoiceParameterType.setChoice(unitParam, UNIT_PARAMETER_ID_INTERVAL_DEFAULT);
parameters.getParameters().get(AMOUNT_PARAMETER_ID).setEnabled(true);
} else if (paramMap.get(LAYER_BY_PARAMETER_ID).getStringValue().equals(BIN_METHOD)) {
SingleChoiceParameterType.setOptions(unitParam, new ArrayList<>(BIN_CALENDAR_UNITS.keySet()));
SingleChoiceParameterType.setChoice(unitParam, UNIT_PARAMETER_ID_BIN_DEFAULT);
parameters.getParameters().get(AMOUNT_PARAMETER_ID).setEnabled(false);
} else {
// Do nothing
}
}
});
return parameters;
}
use of au.gov.asd.tac.constellation.plugins.parameters.types.IntegerParameterType.IntegerParameterValue in project constellation by constellation-app.
the class RandomArrangementPlugin method createParameters.
@Override
public PluginParameters createParameters() {
final PluginParameters parameters = new PluginParameters();
final PluginParameter<IntegerParameterValue> dimensionsParam = IntegerParameterType.build(DIMENSIONS_PARAMETER_ID);
dimensionsParam.setName(DIMENSIONS_PARAMETER_ID);
dimensionsParam.setDescription("The dimension being 2D or 3D. The default is 2 for 2D.");
dimensionsParam.setIntegerValue(2);
parameters.addParameter(dimensionsParam);
return parameters;
}
Aggregations