Package org.openfaces.component.chart

Examples of org.openfaces.component.chart.ChartSelection


    }

    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) {
                itemRenderer = ((XYPlot) plot).getRenderer();
            } else if (plot instanceof CategoryPlot) {
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

    private void encodeChartSelection(FacesContext context, Chart chart) throws IOException {
        UIComponent component = chart.getChartSelection();
        if (component == null) return;

        ChartSelection chartSelection = (ChartSelection) component;
        chartSelection.encodeAll(context);
    }
View Full Code Here

TOP

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

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.