Search in sources :

Example 1 with PointSelectionPlugin

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

the class DefaultInteractionEventHandler method performPointSelection.

private void performPointSelection(final boolean toggleSelection, final boolean clearSelection, final GraphElementType elementType, final int elementId) {
    final IntArray vxIds = new IntArray();
    final IntArray txIds = new IntArray();
    switch(elementType) {
        case VERTEX:
            vxIds.add(elementId);
            break;
        case TRANSACTION:
            txIds.add(elementId);
            break;
        default:
            break;
    }
    if (!(vxIds.isEmpty() && txIds.isEmpty() && !clearSelection)) {
        Plugin selectPoint = new PointSelectionPlugin(vxIds, txIds, toggleSelection, clearSelection);
        PluginExecution.withPlugin(selectPoint).executeLater(graph);
    }
}
Also used : IntArray(au.gov.asd.tac.constellation.utilities.graphics.IntArray) PointSelectionPlugin(au.gov.asd.tac.constellation.graph.interaction.plugins.select.PointSelectionPlugin) 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 IntArray (au.gov.asd.tac.constellation.utilities.graphics.IntArray)1