Examples of stringWidth()


Examples of java.awt.FontMetrics.stringWidth()

    
     for (int j = start; j < end;j++) {
      int actualGene = j;
       String out = headerSummary.getSummary(headerInfo, actualGene);
       if (out == null) continue;
       int length = fontMetrics.stringWidth(out);
       if (maxlength < length) {
         maxlength = length;
       }
     }
     setPreferredSize(new Dimension(maxlength, map.getUsedPixels()));
View Full Code Here

Examples of java.awt.FontMetrics.stringWidth()

        // Create header text
        String headerFormat = homePrint.getHeaderFormat();     
        if (headerFormat != null) {
          header = Variable.getMessageFormat(headerFormat).format(variableValues).trim();
          if (header.length() > 0) {
            xHeader = ((float)pageFormat.getWidth() - fontMetrics.stringWidth(header)) / 2;
            yHeader = imageableY + fontMetrics.getAscent();
            imageableY += headerFooterHeight;
            imageableHeight -= headerFooterHeight;
          } else {
            header = null;
View Full Code Here

Examples of javax.microedition.lcdui.Font.stringWidth()

  }
    RenderedWord.fontSize = fontSize;
    for (int i = 0; i < 7; i++) {
    Font f = Font.getFont(Font.FACE_PROPORTIONAL, i, fontSize);
      RenderedWord.font[i] = f;
      RenderedWord.fontWidth[i] = f.stringWidth(" ");
    }
    RenderedWord.heightFont = Font.getFont(Font.FACE_PROPORTIONAL,
      Font.STYLE_PLAIN, fontSize).getHeight() +
      AbstractView.getLineSpace();
  }
View Full Code Here

Examples of org.apache.isis.viewer.dnd.drawing.Text.stringWidth()

        int width = titleStyle.stringWidth(text, MAX_WIDTH);

        text = AboutIsis.getFrameworkCopyrightNotice();
        height += normalStyle.stringHeight(text, MAX_WIDTH) + normalStyle.getLineSpacing() + linePadding;
        // height += normalStyle.getLineHeight();
        width = Math.max(width, normalStyle.stringWidth(text, MAX_WIDTH));

        text = frameworkVersion();
        height += normalStyle.stringHeight(text, MAX_WIDTH) + normalStyle.getLineSpacing() + linePadding;
        // height += normalStyle.getLineHeight();
        width = Math.max(width, normalStyle.stringWidth(text, MAX_WIDTH));
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.