Package org.gephi.preview.plugin.items

Examples of org.gephi.preview.plugin.items.EdgeLabelItem


        VisualizationController vizController = Lookup.getDefault().lookup(VisualizationController.class);
        Column[] edgeColumns = vizController != null ? vizController.getEdgeTextColumns() : null;

        List<Item> items = new ArrayList<Item>();
        for (Edge e : graph.getEdges()) {
            EdgeLabelItem labelItem = new EdgeLabelItem(e);
            String label = getLabel(e, edgeColumns, graph.getView());
            labelItem.setData(EdgeLabelItem.LABEL, label);
            TextProperties textData = e.getTextProperties();
            if (textData != null && useTextData) {
                if (textData.getAlpha() != 0) {
                    labelItem.setData(EdgeLabelItem.COLOR, textData.getColor());
                }
//                labelItem.setData(EdgeLabelItem.WIDTH, textData.getWidth());
//                labelItem.setData(EdgeLabelItem.HEIGHT, textData.getHeight());
                labelItem.setData(EdgeLabelItem.SIZE, textData.getSize());
                labelItem.setData(EdgeLabelItem.VISIBLE, textData.isVisible());
                if (textData.isVisible() && textData.getText() != null && !textData.getText().isEmpty()) {
                    items.add(labelItem);
                }
            } else if (label != null && !label.isEmpty()) {
                items.add(labelItem);
View Full Code Here

TOP

Related Classes of org.gephi.preview.plugin.items.EdgeLabelItem

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.