Package java.awt

Examples of java.awt.Paint


   *
   */
  protected void configurePlot(Plot p, JRChartPlot jrPlot)
  {
    RectangleInsets defaultPlotInsets = (RectangleInsets)getDefaultValue(defaultPlotPropertiesMap, ChartThemesConstants.PLOT_INSETS);
    Paint defaultPlotOutlinePaint = (Paint)getDefaultValue(defaultPlotPropertiesMap, ChartThemesConstants.PLOT_OUTLINE_PAINT);
    Stroke defaultPlotOutlineStroke = (Stroke)getDefaultValue(defaultPlotPropertiesMap, ChartThemesConstants.PLOT_OUTLINE_STROKE);
    Boolean defaultPlotOutlineVisible = (Boolean)getDefaultValue(defaultPlotPropertiesMap, ChartThemesConstants.PLOT_OUTLINE_VISIBLE);
    if(defaultPlotInsets != null)
      p.setInsets(defaultPlotInsets);

View Full Code Here


    }
  }

  protected void setChartBackground(JFreeChart jfreeChart)
  {
    Paint defaultBackgroundPaint = (Paint)getDefaultValue(defaultChartPropertiesMap, ChartThemesConstants.BACKGROUND_PAINT);
    Image defaultBackgroundImage = (Image)getDefaultValue(defaultChartPropertiesMap, ChartThemesConstants.BACKGROUND_IMAGE);
    Integer defaultBackgroundImageAlignment = (Integer)getDefaultValue(defaultChartPropertiesMap, ChartThemesConstants.BACKGROUND_IMAGE_ALIGNMENT);
    Float defaultBackgroundImageAlpha = (Float)getDefaultValue(defaultChartPropertiesMap, ChartThemesConstants.BACKGROUND_IMAGE_ALPHA);

    if (getChart().getOwnModeValue() != null)
View Full Code Here

      if(isVisible)
      {
        BasicStroke stroke = (BasicStroke)getDefaultValue(defaultChartPropertiesMap, ChartThemesConstants.CHART_BORDER_STROKE);
        if(stroke != null)
          jfreeChart.setBorderStroke(stroke);
        Paint paint = (Paint)getDefaultValue(defaultChartPropertiesMap, ChartThemesConstants.CHART_BORDER_PAINT);
        if(paint != null)
          jfreeChart.setBorderPaint(paint);
      }
       
      jfreeChart.setBorderVisible(isVisible);
View Full Code Here

    }
  }

  protected void setPlotBackground(Plot p, JRChartPlot jrPlot)
  {
    Paint defaultBackgroundPaint = (Paint)getDefaultValue(defaultPlotPropertiesMap, ChartThemesConstants.PLOT_BACKGROUND_PAINT);
    Float defaultBackgroundAlpha = (Float)getDefaultValue(defaultPlotPropertiesMap, ChartThemesConstants.PLOT_BACKGROUND_ALPHA);
    Float defaultForegroundAlpha = (Float)getDefaultValue(defaultPlotPropertiesMap, ChartThemesConstants.PLOT_FOREGROUND_ALPHA);
   
    Image defaultBackgroundImage = (Image)getDefaultValue(defaultPlotPropertiesMap, ChartThemesConstants.PLOT_BACKGROUND_IMAGE);
    Integer defaultBackgroundImageAlignment = (Integer)getDefaultValue(defaultPlotPropertiesMap, ChartThemesConstants.PLOT_BACKGROUND_IMAGE_ALIGNMENT);
    Float defaultBackgroundImageAlpha = (Float)getDefaultValue(defaultPlotPropertiesMap, ChartThemesConstants.PLOT_BACKGROUND_IMAGE_ALPHA);

    Paint backgroundPaint = jrPlot.getOwnBackcolor() != null ? jrPlot.getOwnBackcolor() : defaultBackgroundPaint;
    if(backgroundPaint != null)
    {
      p.setBackgroundPaint(backgroundPaint);
    }
   
View Full Code Here

  protected void setAxisLine(Axis axis, Paint lineColor)
  {
    Boolean defaultAxisLineVisible = (Boolean)getDefaultValue(defaultAxisPropertiesMap, ChartThemesConstants.AXIS_LINE_VISIBLE);
    if(defaultAxisLineVisible != null && defaultAxisLineVisible.booleanValue())
    {
      Paint linePaint = lineColor != null ?
          lineColor :
          (Paint)getDefaultValue(defaultAxisPropertiesMap, ChartThemesConstants.AXIS_LINE_PAINT);
     
      if (linePaint != null)
      {
View Full Code Here

      RectangleInsets defaultLabelInsets = (RectangleInsets)getDefaultValue(defaultAxisPropertiesMap, ChartThemesConstants.AXIS_LABEL_INSETS);
      if(defaultLabelInsets != null)
      {
        axis.setLabelInsets(defaultLabelInsets);
      }
      Paint labelPaint = labelColor != null ?
          labelColor :
          (Paint)getDefaultValue(defaultAxisPropertiesMap, ChartThemesConstants.AXIS_LABEL_PAINT)
      if (labelPaint != null)
      {
        axis.setLabelPaint(labelPaint);
View Full Code Here

      RectangleInsets defaultTickLabelInsets = (RectangleInsets)getDefaultValue(defaultAxisPropertiesMap, ChartThemesConstants.AXIS_TICK_LABEL_INSETS);
      if(defaultTickLabelInsets != null)
      {
        axis.setTickLabelInsets(defaultTickLabelInsets);
      }
      Paint tickLabelPaint = tickLabelColor != null ?
          tickLabelColor :
          (Paint)getDefaultValue(defaultAxisPropertiesMap, ChartThemesConstants.AXIS_TICK_LABEL_PAINT)
      if (tickLabelPaint != null)
      {
        axis.setTickLabelPaint(tickLabelPaint);
View Full Code Here

     
      Float defaultAxisTickMarksOutsideLength = (Float)getDefaultValue(defaultAxisPropertiesMap, ChartThemesConstants.AXIS_TICK_MARKS_OUTSIDE_LENGTH);
      if(defaultAxisTickMarksOutsideLength != null)
        axis.setTickMarkInsideLength(defaultAxisTickMarksOutsideLength.floatValue());
     
      Paint tickMarkPaint = getDefaultValue(defaultAxisPropertiesMap, ChartThemesConstants.AXIS_TICK_MARKS_PAINT) != null ?
          (Paint)getDefaultValue(defaultAxisPropertiesMap, ChartThemesConstants.AXIS_TICK_MARKS_PAINT) :
          lineColor;
     
      if (tickMarkPaint != null)
      {
View Full Code Here

      }
    }
    chartPlot.setTickLabelsVisible(true);

    // Set all the colors we support
    Paint backgroundPaint = jrPlot.getOwnBackcolor() == null ? ChartThemesConstants.TRANSPARENT_PAINT : jrPlot.getOwnBackcolor();
    chartPlot.setBackgroundPaint(backgroundPaint);

    GradientPaint gp =
      new GradientPaint(
        new Point(), Color.LIGHT_GRAY,
        new Point(), Color.BLACK,
        false
        );
   
    if(jrPlot.getMeterBackgroundColor() != null)
    {
      chartPlot.setDialBackgroundPaint(jrPlot.getMeterBackgroundColor());
    }
    else
    {
      chartPlot.setDialBackgroundPaint(gp);
    }
    //chartPlot.setForegroundAlpha(1f);
    Paint needlePaint = jrPlot.getNeedleColor() == null ? new Color(191, 48, 0) : jrPlot.getNeedleColor();
    chartPlot.setNeedlePaint(needlePaint);

    JRValueDisplay display = jrPlot.getValueDisplay();
    if(display != null)
    {
View Full Code Here

    // Units can only be Fahrenheit, Celsius or none, so turn off for now.
    chartPlot.setUnits(ThermometerPlot.UNITS_NONE);

    // Set the color of the mercury.  Only used when the value is outside of
    // any defined ranges.
    Paint paint = jrPlot.getMercuryColor();
    if(paint != null)
    {
      chartPlot.setUseSubrangePaint(false);
    }
    else
View Full Code Here

TOP

Related Classes of java.awt.Paint

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.