Package org.gephi.utils.sparklines

Examples of org.gephi.utils.sparklines.SparklineParameters


    }

    @Override
    public void execute() {
        //Show interactive sparkline window:
        SparklineParameters parameters = new SparklineParameters(200, 20, SparklineParameters.DEFAULT_LINE_COLOR, new Color(225, 255, 255), Color.RED, Color.GREEN);//Dimension is automatically updated by SparklineComponent
        parameters.setHighlightTextColor(SparklineParameters.DEFAULT_TEXT_COLOR);
        parameters.setHighlightTextBoxColor(SparklineParameters.DEFAULT_TEXT_BOX_COLOR);
        SparklineComponent sparklineUI = new SparklineComponent(xValues, yValues, parameters, true);//True makes it interactive to mouse
        sparklineUI.setPreferredSize(new Dimension(200, 20));//Initial size
        //Using Netbeans RCP Dialogs API:       
        DialogDescriptor dd = new DialogDescriptor(sparklineUI, column.getTitle());
        dd.setModal(false);
View Full Code Here


        } else {
            background = UNSELECTED_BACKGROUND;
        }

        //Note: Can't use interactive SparklineComponent because TableCellEditors don't receive mouse events.
        final SparklineParameters sparklineParameters = new SparklineParameters(table.getColumnModel().getColumn(column).getWidth() - 1, table.getRowHeight(row) - 1, Color.BLUE, background, Color.RED, Color.GREEN, null);
        final BufferedImage i = SparklineGraph.draw(xValues, yValues, sparklineParameters);
        label.setIcon(new ImageIcon(i));
        label.setToolTipText(stringRepresentation);//String representation as tooltip

        return label;
View Full Code Here

            if (chart != null) {
                double minX = chart.getMinX().doubleValue();
                double maxX = chart.getMaxX().doubleValue();
                int sparklineWidth = (int) (((maxX - minX) / (max - min)) * width);

                parameters = new SparklineParameters(sparklineWidth, height);
                parameters.setTransparentBackground(true);
                parameters.setDrawArea(true);

                image = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
                int sparklineX = (int) ((minX - min) / (max - min) * width);
 
View Full Code Here

TOP

Related Classes of org.gephi.utils.sparklines.SparklineParameters

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.