Examples of drawChars()


Examples of java.awt.Graphics2D.drawChars()

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

Examples of java.awt.Graphics2D.drawChars()

      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

Examples of java.awt.Graphics2D.drawChars()

      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

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

Examples of java.awt.Graphics2D.drawChars()

    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

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

Examples of java.awt.Graphics2D.drawChars()

    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

Examples of java.awt.Graphics2D.drawChars()

        {
            int msgWidth = g2d.getFontMetrics().charsWidth(verificationMessage, 0, verificationMessage.length);
            g2d.setColor(new Color(128, 128, 128, 128));
            g2d.fillRect(0, 0, getWidth(), getHeight());
            g2d.setColor(fontColor);
            g2d.drawChars(verificationMessage, 0, verificationMessage.length, getWidth()/2 - msgWidth/2, getHeight()/2);
        }
    }

    public void setVerifying(boolean b)
    {
View Full Code Here

Examples of java.awt.Graphics2D.drawChars()

            g.setFont(itFont);

            GlyphVector gv = itFont.createGlyphVector(frc, itchar);
            double charWitdth = gv.getVisualBounds().getWidth();

            g.drawChars(itchar, 0, itchar.length, startPosX, 35);
            startPosX = startPosX + (int) charWitdth;
        }
    }
}
View Full Code Here

Examples of java.awt.Graphics2D.drawChars()

        int pos = startData + i;
        // Draw notes
        if (noteData[pos % maxLen] != null) {
    int charWidth = g.getFontMetrics().charWidth('N');
    int charHeight = g.getFontMetrics().getAscent();
    g.drawChars(NOTE_CHAR, 0, 1, x + (int) (i * xspace) - charWidth/2, y + charHeight);

    // Save coordinate
    this.notesCoords[j][pos % maxLen] =
      new Point(x + (int) (i * xspace) - charWidth/2, y + charHeight);
        }
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.