Package org.gephi.appearance.spi

Examples of org.gephi.appearance.spi.Transformer


        Map<Class, Transformer> tMap = new HashMap<Class, Transformer>();
        for (Transformer t : Lookup.getDefault().lookupAll(Transformer.class)) {
            tMap.put(t.getClass(), t);
        }
        for (TransformerUI ui : Lookup.getDefault().lookupAll(TransformerUI.class)) {
            Transformer t = tMap.get(ui.getTransformerClass());
            if (t != null) {
                TransformerCategory c = ui.getCategory();
                if (t.isNode()) {
                    Set<TransformerUI> uis = transformers.get(NODE_ELEMENT).get(c);
                    if (uis == null) {
                        uis = new LinkedHashSet<TransformerUI>();
                        transformers.get(NODE_ELEMENT).put(c, uis);
                    }
                    uis.add(ui);
                }
                if (t.isEdge()) {
                    Set<TransformerUI> uis = transformers.get(EDGE_ELEMENT).get(c);
                    if (uis == null) {
                        uis = new LinkedHashSet<TransformerUI>();
                        transformers.get(EDGE_ELEMENT).put(c, uis);
                    }
View Full Code Here


    }

    @Override
    public Transformer getTransformer(TransformerUI ui) {
        Class<? extends Transformer> transformerClass = ui.getTransformerClass();
        Transformer transformer = Lookup.getDefault().lookup(transformerClass);
        if (transformer != null) {
            return transformer;
        }
        return null;
    }
View Full Code Here

TOP

Related Classes of org.gephi.appearance.spi.Transformer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.