Java Code Examples for com.sun.java.swing.plaf.gtk.GTKEngine.WidgetType#ordinal()

The following examples show how to use com.sun.java.swing.plaf.gtk.GTKEngine.WidgetType#ordinal() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GTKStyle.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
GTKStyle(Font userFont, WidgetType widgetType) {
    this.widgetType = widgetType.ordinal();

    String pangoFontName;
    synchronized (sun.awt.UNIXToolkit.GTK_LOCK) {
        xThickness = nativeGetXThickness(this.widgetType);
        yThickness = nativeGetYThickness(this.widgetType);
        pangoFontName = nativeGetPangoFontName(this.widgetType);
    }

    Font pangoFont = null;
    if (pangoFontName != null) {
        pangoFont = PangoFonts.lookupFont(pangoFontName);
    }
    if (pangoFont != null) {
        this.font = pangoFont;
    } else if (userFont != null) {
        this.font = userFont;
    } else {
        this.font = DEFAULT_FONT;
    }
}
 
Example 2
Source File: GTKStyle.java    From dragonwell8_jdk with GNU General Public License v2.0 6 votes vote down vote up
GTKStyle(Font userFont, WidgetType widgetType) {
    this.widgetType = widgetType.ordinal();

    String pangoFontName;
    synchronized (sun.awt.UNIXToolkit.GTK_LOCK) {
        xThickness = nativeGetXThickness(this.widgetType);
        yThickness = nativeGetYThickness(this.widgetType);
        pangoFontName = nativeGetPangoFontName(this.widgetType);
    }

    Font pangoFont = null;
    if (pangoFontName != null) {
        pangoFont = PangoFonts.lookupFont(pangoFontName);
    }
    if (pangoFont != null) {
        this.font = pangoFont;
    } else if (userFont != null) {
        this.font = userFont;
    } else {
        this.font = DEFAULT_FONT;
    }
}
 
Example 3
Source File: GTKStyle.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
GTKStyle(Font userFont, WidgetType widgetType) {
    this.widgetType = widgetType.ordinal();

    String pangoFontName;
    synchronized (sun.awt.UNIXToolkit.GTK_LOCK) {
        xThickness = nativeGetXThickness(this.widgetType);
        yThickness = nativeGetYThickness(this.widgetType);
        pangoFontName = nativeGetPangoFontName(this.widgetType);
    }

    Font pangoFont = null;
    if (pangoFontName != null) {
        pangoFont = PangoFonts.lookupFont(pangoFontName);
    }
    if (pangoFont != null) {
        this.font = pangoFont;
    } else if (userFont != null) {
        this.font = userFont;
    } else {
        this.font = DEFAULT_FONT;
    }
}
 
Example 4
Source File: GTKStyle.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
GTKStyle(Font userFont, WidgetType widgetType) {
    this.widgetType = widgetType.ordinal();

    String pangoFontName;
    synchronized (sun.awt.UNIXToolkit.GTK_LOCK) {
        xThickness = nativeGetXThickness(this.widgetType);
        yThickness = nativeGetYThickness(this.widgetType);
        pangoFontName = nativeGetPangoFontName(this.widgetType);
    }

    Font pangoFont = null;
    if (pangoFontName != null) {
        pangoFont = PangoFonts.lookupFont(pangoFontName);
    }
    if (pangoFont != null) {
        this.font = pangoFont;
    } else if (userFont != null) {
        this.font = userFont;
    } else {
        this.font = DEFAULT_FONT;
    }
}
 
Example 5
Source File: GTKStyle.java    From JDKSourceCode1.8 with MIT License 6 votes vote down vote up
GTKStyle(Font userFont, WidgetType widgetType) {
    this.widgetType = widgetType.ordinal();

    String pangoFontName;
    synchronized (sun.awt.UNIXToolkit.GTK_LOCK) {
        xThickness = nativeGetXThickness(this.widgetType);
        yThickness = nativeGetYThickness(this.widgetType);
        pangoFontName = nativeGetPangoFontName(this.widgetType);
    }

    Font pangoFont = null;
    if (pangoFontName != null) {
        pangoFont = PangoFonts.lookupFont(pangoFontName);
    }
    if (pangoFont != null) {
        this.font = pangoFont;
    } else if (userFont != null) {
        this.font = userFont;
    } else {
        this.font = DEFAULT_FONT;
    }
}
 
