Examples of Paint


Examples of java.awt.Paint

  public Paint getItemPaint(JSynopticXYItemRenderer renderer, int row, int column) {
    ColorMapper colorMapper = getColorMapper(row);
   
    if (colorMapper!=null) {
      DataSource ds = getDataSource(row);
      Paint ret;
      try {
        ret = colorMapper.getPaint(ds,ds.getStartIndex()+column);
      } catch (UnsupportedOperation e) {
        ret = null;
      }
View Full Code Here

Examples of java.awt.Paint

  /* (non-Javadoc)
   * @see org.jfree.chart.renderer.AbstractRenderer#getSeriesPaint(int)
   */
  public Paint getSeriesPaint(JSynopticXYItemRenderer renderer, int series) {
    // Make sure we return a Color
    Paint ret = renderer.getDefaultSeriesPaint(series);
    if (ret instanceof Color) return ret;
    return Color.black;
  }
View Full Code Here

Examples of java.awt.Paint

        viewRect.width = getWidth() - (i.right + viewRect.x);
        viewRect.height = getHeight() - (i.bottom + viewRect.y);
       
        // paint gradient
        Graphics2D g2 = (Graphics2D)g;
        Paint gradient = new GradientPaint(
            0, 0, fromColor,
            viewRect.width, viewRect.height, toColor );
        g2.setPaint( gradient );
        g2.fillRect( viewRect.x, viewRect.y,
            viewRect.width, viewRect.height );
View Full Code Here

Examples of java.awt.Paint

      }
    }
    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

Examples of java.awt.Paint

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

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

Examples of java.awt.Paint

    }
  }

  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

Examples of java.awt.Paint

      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

Examples of java.awt.Paint

    }
  }

  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

Examples of java.awt.Paint

  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
TOP
Copyright © 2018 www.massapi.com. 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.