use of au.gov.asd.tac.constellation.plugins.parameters.types.FloatParameterType.FloatParameterValue in project constellation by constellation-app.
the class CreateVertexPlugin method createParameters.
@Override
public PluginParameters createParameters() {
final PluginParameters parameters = new PluginParameters();
final PluginParameter<FloatParameterValue> xParam = FloatParameterType.build(X_PARAMETER_ID);
xParam.setName("X");
xParam.setDescription("The position of the X coordinate");
xParam.setFloatValue(0F);
parameters.addParameter(xParam);
final PluginParameter<FloatParameterValue> yParam = FloatParameterType.build(Y_PARAMETER_ID);
yParam.setName("Y");
yParam.setDescription("The position of the Y coordinate");
yParam.setFloatValue(0F);
parameters.addParameter(yParam);
final PluginParameter<FloatParameterValue> zParam = FloatParameterType.build(Z_PARAMETER_ID);
zParam.setName("Z");
zParam.setDescription("The position of the Z coordinate");
zParam.setFloatValue(0F);
parameters.addParameter(zParam);
return parameters;
}
use of au.gov.asd.tac.constellation.plugins.parameters.types.FloatParameterType.FloatParameterValue in project constellation by constellation-app.
the class RotateCameraPlugin method createParameters.
@Override
public PluginParameters createParameters() {
final PluginParameters parameters = new PluginParameters();
final PluginParameter<FloatParameterValue> xaxisParam = FloatParameterType.build(X_PARAMETER_ID);
xaxisParam.setName("xAxis");
xaxisParam.setDescription("Rotation in degrees around the x axis");
xaxisParam.setFloatValue(0F);
parameters.addParameter(xaxisParam);
final PluginParameter<FloatParameterValue> yaxisParam = FloatParameterType.build(Y_PARAMETER_ID);
yaxisParam.setName("yAxis");
yaxisParam.setDescription("Rotation in degrees around the y axis");
yaxisParam.setFloatValue(0F);
parameters.addParameter(yaxisParam);
final PluginParameter<FloatParameterValue> zaxisParam = FloatParameterType.build(Z_PARAMETER_ID);
zaxisParam.setName("zAxis");
zaxisParam.setDescription("Rotation in degrees around the z axis");
zaxisParam.setFloatValue(0F);
parameters.addParameter(zaxisParam);
final PluginParameter<BooleanParameterValue> animateParam = BooleanParameterType.build(ANIMATE_PARAMETER_ID);
animateParam.setName("animate");
animateParam.setDescription("Animate the rotation asynchronously");
animateParam.setBooleanValue(false);
parameters.addParameter(animateParam);
return parameters;
}
use of au.gov.asd.tac.constellation.plugins.parameters.types.FloatParameterType.FloatParameterValue in project constellation by constellation-app.
the class SmallWorldGraphBuilderPlugin method createParameters.
@Override
public PluginParameters createParameters() {
final PluginParameters params = new PluginParameters();
final PluginParameter<IntegerParameterValue> n = IntegerParameterType.build(N_PARAMETER_ID);
n.setName("Number of nodes");
n.setDescription("The number of nodes on the graph");
n.setIntegerValue(10);
IntegerParameterType.setMinimum(n, 0);
params.addParameter(n);
final PluginParameter<IntegerParameterValue> k = IntegerParameterType.build(K_PARAMETER_ID);
k.setName("Nearest neighbours to attach");
k.setDescription("The number of nearest neighbours to connect each node to");
k.setIntegerValue(4);
IntegerParameterType.setMinimum(k, 0);
params.addParameter(k);
final PluginParameter<FloatParameterValue> p = FloatParameterType.build(P_PARAMETER_ID);
p.setName("Rewiring probability");
p.setDescription("Probability of re-wiring each edge (low for a long shortest paths lattice structure, high for higher clustering coefficient random graph)");
p.setFloatValue(0.5F);
FloatParameterType.setMinimum(p, 0F);
FloatParameterType.setMaximum(p, 1F);
params.addParameter(p);
final List<String> modes = new ArrayList<>();
modes.add("Default");
modes.add("Newman");
modes.add(CONNECTED);
final PluginParameter<SingleChoiceParameterValue> buildMode = SingleChoiceParameterType.build(BUILD_MODE_PARAMETER_ID);
buildMode.setName("Build mode");
buildMode.setDescription("Newman: Adds edges instead of rewiring. Connected: Attempts to build a connected graph.");
SingleChoiceParameterType.setOptions(buildMode, modes);
SingleChoiceParameterType.setChoice(buildMode, modes.get(0));
params.addParameter(buildMode);
final PluginParameter<IntegerParameterValue> t = IntegerParameterType.build(T_PARAMETER_ID);
t.setName("Number of attempts to build connected graph");
t.setDescription("Number of attempts to build a connected graph");
t.setIntegerValue(100);
IntegerParameterType.setMinimum(t, 1);
t.setEnabled(false);
params.addParameter(t);
final PluginParameter<BooleanParameterValue> randomWeights = BooleanParameterType.build(RANDOM_WEIGHTS_PARAMETER_ID);
randomWeights.setName("Random edge weight/direction");
randomWeights.setDescription("Edges have a random number of transactions going in random directions");
randomWeights.setBooleanValue(true);
params.addParameter(randomWeights);
final PluginParameter<MultiChoiceParameterValue> nodeTypes = MultiChoiceParameterType.build(NODE_TYPES_PARAMETER_ID);
nodeTypes.setName("Node types");
nodeTypes.setDescription("Node types to add to the graph");
params.addParameter(nodeTypes);
final PluginParameter<MultiChoiceParameterValue> transactionTypes = MultiChoiceParameterType.build(TRANSACTION_TYPES_PARAMETER_ID);
transactionTypes.setName("Transaction types");
transactionTypes.setDescription("Transaction types to add to the graph");
params.addParameter(transactionTypes);
params.addController(BUILD_MODE_PARAMETER_ID, (master, parameters, change) -> {
if (change == ParameterChange.VALUE) {
final String mode = master.getStringValue();
parameters.get(T_PARAMETER_ID).setEnabled(mode.equals(CONNECTED));
}
});
return params;
}
use of au.gov.asd.tac.constellation.plugins.parameters.types.FloatParameterType.FloatParameterValue in project constellation by constellation-app.
the class PagerankCentralityPlugin method createParameters.
@Override
public PluginParameters createParameters() {
final PluginParameters parameters = new PluginParameters();
final PluginParameter<BooleanParameterValue> treatUndirectedBidirectionalParameter = BooleanParameterType.build(TREAT_UNDIRECTED_BIDIRECTIONAL_PARAMETER_ID);
treatUndirectedBidirectionalParameter.setName("Include Undirected");
treatUndirectedBidirectionalParameter.setDescription("Treat undirected connections as bidirectional connections");
treatUndirectedBidirectionalParameter.setBooleanValue(true);
parameters.addParameter(treatUndirectedBidirectionalParameter);
final PluginParameter<FloatParameterValue> dampingFactorParameter = FloatParameterType.build(DAMPING_FACTOR_PARAMETER_ID);
dampingFactorParameter.setName("Damping Factor");
dampingFactorParameter.setDescription("The damping factor to apply at each iteration");
dampingFactorParameter.setFloatValue(0.85F);
parameters.addParameter(dampingFactorParameter);
final PluginParameter<IntegerParameterValue> iterationsParameter = IntegerParameterType.build(ITERATIONS_PARAMETER_ID);
iterationsParameter.setName("Iterations");
iterationsParameter.setDescription("The number of iterations to run before returning a result");
iterationsParameter.setIntegerValue(100);
parameters.addParameter(iterationsParameter);
final PluginParameter<FloatParameterValue> epsilonParameter = FloatParameterType.build(EPSILON_PARAMETER_ID);
epsilonParameter.setName("Epsilon");
epsilonParameter.setDescription("The change threshold at which equilibrium can be considered reached");
epsilonParameter.setFloatValue(1E-8F);
parameters.addParameter(epsilonParameter);
final PluginParameter<BooleanParameterValue> normaliseByAvailableParameter = BooleanParameterType.build(NORMALISE_AVAILABLE_PARAMETER_ID);
normaliseByAvailableParameter.setName("Normalise By Max Available Score");
normaliseByAvailableParameter.setDescription("Normalise calculated scores by the maximum calculated score");
normaliseByAvailableParameter.setBooleanValue(false);
parameters.addParameter(normaliseByAvailableParameter);
return parameters;
}
use of au.gov.asd.tac.constellation.plugins.parameters.types.FloatParameterType.FloatParameterValue in project constellation by constellation-app.
the class SetCameraVisibilityRange method createParameters.
@Override
public PluginParameters createParameters() {
final PluginParameters parameters = new PluginParameters();
final PluginParameter<FloatParameterValue> visibilityLowParam = FloatParameterType.build(VISIBILITY_LOW_ID);
visibilityLowParam.setName("visibilityLow");
visibilityLowParam.setDescription("Low boundary of visibility");
visibilityLowParam.setFloatValue(0F);
parameters.addParameter(visibilityLowParam);
final PluginParameter<FloatParameterValue> visibilityHighParam = FloatParameterType.build(VISIBILITY_HIGH_ID);
visibilityHighParam.setName("visibilityHigh");
visibilityHighParam.setDescription("High boundary of visibility");
visibilityHighParam.setFloatValue(1F);
parameters.addParameter(visibilityHighParam);
return parameters;
}
Aggregations