Package org.gephi.appearance.spi

Examples of org.gephi.appearance.spi.TransformerCategory


    private void initSelectedTransformerUIs(String elementClass) {
        Map<TransformerCategory, TransformerUI> newMap = new HashMap<TransformerCategory, TransformerUI>();
        for (Function func : elementClass.equals(AppearanceUIController.NODE_ELEMENT) ? appearanceModel.getNodeFunctions() : appearanceModel.getEdgeFunctions()) {
            TransformerUI ui = func.getUI();
            if (ui != null) {
                TransformerCategory cat = ui.getCategory();
                if (!newMap.containsKey(cat)) {
                    newMap.put(cat, ui);
                }

                if (!selectedCategory.containsKey(elementClass)) {
View Full Code Here


        return selectedFunction.get(selectedElementClass).get(getSelectedTransformerUI());
    }

    public AutoAppyTransformer getAutoAppyTransformer() {
        String elm = getSelectedElementClass();
        TransformerCategory ct = getSelectedCategory();
        if (ct != null) {
            return selectedAutoTransformer.get(elm).get(ct);
        }
        return null;
    }
View Full Code Here

            if (aat != null) {
                aat.stop();
            }
        }
        String elmt = getSelectedElementClass();
        TransformerCategory cat = getSelectedCategory();
        if (autoApply) {
            selectedAutoTransformer.get(elmt).put(cat, new AutoAppyTransformer(controller, getSelectedFunction()));
        } else {
            selectedAutoTransformer.get(elmt).put(cat, null);
        }
View Full Code Here

            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);
View Full Code Here

        }
    }

    public void setSelectedCategory(TransformerCategory category) {
        if (model != null) {
            TransformerCategory oldValue = model.getSelectedCategory();
            if (!oldValue.equals(category)) {
                model.setSelectedCategory(category);
                firePropertyChangeEvent(AppearanceUIModelEvent.SELECTED_CATEGORY, oldValue, category);
            }
        }
    }
View Full Code Here

                int index = 0;
                for (String elmtType : AppearanceUIController.ELEMENT_CLASSES) {
                    ButtonGroup g = buttonGroups.get(index);
                    boolean active = model.getSelectedElementClass().equals(elmtType);
                    g.clearSelection();
                    TransformerCategory c = model.getSelectedCategory();
                    String selected = c.getDisplayName();
                    for (Enumeration<AbstractButton> btns = g.getElements(); btns.hasMoreElements();) {
                        AbstractButton btn = btns.nextElement();
                        btn.setVisible(active);
                        if (btn.getName().equals(selected)) {
                            g.setSelected(btn.getModel(), true);
View Full Code Here

TOP

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

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.