Package org.openfaces.renderkit.cssparser

Examples of org.openfaces.renderkit.cssparser.StyleBorderModel


*/
class AxisUtil {

    public static void setupAxisPresentation(String label, Axis axis, FakeAxisStyle axisStyle) {
        StyleObjectModel model = axisStyle.getStyleObjectModel();
        StyleBorderModel border = model.getBorder();
        if (border != null) {
            if (border.getColor() != null) {
                axis.setAxisLinePaint(border.getColor());
            }

            if (!border.isNone()) {
                axis.setAxisLineVisible(true);
                axis.setAxisLineStroke(PropertiesConverter.toStroke(border));
                axis.setTickMarkPaint(border.getColor());
                axis.setTickMarksVisible(true);
                if (!axis.isTickMarksVisible())
                    axis.setTickMarksVisible(false);
            }

            if (border.getStyle().equalsIgnoreCase("none")) {
                axis.setAxisLineVisible(false);
                axis.setTickMarksVisible(false);
                if (axis.isTickMarksVisible())
                    axis.setTickMarksVisible(true);
            }
View Full Code Here


            if (showInLegend != null)
                renderer.setSeriesVisibleInLegend(j, showInLegend);

            StyleObjectModel linePropertiesStyleModel = lineProperties.getStyleObjectModel();
            if (linePropertiesStyleModel != null && lineProperties.getStyleObjectModel().getBorder() != null) {
                StyleBorderModel model = lineProperties.getStyleObjectModel().getBorder();
                Color color = model.getColor();
                if (color != null)
                    renderer.setSeriesPaint(j, color);
                renderer.setSeriesLinesVisible(j, Boolean.valueOf(!model.isNone()));
                renderer.setSeriesStroke(j, PropertiesConverter.toStroke(model));
            }

        }
    }
View Full Code Here

            if (showInLegend != null)
                renderer.setSeriesVisibleInLegend(j, showInLegend);

            StyleObjectModel linePropertiesStyleModel = lineProperties.getStyleObjectModel();
            if (linePropertiesStyleModel != null && linePropertiesStyleModel.getBorder() != null) {
                StyleBorderModel model = linePropertiesStyleModel.getBorder();
                Color color = model.getColor();
                if (color != null)
                    renderer.setSeriesPaint(j, color);
                renderer.setSeriesLinesVisible(j, Boolean.valueOf(!model.isNone()));
                renderer.setSeriesStroke(j, PropertiesConverter.toStroke(model));
            }

        }
    }
View Full Code Here

            plot.setBackgroundPaint(null);
        } else {
            plot.setBackgroundPaint(cssChartViewModel.getBackground());
        }

        StyleBorderModel border = cssChartViewModel.getBorder();
        plot.setOutlinePaint(border == null || border.isNone()
                ? cssChartViewModel.getBackground()
                : border.getColor());
    }
View Full Code Here

            if (styleModel.getColor() != null) {
                setPaint(styleModel.getColor());
            }

            StyleBorderModel border = styleModel.getBorder();
            if (border != null) {
                if (!border.isNone() && border.getColor() != null) {
                    BlockBorder bb = new BlockBorder(border.getColor());
                    setBorder(bb);
                }
            }

            setMargin(styleModel.getMargin(0), styleModel.getMargin(1), styleModel.getMargin(2), styleModel.getMargin(3));
View Full Code Here

        if (cssChartModel != null) {
            if (!chartBackgroundPaintDefined) {
                setBackgroundPaint(cssChartModel.getBackground());
            }

            StyleBorderModel border = cssChartModel.getBorder();
            if (border != null && !border.isNone()) {
                setBorderPaint(border.getColor());
                setBorderVisible(true);
            } else {
                setBorderVisible(false);
            }
        }