Example 6
Source File: GTKStyle.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
GTKStyle(Font userFont, WidgetType widgetType) {
    this.widgetType = widgetType.ordinal();

    String pangoFontName;
    synchronized (sun.awt.UNIXToolkit.GTK_LOCK) {
        xThickness = nativeGetXThickness(this.widgetType);
        yThickness = nativeGetYThickness(this.widgetType);
        pangoFontName = nativeGetPangoFontName(this.widgetType);
    }

    Font pangoFont = null;
    if (pangoFontName != null) {
        pangoFont = PangoFonts.lookupFont(pangoFontName);
    }
    if (pangoFont != null) {
        this.font = pangoFont;
    } else if (userFont != null) {
        this.font = userFont;
    } else {
        this.font = DEFAULT_FONT;
    }
}
 
Example 7
Source File: GTKStyle.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
GTKStyle(Font userFont, WidgetType widgetType) {
    this.widgetType = widgetType.ordinal();

    String pangoFontName;
    synchronized (sun.awt.UNIXToolkit.GTK_LOCK) {
        xThickness = nativeGetXThickness(this.widgetType);
        yThickness = nativeGetYThickness(this.widgetType);
        pangoFontName = nativeGetPangoFontName(this.widgetType);
    }

    Font pangoFont = null;
    if (pangoFontName != null) {
        pangoFont = PangoFonts.lookupFont(pangoFontName);
    }
    if (pangoFont != null) {
        this.font = pangoFont;
    } else if (userFont != null) {
        this.font = userFont;
    } else {
        this.font = DEFAULT_FONT;
    }
}
 
Example 8
Source File: GTKStyle.java    From Bytecoder with Apache License 2.0 6 votes vote down vote up
GTKStyle(Font userFont, WidgetType widgetType) {
    this.widgetType = widgetType.ordinal();

    String pangoFontName;
    synchronized (sun.awt.UNIXToolkit.GTK_LOCK) {
        xThickness = nativeGetXThickness(this.widgetType);
        yThickness = nativeGetYThickness(this.widgetType);
        pangoFontName = nativeGetPangoFontName(this.widgetType);
    }

    Font pangoFont = null;
    if (pangoFontName != null) {
        pangoFont = PangoFonts.lookupFont(pangoFontName);
    }
    if (pangoFont != null) {
        this.font = pangoFont;
    } else if (userFont != null) {
        this.font = userFont;
    } else {
        this.font = DEFAULT_FONT;
    }
}
 
Example 9
Source File: GTKStyle.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
GTKStyle(Font userFont, WidgetType widgetType) {
    this.widgetType = widgetType.ordinal();

    String pangoFontName;
    synchronized (sun.awt.UNIXToolkit.GTK_LOCK) {
        xThickness = nativeGetXThickness(this.widgetType);
        yThickness = nativeGetYThickness(this.widgetType);
        pangoFontName = nativeGetPangoFontName(this.widgetType);
    }

    Font pangoFont = null;
    if (pangoFontName != null) {
        pangoFont = PangoFonts.lookupFont(pangoFontName);
    }
    if (pangoFont != null) {
        this.font = pangoFont;
    } else if (userFont != null) {
        this.font = userFont;
    } else {
        this.font = DEFAULT_FONT;
    }
}
 
Example 10
Source File: GTKStyle.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
GTKStyle(Font userFont, WidgetType widgetType) {
    this.widgetType = widgetType.ordinal();

    String pangoFontName;
    synchronized (sun.awt.UNIXToolkit.GTK_LOCK) {
        xThickness = nativeGetXThickness(this.widgetType);
        yThickness = nativeGetYThickness(this.widgetType);
        pangoFontName = nativeGetPangoFontName(this.widgetType);
    }

    Font pangoFont = null;
    if (pangoFontName != null) {
        pangoFont = PangoFonts.lookupFont(pangoFontName);
    }
    if (pangoFont != null) {
        this.font = pangoFont;
    } else if (userFont != null) {
        this.font = userFont;
    } else {
        this.font = DEFAULT_FONT;
    }
}
 
Example 11
Source File: GTKStyle.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
GTKStyle(Font userFont, WidgetType widgetType) {
    this.widgetType = widgetType.ordinal();

    String pangoFontName;
    synchronized (sun.awt.UNIXToolkit.GTK_LOCK) {
        xThickness = nativeGetXThickness(this.widgetType);
        yThickness = nativeGetYThickness(this.widgetType);
        pangoFontName = nativeGetPangoFontName(this.widgetType);
    }

    Font pangoFont = null;
    if (pangoFontName != null) {
        pangoFont = PangoFonts.lookupFont(pangoFontName);
    }
    if (pangoFont != null) {
        this.font = pangoFont;
    } else if (userFont != null) {
        this.font = userFont;
    } else {
        this.font = DEFAULT_FONT;
    }
}
 
