Package org.openfaces.component.chart

Examples of org.openfaces.component.chart.LineStyle


            }
        } else if (lineStylesSpecified) {
            final Iterator strokesIterator = chartView.getLineStyles().iterator();
            for (int seriesIndex = 0; seriesIndex < seriesCount; seriesIndex++) {
                if (strokesIterator.hasNext()) {
                    final LineStyle lineStyle = (LineStyle) strokesIterator.next();
                    renderer.setSeriesStroke(seriesIndex, lineStyle.getStroke());
                }
            }
        }
    }
View Full Code Here


    private void setupGridChartSelection(Plot plot, GridChartView chartView) {
        if (chartView.getPoint() != null) {
            GridPointInfo point = chartView.getPoint();
            final ChartSelection selection = chartView.getChart().getChartSelection();

            final LineStyle lineStyle = selection.getLineStyle();
            Paint outlinePaint = lineStyle.getColor() != null
                    ? lineStyle.getColor()
                    : Color.BLUE;
            final Stroke outlineStroke = lineStyle.getStroke() != null
                    ? lineStyle.getStroke()
                    : new BasicStroke(5.0F, BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL);
            final Paint selectionPaint = selection.getFillPaint();

            Object itemRenderer = null;
            if (plot instanceof XYPlot) {
View Full Code Here

    private void setupPieChartSelection(PiePlot plot, Chart chart) {
        if (((PieChartView) chart.getChartView()).getSelectedSector() != null) {
            final PieSectorInfo info = ((PieChartView) chart.getChartView()).getSelectedSector();
            final ChartSelection selection = chart.getChartSelection();
            final LineStyle lineStyle = selection.getLineStyle();
            Paint outlinePaint = lineStyle.getColor() != null
                    ? lineStyle.getColor()
                    : Color.WHITE;
            final Stroke outlineStroke = lineStyle.getStroke();
            final Paint selectionPaint = selection.getFillPaint();

            plot.setSectionOutlinePaint(info.getIndex(), outlinePaint);
            if (outlineStroke != null) {
                plot.setSectionOutlineStroke(info.getIndex(), outlineStroke);
View Full Code Here

            }
        } else if (outlinesSpecified) {
            final Iterator outlinesIterator = view.getOutlines().iterator();
            for (int seriesIndex = 0; seriesIndex < seriesCount; seriesIndex++) {
                if (outlinesIterator.hasNext()) {
                    final LineStyle lineStyle = (LineStyle) outlinesIterator.next();
                    piePlot.setSectionOutlinePaint(seriesIndex, lineStyle.getColor());
                    piePlot.setSectionOutlineStroke(seriesIndex, lineStyle.getStroke());
                }
            }
        }
    }
View Full Code Here

            }
        } else if (outlinesSpecified) {
            final Iterator outlinesIterator = chartView.getOutlines().iterator();
            for (int seriesIndex = 0; seriesIndex < seriesCount; seriesIndex++) {
                if (outlinesIterator.hasNext()) {
                    final LineStyle lineStyle = (LineStyle) outlinesIterator.next();
                    renderer.setSeriesOutlinePaint(seriesIndex, lineStyle.getColor());
                    renderer.setSeriesOutlineStroke(seriesIndex, lineStyle.getStroke());
                }
            }
        }
    }
View Full Code Here

        String value = getPropertyValue(propertyName);
        if (setAsValueExpressionIfPossible(component, propertyName, value))
            return;

        final StyleObjectModel lineStyleCSSModel = CSSUtil.getLineStyleModel(value);
        final LineStyle lineStyle = PropertiesConverter.toLineStyle(lineStyleCSSModel.getBorder());
        component.getAttributes().put(propertyName, lineStyle);
    }
View Full Code Here

        }
        return stroke;
    }

    public static LineStyle toLineStyle(StyleBorderModel border) {
        return new LineStyle(border.getColor(), toStroke(border));
    }
View Full Code Here

        return gradients;
    }

    public LineStyle getPieChartOutline() {
        return new LineStyle(Color.WHITE, new BasicStroke(2.25f));
    }
View Full Code Here

    public Color getBlackColor() {
        return Color.BLACK;
    }

    public LineStyle getDefaultStroke() {
        return new LineStyle(new BasicStroke(3.0F));
    }
View Full Code Here

    public LineStyle getDefaultStroke() {
        return new LineStyle(new BasicStroke(3.0F));
    }

    public LineStyle getDefaultSelectionStyle() {
        return new LineStyle(new Color(0, 0, 255), new BasicStroke(5.0F, BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL));
    }
View Full Code Here

TOP

Related Classes of org.openfaces.component.chart.LineStyle

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.