Search in sources :

Example 1 with FreeformSelectionPlugin

use of au.gov.asd.tac.constellation.graph.interaction.plugins.select.FreeformSelectionPlugin in project constellation by constellation-app.

the class DefaultInteractionEventHandler method performFreeformSelection.

/**
 * Performs a selection based on a given polygon in the freeformModel.
 *
 * @param appendSelection whether or not the selection will be appended to
 * the current selection
 * @param toggleSelection whether or not the selection will toggle the
 * current selection. Note that if appendSelection is true, this parameter
 * has no effect.
 */
private void performFreeformSelection(final GraphReadMethods rg, final boolean appendSelection, final boolean toggleSelection) {
    final float[] boxCameraCoordinates = visualInteraction.windowBoxToCameraBox(freeformModel.getLeftMost(), freeformModel.getRightMost(), freeformModel.getTopMost(), freeformModel.getBottomMost());
    freeformModel.setWindowBoxToCameraBox(boxCameraCoordinates);
    final Float[] transformedVertices = freeformModel.getTransformedVertices();
    final Plugin plugin = new FreeformSelectionPlugin(appendSelection, toggleSelection, VisualGraphUtilities.getCamera(rg), boxCameraCoordinates, transformedVertices, freeformModel.getNumPoints());
    PluginExecution.withPlugin(plugin).executeLater(graph);
}
Also used : FreeformSelectionPlugin(au.gov.asd.tac.constellation.graph.interaction.plugins.select.FreeformSelectionPlugin) PointSelectionPlugin(au.gov.asd.tac.constellation.graph.interaction.plugins.select.PointSelectionPlugin) BoxSelectionPlugin(au.gov.asd.tac.constellation.graph.interaction.plugins.select.BoxSelectionPlugin) CreateTransactionPlugin(au.gov.asd.tac.constellation.graph.interaction.plugins.draw.CreateTransactionPlugin) FreeformSelectionPlugin(au.gov.asd.tac.constellation.graph.interaction.plugins.select.FreeformSelectionPlugin) Plugin(au.gov.asd.tac.constellation.plugins.Plugin) CreateVertexPlugin(au.gov.asd.tac.constellation.graph.interaction.plugins.draw.CreateVertexPlugin) SimplePlugin(au.gov.asd.tac.constellation.plugins.templates.SimplePlugin)

Aggregations

CreateTransactionPlugin (au.gov.asd.tac.constellation.graph.interaction.plugins.draw.CreateTransactionPlugin)1 CreateVertexPlugin (au.gov.asd.tac.constellation.graph.interaction.plugins.draw.CreateVertexPlugin)1 BoxSelectionPlugin (au.gov.asd.tac.constellation.graph.interaction.plugins.select.BoxSelectionPlugin)1 FreeformSelectionPlugin (au.gov.asd.tac.constellation.graph.interaction.plugins.select.FreeformSelectionPlugin)1 PointSelectionPlugin (au.gov.asd.tac.constellation.graph.interaction.plugins.select.PointSelectionPlugin)1 Plugin (au.gov.asd.tac.constellation.plugins.Plugin)1 SimplePlugin (au.gov.asd.tac.constellation.plugins.templates.SimplePlugin)1