Package java.awt

Examples of java.awt.Font.deriveFont()


    try {
      size = Float.parseFloat(getString(fsize, "text"));
    } catch (Exception e) {
      e.printStackTrace();
    }
    f = f.deriveFont(size);
    remove(selfont);
    setFont(f);
    courier = new Font("Courier", getFont().getStyle(), getFont().getSize());
    repaint();
  }
View Full Code Here


  public JLabel create(float size, String text) {
    JLabel label = new JLabel();
    label.setUI(labelUI);
    if (size > 0f) {
      Font font = label.getFont();
      label.setFont(font.deriveFont(size));
    }
    label.setText(text);
    return label;
  }
View Full Code Here

        fonts = new HashMap<String, Font>(fontIndexData.size());
        for (FontIndexData data : fontIndexData) {
            FileInputStream inStream = new FileInputStream(BDJUtil.discRootToFilesystem("/BDMV/AUXDATA/" + data.getFileName()));
           
            Font font = Font.createFont(Font.TRUETYPE_FONT, inStream);
            font = font.deriveFont(data.getStyle(), data.getMaxSize());
           
            fonts.put(data.getName(), font);
        }
    }
View Full Code Here

        Font font = fonts.get(name);
       
        if (font == null)
            throw new FontNotAvailableException();
       
        return font.deriveFont(style, size);
    }
   
    private FontIndex fontIndex = new FontIndex();
    private Font urlFont = null;
    private Map<String, Font> fonts = null;
View Full Code Here

        DecimalFormat decimalFormat = new DecimalFormat();
        decimalFormat.setDecimalSeparatorAlwaysShown(false);
        decimalFormat.setParseIntegerOnly(true);
        if (orderLines != null && orderLines.size() != 0) {
            Font font = labelHeading.getFont();
            font = font.deriveFont(Font.BOLD);
            labelHeading.setFont(font);
            orderLineAttributes = getAttributes(orderLines, "");
           
           
View Full Code Here

            // the panel
            assetLabel = new JLabel("");
            assetLabel.setAlignmentX(0.0f);
            assetLabel.setAlignmentY(0.0f);
            Font font = assetLabel.getFont();
            assetLabel.setFont(font.deriveFont(Font.PLAIN, 11));
//            assetLabel.setPreferredSize(getSize());
            add(assetLabel);

            // Create the progress bar and add it to the panel. Make sure it
            // is always of a maximum height
View Full Code Here

     */
    protected Component createTitleLabel()
    {
        JLabel titleLabel = new JLabel(getStaticLabel());
        Font curFont = titleLabel.getFont();
        titleLabel.setFont(curFont.deriveFont((float) curFont.getSize() + 4));
        return titleLabel;
    }

    /**
     * A newly created gui component can be initialized with the contents of
View Full Code Here

  public Font createFont()
  {
    final Font retfont = new Font(getFace(), getStyle(), getSize());
    final double rot = StrictMath.sin(Math.toRadians(-rotation));
    return retfont.deriveFont(AffineTransform.getRotateInstance(rot));
  }

  public int getType()
  {
    return OBJ_FONT;
View Full Code Here

      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

      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.