Package org.gephi.graph.api

Examples of org.gephi.graph.api.EdgeData


        public SingleEdgePropertiesWrapper(Edge Edge) {
            this.edge = Edge;
        }

        public Color getEdgeColor() {
            EdgeData data = edge.getEdgeData();
            if(data.r()<0||data.g()<0||data.b()<0||data.alpha()<0){
                return null;//Not specific color for edge
            }

            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 setEdgeColor(Color c) {
            if (c != null) {
                EdgeData data = edge.getEdgeData();
                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 setEdgesColor(Color c) {
            if (c != null) {
                EdgesColor = c;
                EdgeData data;
                for (Edge edge : edges) {
                    data = edge.getEdgeData();
                    data.setR(c.getRed() / 255f);
                    data.setG(c.getGreen() / 255f);
                    data.setB(c.getBlue() / 255f);
                    data.setAlpha(c.getAlpha() / 255f);
                }
            }
        }
View Full Code Here

        this.controller = VizController.getInstance();
    }

    @Override
    public ModelImpl initModel(Renderable n) {
        EdgeData e = (EdgeData) n;
        Arrow2dModel arrow;
        if (controller.getVizModel().isUse3d()) {
            arrow = new Arrow3dModel(e);
        } else {
            arrow = new Arrow2dModel(e);
        }
        arrow.setObj(e.getTarget());

        return arrow;
    }
View Full Code Here

        this.controller = VizController.getInstance();
    }

    @Override
    public ModelImpl initModel(Renderable n) {
        EdgeData e = (EdgeData) n;

        ModelImpl<EdgeData> edge;
        if (controller.getVizModel().isUse3d()) {
            if (e.getEdge().isSelfLoop()) {
                edge = new SelfLoop3dModel();
            } else {
                edge = new Edge3dModel();
            }
        } else {
            if (e.getEdge().isSelfLoop()) {
                edge = new SelfLoop2dModel();
            } else {
                edge = new Edge2dModel();
            }
        }
        edge.setObj(e);
        e.setModel(edge);

        return edge;
    }
View Full Code Here

        public SingleEdgePropertiesWrapper(Edge Edge) {
            this.edge = Edge;
        }

        public Color getEdgeColor() {
            EdgeData data = edge.getEdgeData();
            if(data.r()<0||data.g()<0||data.b()<0||data.alpha()<0){
                return null;//Not specific color for edge
            }

            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 setEdgeColor(Color c) {
            if (c != null) {
                EdgeData data = edge.getEdgeData();
                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 setEdgesColor(Color c) {
            if (c != null) {
                edgesColor = c;
                EdgeData data;
                for (Edge edge : edges) {
                    data = edge.getEdgeData();
                    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.EdgeData

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.