Example usage for java.awt Font isPlain

List of usage examples for java.awt Font isPlain

Introduction

In this page you can find the example usage for java.awt Font isPlain.

Prototype

public boolean isPlain() 

Source Link

Document

Indicates whether or not this Font object's style is PLAIN.

Usage

From source file:NwFontChooserS.java

static public String fontString(Font font) {
    String fs = font.getFamily();
    if (!font.isPlain()) {
        fs += "-";
        if (font.isBold()) {
            fs += "BOLD";
        }/*from   ww w .j  ava2s .c om*/
        if (font.isItalic()) {
            fs += "ITALIC";
        }
    }
    fs += "-" + font.getSize();
    return (fs);
}

From source file:Main.java

public void paint(Graphics g) {
    Font f = g.getFont();

    System.out.println(f.isPlain());

    g.drawString("java2s.com", 4, 16);
}

From source file:nz.govt.natlib.ndha.manualdeposit.metadata.PersonalSettings.java

public void setStandardFont(final Font value) {
    fontName = value.getFontName();/* w  ww .  j  av a  2 s .  com*/
    fontSize = value.getSize();
    fontBold = value.isBold();
    fontItalic = value.isItalic();
    fontPlain = value.isPlain();
    saveData();
}

From source file:org.reactome.server.tools.diagram.exporter.raster.itext.awt.DefaultFontMapper.java

private int extractItextStyle(Font font) {
    if (font.isItalic() && font.isBold())
        return FontStyles.BOLDITALIC;
    if (font.isBold())
        return FontStyles.BOLD;
    if (font.isItalic())
        return FontStyles.ITALIC;
    if (font.isPlain())
        return FontStyles.NORMAL;
    return FontStyles.UNDEFINED;
}