Package org.freehep.graphics2d

Examples of org.freehep.graphics2d.VectorGraphics.drawString()


    g.fillRect(0, 0, UpperRightGraph.x + RIGHT_SPACE, UpperLeftGraph.y - 10);
    g.setColor(Color.BLACK);
    g.drawRect(0, 0, UpperRightGraph.x + RIGHT_SPACE, UpperLeftGraph.y - 10);
    Font fn = new Font("Arial", Font.ITALIC, 16);
    g.setFont(fn);
    g.drawString("Single left click and drag to zoom, single right click to choose scatter options", 50, 20);
    // Bordi neri del grafico
    g.setColor(Color.BLACK);
    g.drawLine(UpperLeftGraph.x - 1, UpperLeftGraph.y - 1, UpperRightGraph.x, UpperRightGraph.y - 1); //UP
    g.drawLine(UpperLeftGraph.x - 1, UpperLeftGraph.y - 1, LowerLeftGraph.x - 1, LowerLeftGraph.y); //LEFT
    g.drawLine(LowerLeftGraph.x, LowerLeftGraph.y, LowerRightGraph.x, LowerRightGraph.y); //BOTTOM
View Full Code Here


    g.drawLine(LowerRightGraph.x, LowerRightGraph.y, UpperRightGraph.x, UpperRightGraph.y); //RIGHT

    // Testo variabile in x
    fn = new Font("Arial", Font.PLAIN, 15);
    g.setFont(fn);
    g.drawString(model.getMatrix().getVariables()[xVar].getName(), XText.x, XText.y);
    // Elenco etichette valori in Y
    fn = new Font("Arial", Font.PLAIN, 9);
    g.setFont(fn);
    for (int i = 0; i <= 9; i++) {
      if (model.getMatrix().getVariables()[yVar].getType() == JWATConstants.DATE) {
View Full Code Here

    fn = new Font("Arial", Font.PLAIN, 9);
    g.setFont(fn);
    for (int i = 0; i <= 9; i++) {
      if (model.getMatrix().getVariables()[yVar].getType() == JWATConstants.DATE) {
        SimpleDateFormat f = new SimpleDateFormat("dd.MM.yy HH:mm:ss");
        g.drawString(f.format(new Date((long) (yMax - (yMax - yMin) / 9 * i))), WIDTH_TEXT_Y, UpperLeftGraph.y + (i * (HEIGHT / 9)));
      } else {
        g.drawString(valueFormat.format(yMax - (yMax - yMin) / 9 * i), WIDTH_TEXT_Y, UpperLeftGraph.y + (i * (HEIGHT / 9)));
      }
    }
    // Testo variabile in Y
View Full Code Here

    for (int i = 0; i <= 9; i++) {
      if (model.getMatrix().getVariables()[yVar].getType() == JWATConstants.DATE) {
        SimpleDateFormat f = new SimpleDateFormat("dd.MM.yy HH:mm:ss");
        g.drawString(f.format(new Date((long) (yMax - (yMax - yMin) / 9 * i))), WIDTH_TEXT_Y, UpperLeftGraph.y + (i * (HEIGHT / 9)));
      } else {
        g.drawString(valueFormat.format(yMax - (yMax - yMin) / 9 * i), WIDTH_TEXT_Y, UpperLeftGraph.y + (i * (HEIGHT / 9)));
      }
    }
    // Testo variabile in Y
    fn = new Font("Arial", Font.PLAIN, 17);
    fn = fn.deriveFont(AffineTransform.getRotateInstance(3.14 / 2 + 3.14));
View Full Code Here

    }
    // Testo variabile in Y
    fn = new Font("Arial", Font.PLAIN, 17);
    fn = fn.deriveFont(AffineTransform.getRotateInstance(3.14 / 2 + 3.14));
    g.setFont(fn);
    g.drawString(model.getMatrix().getVariables()[yVar].getName(), YText.x, YText.y);
    // Testo etichette valori in x
    fn = new Font("Arial", Font.PLAIN, 9);
    fn = fn.deriveFont(AffineTransform.getRotateInstance(3.14 / 2 + 3.14));
    g.setFont(fn);
    for (int i = 0; i <= 9; i++) {
View Full Code Here

    fn = fn.deriveFont(AffineTransform.getRotateInstance(3.14 / 2 + 3.14));
    g.setFont(fn);
    for (int i = 0; i <= 9; i++) {
      if (model.getMatrix().getVariables()[xVar].getType() == JWATConstants.DATE) {
        SimpleDateFormat f = new SimpleDateFormat("dd.MM.yy HH:mm:ss");
        g.drawString(f.format(new Date((long) (xMin + (xMax - xMin) / 9 * i))), LowerLeftGraph.x + (i * (WIDTH / 9)), LowerLeftGraph.y
            + HEIGHT_VALUES_X);
      } else {
        g.drawString(valueFormat.format(xMin + (xMax - xMin) / 9 * i), LowerLeftGraph.x + (i * (WIDTH / 9)), LowerLeftGraph.y
            + HEIGHT_VALUES_X);
      }
View Full Code Here

      if (model.getMatrix().getVariables()[xVar].getType() == JWATConstants.DATE) {
        SimpleDateFormat f = new SimpleDateFormat("dd.MM.yy HH:mm:ss");
        g.drawString(f.format(new Date((long) (xMin + (xMax - xMin) / 9 * i))), LowerLeftGraph.x + (i * (WIDTH / 9)), LowerLeftGraph.y
            + HEIGHT_VALUES_X);
      } else {
        g.drawString(valueFormat.format(xMin + (xMax - xMin) / 9 * i), LowerLeftGraph.x + (i * (WIDTH / 9)), LowerLeftGraph.y
            + HEIGHT_VALUES_X);
      }
    }
    // Disegno punti
    if (first) {
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.