Search in sources :

Example 1 with EdgesManipulatorBuilder

use of org.gephi.datalab.spi.edges.EdgesManipulatorBuilder in project gephi by gephi.

the class DataLaboratoryHelper method getEdgesManipulators.

/**
     * <p>Prepares an array with one new instance of every EdgesManipulator
     * that has a builder registered and returns it.</p>
     * <p>It also returns the manipulators ordered first by type and then by position.</p>
     * @return Array of all EdgesManipulator implementations
     */
public EdgesManipulator[] getEdgesManipulators() {
    ArrayList<EdgesManipulator> edgesManipulators = new ArrayList<>();
    for (EdgesManipulatorBuilder em : Lookup.getDefault().lookupAll(EdgesManipulatorBuilder.class)) {
        edgesManipulators.add(em.getEdgesManipulator());
    }
    sortManipulators(edgesManipulators);
    return edgesManipulators.toArray(new EdgesManipulator[0]);
}
Also used : ArrayList(java.util.ArrayList) EdgesManipulator(org.gephi.datalab.spi.edges.EdgesManipulator) EdgesManipulatorBuilder(org.gephi.datalab.spi.edges.EdgesManipulatorBuilder)

Aggregations

ArrayList (java.util.ArrayList)1 EdgesManipulator (org.gephi.datalab.spi.edges.EdgesManipulator)1 EdgesManipulatorBuilder (org.gephi.datalab.spi.edges.EdgesManipulatorBuilder)1