Example 12
Source File: GTKStyle.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
GTKStyle(Font userFont, WidgetType widgetType) {
    this.widgetType = widgetType.ordinal();

    String pangoFontName;
    synchronized (sun.awt.UNIXToolkit.GTK_LOCK) {
        xThickness = nativeGetXThickness(this.widgetType);
        yThickness = nativeGetYThickness(this.widgetType);
        pangoFontName = nativeGetPangoFontName(this.widgetType);
    }

    Font pangoFont = null;
    if (pangoFontName != null) {
        pangoFont = PangoFonts.lookupFont(pangoFontName);
    }
    if (pangoFont != null) {
        this.font = pangoFont;
    } else if (userFont != null) {
        this.font = userFont;
    } else {
        this.font = DEFAULT_FONT;
    }
}
 
Example 13
Source File: GTKStyle.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
GTKStyle(Font userFont, WidgetType widgetType) {
    this.widgetType = widgetType.ordinal();

    String pangoFontName;
    synchronized (sun.awt.UNIXToolkit.GTK_LOCK) {
        xThickness = nativeGetXThickness(this.widgetType);
        yThickness = nativeGetYThickness(this.widgetType);
        pangoFontName = nativeGetPangoFontName(this.widgetType);
    }

    Font pangoFont = null;
    if (pangoFontName != null) {
        pangoFont = PangoFonts.lookupFont(pangoFontName);
    }
    if (pangoFont != null) {
        this.font = pangoFont;
    } else if (userFont != null) {
        this.font = userFont;
    } else {
        this.font = DEFAULT_FONT;
    }
}
 
Example 14
Source File: GTKStyle.java    From jdk8u_jdk with GNU General Public License v2.0 6 votes vote down vote up
GTKStyle(Font userFont, WidgetType widgetType) {
    this.widgetType = widgetType.ordinal();

    String pangoFontName;
    synchronized (sun.awt.UNIXToolkit.GTK_LOCK) {
        xThickness = nativeGetXThickness(this.widgetType);
        yThickness = nativeGetYThickness(this.widgetType);
        pangoFontName = nativeGetPangoFontName(this.widgetType);
    }

    Font pangoFont = null;
    if (pangoFontName != null) {
        pangoFont = PangoFonts.lookupFont(pangoFontName);
    }
    if (pangoFont != null) {
        this.font = pangoFont;
    } else if (userFont != null) {
        this.font = userFont;
    } else {
        this.font = DEFAULT_FONT;
    }
}
 
Example 15
Source File: GTKStyle.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
GTKStyle(Font userFont, WidgetType widgetType) {
    this.widgetType = widgetType.ordinal();

    String pangoFontName;
    synchronized (sun.awt.UNIXToolkit.GTK_LOCK) {
        xThickness = nativeGetXThickness(this.widgetType);
        yThickness = nativeGetYThickness(this.widgetType);
        pangoFontName = nativeGetPangoFontName(this.widgetType);
    }

    Font pangoFont = null;
    if (pangoFontName != null) {
        pangoFont = PangoFonts.lookupFont(pangoFontName);
    }
    if (pangoFont != null) {
        this.font = pangoFont;
    } else if (userFont != null) {
        this.font = userFont;
    } else {
        this.font = DEFAULT_FONT;
    }
}
 
Example 16
Source File: GTKStyle.java    From jdk8u-dev-jdk with GNU General Public License v2.0 6 votes vote down vote up
GTKStyle(Font userFont, WidgetType widgetType) {
    this.widgetType = widgetType.ordinal();

    String pangoFontName;
    synchronized (sun.awt.UNIXToolkit.GTK_LOCK) {
        xThickness = nativeGetXThickness(this.widgetType);
        yThickness = nativeGetYThickness(this.widgetType);
        pangoFontName = nativeGetPangoFontName(this.widgetType);
    }

    Font pangoFont = null;
    if (pangoFontName != null) {
        pangoFont = PangoFonts.lookupFont(pangoFontName);
    }
    if (pangoFont != null) {
        this.font = pangoFont;
    } else if (userFont != null) {
        this.font = userFont;
    } else {
        this.font = DEFAULT_FONT;
    }
}