Package java.awt

Examples of java.awt.Paint


     * background of the projection will be returned.
     *
     * @return color java.awt.Color.
     */
    public Paint getBckgrnd() {
        Paint ret = background;
        if (ret == null) {
            // ret = projection.getBackgroundColor();
            ret = super.getBackground();
        }
        return ret;
View Full Code Here


        int pheight = 512;

        AcmeGifFormatter formatter = new AcmeGifFormatter();
        Graphics graphics = formatter.getGraphics(pwidth, pheight);

        Paint background;
        if (map == null) {
            background = MapBean.DEFAULT_BACKGROUND_COLOR;
        } else {
            background = map.getBckgrnd();
        }
View Full Code Here

    boolean hasChanged = false;
    for (int i=0; i<mapperSources.size(); ++i) {
      if (ds.equals(mapperSources.get(i))) {
        ColorMapper cm = (ColorMapper)mappers.get(i);
        if (cm!=null) {
          Paint p1 = hasChanged ? null : plot.getSectionPaint(i);
          plot.setSectionPaint(i,cm.getPaint(ds,index));
          // check colors only if useful => when one color changed, don't check the others
          if (!hasChanged) {
            Paint p2 = plot.getSectionPaint(i);
            if (!p1.equals(p2)) hasChanged = true;
          }
        }
      }
    }
View Full Code Here

    boolean hasChanged = false;
    for (int i=0; i<mapperSources.size(); ++i) {
      if (ds.equals(mapperSources.get(i))) {
        ColorMapper cm = (ColorMapper)mappers.get(i);
        if (cm!=null) {
          Paint p1 = hasChanged ? null : renderer.getSeriesPaint(i);
          renderer.setSeriesPaint(i,cm.getPaint(ds,index));
          // check colors only if useful => when one color changed, don't check the others
          if (!hasChanged) {
            Paint p2 = renderer.getSeriesPaint(i);
            if (!p1.equals(p2)) hasChanged = true;
          }
        }
      }
    }
View Full Code Here

  }

  public DrawingSupplier getDrawingSupplier() {
    if (supplier==null) supplier = new DefaultDrawingSupplier() {
      public Paint getNextPaint() {
        Paint p = super.getNextPaint();
        if ((x_ary>1) && (p instanceof Color)) {
          Color c = ((Color)p);
          float[] hsb = Color.RGBtoHSB(c.getRed(),c.getGreen(),c.getBlue(),new float[3]);
          hsb[0] += 0.1 * (x_ary-1);
          if (hsb[0]>1) hsb[0] -=1;
View Full Code Here

  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

  /* (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

        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

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

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

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.