Package org.gephi.preview.api

Examples of org.gephi.preview.api.Color


    public void renderGraphLabelBorders(Graph graph) {
    }

    public void renderNode(Node node) {
        Point center = node.getPosition();
        Color c = node.getColor();
        Color bc = node.getBorderColor();

        cb.setRGBColorStroke(bc.getRed(), bc.getGreen(), bc.getBlue());
        cb.setLineWidth(node.getBorderWidth());
        cb.setRGBColorFill(c.getRed(), c.getGreen(), c.getBlue());
        cb.circle(center.getX(), -center.getY(), node.getRadius());
        cb.fillStroke();
    }
View Full Code Here


     * Colors the given client.
     *
     * @param client  the client to color
     */
    public void color(NodeColorizerClient client) {
        Color color = client.getOriginalColor();
        client.setColor(color);
    }
View Full Code Here

     * Returns the red component.
     *
     * @return the red component
     */
    public Integer getRed() {
        Color c1 = colorHolder1.getComponent();
        Color c2 = colorHolder2.getComponent();
        return (c1.getRed() + c2.getRed()) / 2;
    }
View Full Code Here

     * Returns the green component.
     *
     * @return the green component
     */
    public Integer getGreen() {
        Color c1 = colorHolder1.getComponent();
        Color c2 = colorHolder2.getComponent();
        return (c1.getGreen() + c2.getGreen()) / 2;
    }
View Full Code Here

     * Returns the blue component.
     *
     * @return the blue component
     */
    public Integer getBlue() {
        Color c1 = colorHolder1.getComponent();
        Color c2 = colorHolder2.getComponent();
        return (c1.getBlue() + c2.getBlue()) / 2;
    }
View Full Code Here

     * Formats the color as an hex string.
     *
     * @return  the color formatted as an hex string
     */
    public String toHexString() {
        Color c = new SimpleColor(getRed(), getGreen(), getBlue());
        return c.toHexString();
    }
View Full Code Here

TOP

Related Classes of org.gephi.preview.api.Color

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.