Package org.gephi.graph.api

Examples of org.gephi.graph.api.NodeData


        public SingleNodePropertiesWrapper(Node node) {
            this.node = node;
        }

        public Color getNodeColor() {
            NodeData data = node.getNodeData();
            return new Color(data.r(), data.g(), data.b(), data.alpha());
        }
View Full Code Here


            return new Color(data.r(), data.g(), data.b(), data.alpha());
        }

        public void setNodeColor(Color c) {
            if (c != null) {
                NodeData data = node.getNodeData();
                data.setR(c.getRed() / 255f);
                data.setG(c.getGreen() / 255f);
                data.setB(c.getBlue() / 255f);
                data.setAlpha(c.getAlpha() / 255f);
            }
        }
View Full Code Here

        }

        public void setNodesColor(Color c) {
            if (c != null) {
                nodesColor = c;
                NodeData data;
                for (Node node : nodes) {
                    data = node.getNodeData();
                    data.setR(c.getRed() / 255f);
                    data.setG(c.getGreen() / 255f);
                    data.setB(c.getBlue() / 255f);
                    data.setAlpha(c.getAlpha() / 255f);
                }
            }
        }
View Full Code Here

TOP

Related Classes of org.gephi.graph.api.NodeData

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.