Package org.gephi.partition.api

Examples of org.gephi.partition.api.Partition


        createPopup();
    }

    public void setup(final PartitionFilter filter) {
        this.filter = filter;
        final Partition partition = filter.getCurrentPartition();
        if (partition != null) {
            refresh(partition, filter.getParts());
        }
    }
View Full Code Here


        }
    }

    public void setNodePartition(Partition nodePartition) {
        if (nodePartition != this.nodePartition) {
            Partition oldValue = this.nodePartition;
            this.nodePartition = nodePartition;
            firePropertyChangeEvent(NODE_PARTITION, oldValue, nodePartition);
        }
    }
View Full Code Here

        }
    }

    public void setEdgePartition(Partition edgePartition) {
        if (edgePartition != this.edgePartition) {
            Partition oldValue = this.edgePartition;
            this.edgePartition = edgePartition;
            firePropertyChangeEvent(EDGE_PARTITION, oldValue, edgePartition);
        }
    }
View Full Code Here

        createPopup();
    }

    public void setup(final PartitionFilter filter) {
        this.filter = filter;
        final Partition partition = filter.getCurrentPartition();
        if (partition != null) {
            refresh(partition, filter.getParts());
        }
    }
View Full Code Here

        iterator = nodes.iterator();
        while (iterator.hasNext()) {
            iterator.next().getNodeData().getAttributes().setValue(testCol.getIndex(), Boolean.TRUE);
        }
        PartitionController partitionController1 = Lookup.getDefault().lookup(PartitionController.class);
        Partition p1 = partitionController1.buildPartition(attributeModel.getNodeTable().getColumn("isEnriched"), H);

        ArrayList<Color> colors = new ArrayList<Color>();
        colors.add(Color.CYAN);
        colors.add(Color.RED);

        HashMap<Object, Color> map = new HashMap<Object, Color>();
        int i = 0;
        for (Part p : p1.getParts()) {
            map.put(p.getValue(), colors.get(i));
            i++;
        }
        for (Part<Node> part : p1.getParts()) {
            Color color = map.get(part.getValue());
            part.setColor(color);
            float r = color.getRed() / 255f;
            float g = color.getGreen() / 255f;
            float b = color.getBlue() / 255f;
View Full Code Here

TOP

Related Classes of org.gephi.partition.api.Partition

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.