Package org.gephi.partition.api

Examples of org.gephi.partition.api.Part


            }
            return false;
        }

        public boolean evaluate(Graph graph, Node node) {
            Part p = partition.getPart(node);
            if (p != null) {
                int partCount = p.getObjects().length;
                return range.isInRange(partCount);
            }
            return false;
        }
View Full Code Here


            }
            return false;
        }

        public boolean evaluate(Graph graph, Edge edge) {
            Part p = partition.getPart(edge);
            if (p != null) {
                int partCount = p.getObjects().length;
                return range.isInRange(partCount);
            }
            return false;
        }
View Full Code Here

        colorCol.setCellRenderer(new ColorChooserRenderer());
        colorCol.setPreferredWidth(16);
        colorCol.setMaxWidth(16);

        for (int j = 0; j < partsArray.length; j++) {
            final Part p = partsArray[partsArray.length - 1 - j];
            model.setValueAt(p.getValue(), j, 0);
            model.setValueAt(p.getDisplayName(), j, 1);
            String perc = "(" + formatter.format(p.getPercentage()) + ")";
            model.setValueAt(perc, j, 2);
        }
    }
View Full Code Here

        colorCol.setCellRenderer(new ColorChooserRenderer());
        colorCol.setPreferredWidth(16);
        colorCol.setMaxWidth(16);

        for (int j = 0; j < partsArray.length; j++) {
            final Part p = partsArray[partsArray.length - 1 - j];
            model.setValueAt(p.getValue(), j, 0);
            model.setValueAt(p.getDisplayName(), j, 1);
            String perc = "(" + formatter.format(p.getPercentage()) + ")";
            model.setValueAt(perc, j, 2);
        }
    }
View Full Code Here

        Set<Part> filterParts = new HashSet<Part>(currentParts);
        Part[] parts = partition.getParts();
        Arrays.sort(parts);
        for (int i = 0; i < parts.length; i++) {
            final Part p = parts[parts.length - 1 - i];
            PartWrapper pw = new PartWrapper(p, p.getColor());
            pw.setEnabled(filterParts.contains(p));
            model.add(i, pw);
        }
        list.setModel(model);
    }
View Full Code Here

        Set<Part> filterParts = new HashSet<Part>(currentParts);
        Part[] parts = partition.getParts();
        Arrays.sort(parts);
        for (int i = 0; i < parts.length; i++) {
            final Part p = parts[parts.length - 1 - i];
            PartWrapper pw = new PartWrapper(p, p.getColor());
            pw.setEnabled(filterParts.contains(p));
            model.add(i, pw);
        }
        list.setModel(model);
    }
View Full Code Here

TOP

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

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.