Package java.awt

Examples of java.awt.Font.deriveFont()


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


            }
            else if(textattribute.equals(TextAttribute.WEIGHT)) {
              Font font = getFont();
              Map fontAttributes = font.getAttributes();
              fontAttributes.put(TextAttribute.WEIGHT, iter.getAttributes().get(textattribute));
              setFont(font.deriveFont(fontAttributes));
            }
        }
    }

    /**
 
View Full Code Here

        // Add the day labels
        calendarRow = new TablePane.Row();

        Font labelFont = theme.getFont();
        labelFont = labelFont.deriveFont(Font.BOLD);

        for (int i = 0; i < 7; i++) {
            Label label = new Label();
            label.getStyles().put("font", labelFont);
            label.getStyles().put("padding", new Insets(2, 2, 4, 2));
View Full Code Here

        // Update the labels
        textLabel.setText(text);

        Font font = (Font)menu.getStyles().get("font");
        textLabel.getStyles().put("font", font);
        keyboardShortcutLabel.getStyles().put("font", font.deriveFont(Font.ITALIC));

        Color color;
        if (button.isEnabled()) {
            if (highlighted) {
                color = (Color)menu.getStyles().get("activeColor");
View Full Code Here

  @Override
  protected void addBasicDefaults(LookAndFeelAddons addon, DefaultsList defaults) {
    Font taskPaneFont = UIManagerExt.getSafeFont("Label.font", new Font(
                "Dialog", Font.PLAIN, 12));
    taskPaneFont = taskPaneFont.deriveFont(Font.BOLD);
   
    Color menuBackground = new ColorUIResource(SystemColor.menu);
   
    defaults.add(JXTaskPane.uiClassID, "org.jdesktop.swingx.plaf.basic.BasicTaskPaneUI");
    defaults.add("TaskPane.font", new FontUIResource(taskPaneFont));
View Full Code Here

  @Override
  protected void addBasicDefaults(LookAndFeelAddons addon, DefaultsList defaults) {
      super.addBasicDefaults(addon, defaults);
     
      Font font = UIManagerExt.getSafeFont("Label.font", new Font("Dialog", Font.PLAIN, 12));
      font = font.deriveFont(Font.BOLD, 13f);
     
      defaults.add(JXTipOfTheDay.uiClassID, BasicTipOfTheDayUI.class.getName());
      defaults.add("TipOfTheDay.font", UIManagerExt.getSafeFont("TextPane.font",
                new FontUIResource("Serif", Font.PLAIN, 12)));
      defaults.add("TipOfTheDay.tipFont", new FontUIResource(font));
View Full Code Here

  protected void addWindowsDefaults(LookAndFeelAddons addon, DefaultsList defaults) {
    super.addWindowsDefaults(addon, defaults);

    Font font = UIManagerExt.getSafeFont("Label.font",
            new Font("Dialog", Font.PLAIN, 12));
    font = font.deriveFont(13f);
   
    defaults.add(JXTipOfTheDay.uiClassID, WindowsTipOfTheDayUI.class.getName());
    defaults.add("TipOfTheDay.background", new ColorUIResource(Color.GRAY));
    defaults.add("TipOfTheDay.font", new FontUIResource(font));
    defaults.add("TipOfTheDay.icon",
View Full Code Here

        titleLabel.setFont(titleLabel.getFont().deriveFont(Font.BOLD));
        pane.add(titleLabel);
       
        Font f = errorMessage.getFont();
        if (f != null) {
            errorMessage.setFont(f.deriveFont(f.getSize() - 2f));
        }
       
        disclaimerText = new JEditorPane();
        disclaimerText.setContentType("text/html");
        disclaimerText.setVisible(false);
View Full Code Here

        disclaimerText.setVisible(false);
        disclaimerText.setEditable(false);
        disclaimerText.setOpaque(false);
        disclaimerText.putClientProperty(JXEditorPane.HONOR_DISPLAY_PROPERTIES, Boolean.TRUE);
        if (f != null) {
            disclaimerText.setFont(f.deriveFont(f.getSize() - 2f));
        }
        pane.add(disclaimerText);
       
        detailButton.setBorderPainted(false);
        detailButton.setContentAreaFilled(false);
View Full Code Here

                addressLabel.setText(street + ", " + city + " " + state);
            }
        }

        Font font = (Font)listView.getStyles().get("font");
        titleLabel.getStyles().put("font", font.deriveFont(font.getStyle() | Font.BOLD));
        phoneLabel.getStyles().put("font", font);
        addressLabel.getStyles().put("font", font);

        Color color;
        if (listView.isEnabled() && !disabled) {
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.