Search in sources :

Example 1 with AttributeValueManipulatorBuilder

use of org.gephi.datalab.spi.values.AttributeValueManipulatorBuilder in project gephi by gephi.

the class DataLaboratoryHelper method getAttributeValueManipulators.

/**
     * <p>Prepares an array with one new instance of every AttributeValueManipulator
     * 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 AttributeValueManipulator implementations
     */
public AttributeValueManipulator[] getAttributeValueManipulators() {
    ArrayList<AttributeValueManipulator> attributeValueManipulators = new ArrayList<>();
    for (AttributeValueManipulatorBuilder am : Lookup.getDefault().lookupAll(AttributeValueManipulatorBuilder.class)) {
        attributeValueManipulators.add(am.getAttributeValueManipulator());
    }
    sortManipulators(attributeValueManipulators);
    return attributeValueManipulators.toArray(new AttributeValueManipulator[0]);
}
Also used : AttributeValueManipulator(org.gephi.datalab.spi.values.AttributeValueManipulator) AttributeValueManipulatorBuilder(org.gephi.datalab.spi.values.AttributeValueManipulatorBuilder) ArrayList(java.util.ArrayList)

Aggregations

ArrayList (java.util.ArrayList)1 AttributeValueManipulator (org.gephi.datalab.spi.values.AttributeValueManipulator)1 AttributeValueManipulatorBuilder (org.gephi.datalab.spi.values.AttributeValueManipulatorBuilder)1