Examples of deriveFont()


Examples of java.awt.Font.deriveFont()

  AboutPanel()
  {
    Font font = loadFont("ASTROLYT.TTF") ;
    font1 = font.deriveFont(Font.BOLD, (float) 14.0) ;
    font2 = font.deriveFont(Font.BOLD, (float) 20.0) ;

    font = loadFont("AUGIE.TTF") ;
    font3 = font.deriveFont(Font.BOLD, (float) 14.0) ;

    versionStr = "Version " + Globals.VERSION ;
View Full Code Here

Examples of java.awt.Font.deriveFont()

    Font font = loadFont("ASTROLYT.TTF") ;
    font1 = font.deriveFont(Font.BOLD, (float) 14.0) ;
    font2 = font.deriveFont(Font.BOLD, (float) 20.0) ;

    font = loadFont("AUGIE.TTF") ;
    font3 = font.deriveFont(Font.BOLD, (float) 14.0) ;

    versionStr = "Version " + Globals.VERSION ;
    buildStr = " build " + Globals.BUILD ;

    image = new ImageIcon(getClass().getResource("/images/autumn.png"));
View Full Code Here

Examples of java.awt.Font.deriveFont()

        private final Color col_observe = new Color(0x00, 0xD0, 0x00);
        private final Color col_bad     = new Color(0xFF, 0x00, 0x00);

        public StringCellRenderer() {
            final Font baseFont = getIdentitiesTable().getFont();
            normalFont = baseFont.deriveFont(Font.PLAIN);
            boldFont = baseFont.deriveFont(Font.BOLD);

            setVerticalAlignment(CENTER);
        }
View Full Code Here

Examples of java.awt.Font.deriveFont()

        private final Color col_bad     = new Color(0xFF, 0x00, 0x00);

        public StringCellRenderer() {
            final Font baseFont = getIdentitiesTable().getFont();
            normalFont = baseFont.deriveFont(Font.PLAIN);
            boldFont = baseFont.deriveFont(Font.BOLD);

            setVerticalAlignment(CENTER);
        }

        @Override
View Full Code Here

Examples of java.awt.Font.deriveFont()

       
        //String[] fnames = GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames();
        //for (String fname: fnames) System.out.println("font: " + fname);
       
        Font font = Font.decode("SansSerif");
        if (font != null) font = font.deriveFont((float) 14.0);
        //if (font != null) font = font.deriveFont(Font.BOLD);

        SearchBox = new JTextField();
        SearchBox.setText("search...");
        SearchBox.setCaretPosition(0);
View Full Code Here

Examples of java.awt.Font.deriveFont()

        SearchBox = new JTextField();
        SearchBox.setText("search...");
        SearchBox.setCaretPosition(0);
        SearchBox.moveCaretPosition(9);
        SearchBox.setFont(font.deriveFont((float) 14.0).deriveFont(Font.BOLD));
        SearchBox.setSize(width + 4, textHeight);
        SearchBox.setBorder(BorderFactory.createEmptyBorder());
        SearchBox.setBackground(Color.decode("#EEEEDD"));
        SearchBox.getDocument().addDocumentListener(listener);
        InputMap im = SearchBox.getInputMap();
View Full Code Here

Examples of java.awt.Font.deriveFont()

        Switchboard.InfoBox.setBorder(BorderFactory.createTitledBorder(""));
        Switchboard.InfoBox.setSize(width, textHeight);
        Switchboard.InfoBox.setBorder(BorderFactory.createEmptyBorder());
        Switchboard.InfoBox.setBackground(Color.decode("#EEEEDD"));
        Switchboard.InfoBox.setText("search window initialized");
        Switchboard.InfoBox.setFont(font.deriveFont((float) 11.0));
       
        // make the scroll pane that contains the search result
        JComponent mainText = new JEditorPane();
        mainText.setPreferredSize(new java.awt.Dimension(480, 590));
        String infotext =
View Full Code Here

Examples of java.awt.Font.deriveFont()

        font = new Font(fontName, fallbackFont.getStyle(), fallbackFont.getSize());
      }

      if (font.canDisplayUpTo(text) == -1) {
        logger.info("Font '{}' was capable, returning", fontName);
        font = font.deriveFont(fallbackFont.getSize2D());
        return font;
      }
    }

    logger.warn("Didn't find any capable fonts for text '{}'", text);
View Full Code Here

Examples of java.awt.Font.deriveFont()

        fontName = defaultFont.getName();
      } else {
        fontName = null;
      }
      font = new Font(fontName, fontStyle, 1);
      font = font.deriveFont(textStyle.getFontSize());
      this.fonts.put(textStyle, font);
    }
    return font;
  }
View Full Code Here

Examples of java.awt.Font.deriveFont()

    public StatLabel() {
      // unbold
      Font f = getFont();
      if ((f.getStyle() & Font.BOLD) != 0) {
        setFont(f.deriveFont(f.getStyle() ^ Font.BOLD));
      }
    }
  }
}
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.