Exemple #1
0
  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;
    }
  }