Examples of deriveFont()


Examples of ae.java.awt.Font.deriveFont()

        if (index >= 2) {
            font = allFonts[index-2];
        }

        return font.deriveFont(attributes);
    }

    private static FontResolver INSTANCE;

    /**
 
View Full Code Here

Examples of com.google.code.appengine.awt.Font.deriveFont()

            String windowsFontName = FontUtilities
                .getWindowsFontName(fontName);

            unitFont = new Font(windowsFontName, font.getStyle(), font
                .getSize());
            unitFont = unitFont.deriveFont(font.getSize2D()
                * UNITS_PER_PIXEL * TWIPS);
            unitFontTable.put(font, unitFont);

            ExtLogFontW logFontW = new ExtLogFontW(unitFont);
            int handle = handleManager.getHandle();
View Full Code Here

Examples of java.awt.Font.deriveFont()

    for (Channel channel : channelArr) {
      String msg = channel.getCopyrightNotice();
      // repeatedly reduce the font size while the copyright notice is wider than the column
      while (metric.stringWidth(msg) > mColumnWidth) {
        Font font = grp.getFont();
        grp.setFont(font.deriveFont((float)(font.getSize()-1)));
        metric = grp.getFontMetrics();
      }
    }
    for (int i = 0; i < channelArr.length; i++) {
      String msg = channelArr[i].getCopyrightNotice();
View Full Code Here

Examples of java.awt.Font.deriveFont()

      mLog.info("platform independent mode is OFF");

      mOpenCloseMenuItem = new JMenuItem(mLocalizer.msg("menu.open", "Open"));
      Font f = mOpenCloseMenuItem.getFont();

      mOpenCloseMenuItem.setFont(f.deriveFont(Font.BOLD));
      mQuitMenuItem = new JMenuItem(mLocalizer.msg("menu.quit", "Quit"), TVBrowserIcons.quit(TVBrowserIcons.SIZE_SMALL));
      mConfigure = new JMenuItem(mLocalizer.msg("menu.configure", "Configure"), TVBrowserIcons
          .preferences(TVBrowserIcons.SIZE_SMALL));

      mConfigure.addActionListener(new ActionListener() {
View Full Code Here

Examples of java.awt.Font.deriveFont()

     
    }
   
    private void paintString(Graphics g, String msg) {
      Font old = g.getFont();
      g.setFont(old.deriveFont(Font.BOLD).deriveFont(18.0f));
      FontMetrics fm = g.getFontMetrics();
      int x = (getWidth() - fm.stringWidth(msg)) / 2;
      if (x < 0) x = 0;
      g.drawString(msg, x, getHeight() - 23);
      g.setFont(old);
View Full Code Here

Examples of java.awt.Font.deriveFont()

      if(fontFace != null)
        currentFont = new Font(fontFace, currentFontStyle, currentFontSize);
      if(fontSize != null)
      {
        currentFontSize = Integer.parseInt(fontSize);
        currentFont = currentFont.deriveFont((float)currentFontSize);
      }
      if(colorCodeStr != null)
      {
        switch(Integer.parseInt(colorCodeStr))
        {
View Full Code Here

Examples of java.awt.Font.deriveFont()

  }
 
  public void configureTextField(EditableLabelField field, double zoom) {
    Font f = font;
    if (zoom != 1.0) {
      f = f.deriveFont(AffineTransform.getScaleInstance(zoom, zoom));
    }
    field.setFont(f);
   
    Dimension dim = field.getPreferredSize();
    int w;
View Full Code Here

Examples of java.awt.Font.deriveFont()

  public void paintIconRectangular(InstancePainter painter) {
    Graphics g = painter.getGraphics();
    g.setColor(Color.black);
    g.drawRect(1, 2, 16, 16);
    Font old = g.getFont();
    g.setFont(old.deriveFont(9.0f));
    GraphicsUtil.drawCenteredText(g, "2k", 96);
    GraphicsUtil.drawCenteredText(g, "+1", 9, 13);
    g.setFont(old);
  }
View Full Code Here

Examples of java.awt.Font.deriveFont()

      else if (textattribute.equals(TextAttribute.FAMILY))
      {
        final Font font = getFont();
        final Map fontAttributes = font.getAttributes();
        fontAttributes.put(TextAttribute.FAMILY, iter.getAttributes().get(textattribute));
        setFont(font.deriveFont(fontAttributes));
      }
      else if (textattribute.equals(TextAttribute.POSTURE))
      {
        final Font font = getFont();
        final Map fontAttributes = font.getAttributes();
View Full Code Here

Examples of java.awt.Font.deriveFont()

      else if (textattribute.equals(TextAttribute.POSTURE))
      {
        final Font font = getFont();
        final Map fontAttributes = font.getAttributes();
        fontAttributes.put(TextAttribute.POSTURE, iter.getAttributes().get(textattribute));
        setFont(font.deriveFont(fontAttributes));
      }
      else if (textattribute.equals(TextAttribute.WEIGHT))
      {
        final Font font = getFont();
        final Map fontAttributes = font.getAttributes();
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.