View Full Code Here

            setBackgroundPaint(chart.getChartView().getBackgroundPaint());
        } else {
            setBackgroundPaint(cssLegendModel.getBackground());
        }

        StyleBorderModel border = cssLegendModel.getBorder();

        if (border != null && !border.isNone()) {
            setBorder(new BlockBorder(border.getColor()));
        } else {
            setBorder(new BlockBorder(cssLegendModel.getBackground()));
        }

        setMargin(cssLegendModel.getMargin(0), cssLegendModel.getMargin(1), cssLegendModel.getMargin(2), cssLegendModel.getMargin(3));
View Full Code Here

                            plot.setExplodePercent(index, (double) sectorPulled);
                        }

                        StyleObjectModel cssSectorModel = sector.getStyleObjectModel();
                        if (cssSectorModel != null && cssSectorModel.getBorder() != null) {
                            StyleBorderModel border = cssSectorModel.getBorder();
                            Color borderColor = border.getColor();
                            if (borderColor != null) {
                                plot.setSectionOutlinePaint(index, borderColor);
                                plot.setSectionOutlineStroke(index, PropertiesConverter.toStroke(border));
                            }

                            Color sectorModelColor = cssSectorModel.getColor();
                            if (sectorModelColor != null) {
                                plot.setSectionPaint(index, sectorModelColor);
                            }
                        }
                    }
                }
            } else {
                if (dataset == null || dataset.getKeys() == null)
                    continue;

                for (int j = 0; j < dataset.getKeys().size(); j++) {
                    index++;

                    boolean conditionValue = generator.getConditionValue(sector, 0, dataset, dataset.getKey(j));
                    if (!conditionValue)
                        continue;

                    if (sectorPulled != null && sectorPulled > 0) {
                        plot.setExplodePercent(index, (double) sectorPulled);
                    }

                    StyleObjectModel cssSectorModel = sector.getStyleObjectModel();
                    if (cssSectorModel != null && cssSectorModel.getBorder() != null) {
                        StyleBorderModel border = cssSectorModel.getBorder();
                        if (border.getColor() != null) {
                            plot.setSectionOutlinePaint(index, border.getColor());
                            plot.setSectionOutlineStroke(index, PropertiesConverter.toStroke(border));
                        }

                    }
                    if (cssSectorModel != null && cssSectorModel.getColor() != null) {
View Full Code Here

                            plot.setExplodePercent(index, (double) sectorPulled);
                        }

                        StyleObjectModel cssSectorModel = sector.getStyleObjectModel();
                        if (cssSectorModel != null && cssSectorModel.getBorder() != null) {
                            StyleBorderModel border = cssSectorModel.getBorder();
                            Color borderColor = border.getColor();
                            if (borderColor != null) {
                                plot.setSectionOutlinePaint(index, borderColor);
                                plot.setSectionOutlineStroke(index, PropertiesConverter.toStroke(border));
                            }

                            Color sectorModelColor = cssSectorModel.getColor();
                            if (sectorModelColor != null) {
                                plot.setSectionPaint(index, sectorModelColor);
                            }
                        }
                    }
                }
            } else {
                if (dataset == null || dataset.getKeys() == null)
                    continue;

                for (int j = 0; j < dataset.getKeys().size(); j++) {
                    index++;

                    boolean conditionValue = generator.getConditionValue(sector, 0, dataset, dataset.getKey(j));
                    if (!conditionValue)
                        continue;

                    if (sectorPulled != null && sectorPulled > 0) {
                        plot.setExplodePercent(index, (double) sectorPulled);
                    }

                    StyleObjectModel cssSectorModel = sector.getStyleObjectModel();
                    if (cssSectorModel != null && cssSectorModel.getBorder() != null) {
                        StyleBorderModel border = cssSectorModel.getBorder();
                        if (border.getColor() != null) {
                            plot.setSectionOutlinePaint(index, border.getColor());
                            plot.setSectionOutlineStroke(index, PropertiesConverter.toStroke(border));
                        }

                    }
                    if (cssSectorModel != null && cssSectorModel.getColor() != null) {
View Full Code Here

TOP

Related Classes of org.openfaces.renderkit.cssparser.StyleBorderModel

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.