Search in sources :

Example 11 with StringParameterValue

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;
}
Also used : StringParameterValue(au.gov.asd.tac.constellation.plugins.parameters.types.StringParameterValue) PluginParameters(au.gov.asd.tac.constellation.plugins.parameters.PluginParameters)

Example 12 with StringParameterValue

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;
}
Also used : StringParameterValue(au.gov.asd.tac.constellation.plugins.parameters.types.StringParameterValue) PluginParameters(au.gov.asd.tac.constellation.plugins.parameters.PluginParameters)

Example 13 with StringParameterValue

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;
}
Also used : StringParameterValue(au.gov.asd.tac.constellation.plugins.parameters.types.StringParameterValue) PluginParameters(au.gov.asd.tac.constellation.plugins.parameters.PluginParameters) ObjectParameterValue(au.gov.asd.tac.constellation.plugins.parameters.types.ObjectParameterType.ObjectParameterValue)

Example 14 with StringParameterValue

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;
}
Also used : StringParameterValue(au.gov.asd.tac.constellation.plugins.parameters.types.StringParameterValue) PluginParameters(au.gov.asd.tac.constellation.plugins.parameters.PluginParameters)

Example 15 with StringParameterValue

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;
}
Also used : ParameterChange(au.gov.asd.tac.constellation.plugins.parameters.ParameterChange) ArrayList(java.util.ArrayList) StringParameterValue(au.gov.asd.tac.constellation.plugins.parameters.types.StringParameterValue) PluginParameters(au.gov.asd.tac.constellation.plugins.parameters.PluginParameters) PluginParameter(au.gov.asd.tac.constellation.plugins.parameters.PluginParameter) LinkedHashMap(java.util.LinkedHashMap) Map(java.util.Map) SingleChoiceParameterValue(au.gov.asd.tac.constellation.plugins.parameters.types.SingleChoiceParameterType.SingleChoiceParameterValue)

Aggregations

PluginParameters (au.gov.asd.tac.constellation.plugins.parameters.PluginParameters)50 StringParameterValue (au.gov.asd.tac.constellation.plugins.parameters.types.StringParameterValue)50 BooleanParameterValue (au.gov.asd.tac.constellation.plugins.parameters.types.BooleanParameterType.BooleanParameterValue)13 SingleChoiceParameterValue (au.gov.asd.tac.constellation.plugins.parameters.types.SingleChoiceParameterType.SingleChoiceParameterValue)9 PluginParameter (au.gov.asd.tac.constellation.plugins.parameters.PluginParameter)6 ObjectParameterValue (au.gov.asd.tac.constellation.plugins.parameters.types.ObjectParameterType.ObjectParameterValue)5 ArrayList (java.util.ArrayList)5 Map (java.util.Map)5 ParameterChange (au.gov.asd.tac.constellation.plugins.parameters.ParameterChange)3 IntegerParameterValue (au.gov.asd.tac.constellation.plugins.parameters.types.IntegerParameterType.IntegerParameterValue)3 Graph (au.gov.asd.tac.constellation.graph.Graph)2 ColorParameterValue (au.gov.asd.tac.constellation.plugins.parameters.types.ColorParameterType.ColorParameterValue)2 NbPreferences (org.openide.util.NbPreferences)2 GraphElementType (au.gov.asd.tac.constellation.graph.GraphElementType)1 GraphReadMethods (au.gov.asd.tac.constellation.graph.GraphReadMethods)1 GraphWriteMethods (au.gov.asd.tac.constellation.graph.GraphWriteMethods)1 ReadableGraph (au.gov.asd.tac.constellation.graph.ReadableGraph)1 StoreGraph (au.gov.asd.tac.constellation.graph.StoreGraph)1 GraphDataObject (au.gov.asd.tac.constellation.graph.file.GraphDataObject)1 GraphObjectUtilities (au.gov.asd.tac.constellation.graph.file.GraphObjectUtilities)1