private Font getFont(int type) {
    if (type == Font.BOLD) {
      return myBoldFont;
    }
    else if (type == Font.ITALIC) {
      return myItalicFont;
    }
    else if (type == Font.ITALIC + Font.BOLD) {
      return myBoldItalicFont;
    }
    else {
      return myPlainFont;
    }
  }
private Font getFont(int type)