Package java.awt

Examples of java.awt.Graphics2D.drawChars()


    Graphics2D graphics2D = img.createGraphics();
    graphics2D.setBackground(paintData.getBackground());
    graphics2D.setColor(paintData.getDrawColor());
    graphics2D.clearRect(0,0,paintData.getWidth(),paintData.getHeight());
    graphics2D.drawLine(5,5,paintData.getWidth()-5,paintData.getHeight()-5);
    graphics2D.drawChars(new String("RichFaces").toCharArray(),0,9,40,15);
    graphics2D.drawChars(new String("mediaOutput").toCharArray(),0,11,5,45);
   
    ImageIO.write(img,"jpeg",out);
   
    }
View Full Code Here


    graphics2D.setBackground(paintData.getBackground());
    graphics2D.setColor(paintData.getDrawColor());
    graphics2D.clearRect(0,0,paintData.getWidth(),paintData.getHeight());
    graphics2D.drawLine(5,5,paintData.getWidth()-5,paintData.getHeight()-5);
    graphics2D.drawChars(new String("RichFaces").toCharArray(),0,9,40,15);
    graphics2D.drawChars(new String("mediaOutput").toCharArray(),0,11,5,45);
   
    ImageIO.write(img,"jpeg",out);
   
    }
  }
View Full Code Here

    Graphics2D graphics2D = img.createGraphics();
    graphics2D.setBackground(paintData.getBackground());
    graphics2D.setColor(paintData.getDrawColor());
    graphics2D.clearRect(0,0,paintData.getWidth(),paintData.getHeight());
    graphics2D.drawLine(5,5,paintData.getWidth()-5,paintData.getHeight()-5);
    graphics2D.drawChars(new String("RichFaces").toCharArray(),0,9,40,15);
    graphics2D.drawChars(new String("mediaOutput").toCharArray(),0,11,5,45);
   
    ImageIO.write(img,"jpeg",out);
   
    }
View Full Code Here

    graphics2D.setBackground(paintData.getBackground());
    graphics2D.setColor(paintData.getDrawColor());
    graphics2D.clearRect(0,0,paintData.getWidth(),paintData.getHeight());
    graphics2D.drawLine(5,5,paintData.getWidth()-5,paintData.getHeight()-5);
    graphics2D.drawChars(new String("RichFaces").toCharArray(),0,9,40,15);
    graphics2D.drawChars(new String("mediaOutput").toCharArray(),0,11,5,45);
   
    ImageIO.write(img,"jpeg",out);
   
    }
  }
View Full Code Here

      Graphics2D graphics2D = img.createGraphics();
      graphics2D.setBackground(paintData.getBackground());
      graphics2D.setColor(paintData.getDrawColor());
      graphics2D.clearRect(0,0,paintData.getWidth(),paintData.getHeight());
      graphics2D.drawLine(5,5,paintData.getWidth()-5,paintData.getHeight()-5);
      graphics2D.drawChars(new String("RichFaces").toCharArray(),0,9,40,15);
      graphics2D.drawChars(new String("mediaOutput").toCharArray(),0,11,5,45);

      ImageIO.write(img,"jpeg",out);

    }
View Full Code Here

      graphics2D.setBackground(paintData.getBackground());
      graphics2D.setColor(paintData.getDrawColor());
      graphics2D.clearRect(0,0,paintData.getWidth(),paintData.getHeight());
      graphics2D.drawLine(5,5,paintData.getWidth()-5,paintData.getHeight()-5);
      graphics2D.drawChars(new String("RichFaces").toCharArray(),0,9,40,15);
      graphics2D.drawChars(new String("mediaOutput").toCharArray(),0,11,5,45);

      ImageIO.write(img,"jpeg",out);

    }
  }
View Full Code Here

            * (i - start), fontHeight);

        // draw chars up to this point
        g.setColor(nfg);
        for (int k=start; k<i; k++) {
          g.drawChars(data.text, offset + k, 1, k
              * fontWidth, j * fontHeight + fontYOffset);
        }
        start = i;
      }
    }
View Full Code Here

      messageFormat.setFormatByArgumentIndex(0, dateFormat);     
      messageFormat.setFormatByArgumentIndex(1, PlotConstants.DECIMAL_FORMAT);
      g2.setColor(TRANSLUCENT_WHITE);
      g2.fillRect(mouseStartX, mouseStartY - fontMetrics.getHeight() - 2, fontMetrics.stringWidth(startPoint), fontMetrics.getHeight());
      g2.setColor(START_POINT_FOREGROUND);
          g2.drawChars(startPoint.toCharArray(), 0, startPoint.length(), mouseStartX, mouseStartY - 4);

      p = convertPointToLogicalCoord(mouseEndX, mouseEndY);         
          String endPoint = messageFormat.format(new Object[]{p.getX(), p.getY()});
      messageFormat.setFormatByArgumentIndex(0, dateFormat);     
      messageFormat.setFormatByArgumentIndex(1, PlotConstants.DECIMAL_FORMAT);
View Full Code Here

      messageFormat.setFormatByArgumentIndex(0, dateFormat);     
      messageFormat.setFormatByArgumentIndex(1, PlotConstants.DECIMAL_FORMAT);
      g2.setColor(TRANSLUCENT_WHITE);
      g2.fillRect(mouseEndX, mouseEndY - fontMetrics.getHeight() - 2, fontMetrics.stringWidth(endPoint), fontMetrics.getHeight());
      g2.setColor(END_POINT_FOREGROUND);
          g2.drawChars(endPoint.toCharArray(), 0, endPoint.length(), mouseEndX, mouseEndY - 4);
    }

  }

}
View Full Code Here

    Graphics2D graphics2D = img.createGraphics();
    graphics2D.setBackground(paintData.getBackground());
    graphics2D.setColor(paintData.getDrawColor());
    graphics2D.clearRect(0,0,paintData.getWidth(),paintData.getHeight());
    graphics2D.drawLine(5,5,paintData.getWidth()-5,paintData.getHeight()-5);
    graphics2D.drawChars(new String("RichFaces").toCharArray(),0,9,40,15);
    graphics2D.drawChars(new String("mediaOutput").toCharArray(),0,11,5,45);
   
    ImageIO.write(img,"jpeg",out);
   
    }
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.