インタフェース
javax.swing.Iconの使用

Iconを使用しているパッケージ 
パッケージ 説明
javax.swing
すべてのプラットフォーム上で可能なかぎり同じように機能する「軽量」(Java共通言語)コンポーネントのセットを提供します。
javax.swing.border
Swingコンポーネントの周囲に各種ボーダーを描画するためのクラスおよびインタフェースを提供します。
javax.swing.colorchooser
JColorChooserコンポーネントによって使用されるクラスとインタフェースが含まれています。
javax.swing.filechooser
JFileChooserコンポーネントによって使用されるクラスとインタフェースが含まれています。
javax.swing.plaf
1つのインタフェースおよび多くのabstractクラスを提供しており、Swingはプラグイン可能なLook & Feel機能を提供するためにこれらを利用します。
javax.swing.plaf.basic
基本Look & Feelに従って構築されたユーザー・インタフェース・オブジェクトを提供します。
javax.swing.plaf.metal
デフォルトのLook & FeelであるJava Look & Feel (以前のコード名はMetal)に従って構築されたユーザー・インタフェース・オブジェクトを提供します。
javax.swing.plaf.synth
Synthは、すべてのペイントが委譲されるスキン設定可能なLook & Feelです。
javax.swing.text
編集可能なテキスト・コンポーネントと編集不能なテキスト・コンポーネントを処理するクラスとインタフェースを提供します。
javax.swing.text.html
HTMLテキスト・エディタを作成するためのクラスHTMLEditorKitとサポート・クラスを提供します。
javax.swing.tree
javax.swing.JTreeを処理するためのクラスとインタフェースを提供します。
  • javax.swingでのIconの使用

    Iconを実装しているjavax.swing内のクラス 
    修飾子と型 クラス 説明
    class  ImageIcon
    アイコンをイメージからペイントするIconインタフェースの実装です。
    Iconとして宣言されているjavax.swing内のフィールド 
    修飾子と型 フィールド 説明
    protected Icon JInternalFrame.frameIcon
    内部フレームの左上隅に表示されるアイコンです。
    protected Icon JOptionPane.icon
    ペインで使用されるアイコンです。
    Iconを返すjavax.swing内のメソッド 
    修飾子と型 メソッド 説明
    Icon AbstractButton.getDisabledIcon()
    無効な状態のボタンのアイコンを返します。
    Icon JLabel.getDisabledIcon()
    無効な状態のラベルのアイコンを返します。
    Icon LookAndFeel.getDisabledIcon​(JComponent component, Icon icon)
    無効な状態のIconを返します。
    Icon JTabbedPane.getDisabledIconAt​(int index)
    indexのタブの使用不可のアイコンを返します。
    Icon AbstractButton.getDisabledSelectedIcon()
    無効で、かつ選択されている状態のボタンのアイコンを返します。
    Icon LookAndFeel.getDisabledSelectedIcon​(JComponent component, Icon icon)
    無効で、かつ選択されているコンポーネントによって使用されるIconを返します。
    Icon JInternalFrame.getFrameIcon()
    この内部フレームのタイトル・バー(通常は左上隅)に表示されるイメージを返します。
    Icon AbstractButton.getIcon()
    デフォルトのアイコンを返します。
    Icon JFileChooser.getIcon​(File f)
    このファイルまたはファイル・タイプのアイコンを返します。どちらが返されるかは、システムによって異なります。
    Icon JLabel.getIcon()
    ラベルに表示するグラフィック・イメージ(グリフやアイコン)を返します。
    Icon JOptionPane.getIcon()
    このペインが表示するアイコンを返します。
    Icon UIDefaults.getIcon​(Object key)
    keyの値がIconである場合はそれを返し、それ以外の場合はnullを返します。
    Icon UIDefaults.getIcon​(Object key, Locale l)
    指定されたLocalekeyの値がIconである場合はそれを返し、それ以外の場合はnullを返します。
    static Icon UIManager.getIcon​(Object key)
    デフォルトからIconを返します。
    static Icon UIManager.getIcon​(Object key, Locale l)
    デフォルトから、指定されたロケールに適したIconを返します。
    Icon JTabbedPane.getIconAt​(int index)
    indexのタブのアイコンを返します。
    Icon AbstractButton.getPressedIcon()
    押された状態のボタンのアイコンを返します。
    Icon AbstractButton.getRolloverIcon()
    反転した状態のボタンのアイコンを返します。
    Icon AbstractButton.getRolloverSelectedIcon()
    反転して選択された状態のボタンのアイコンを返します。
    Icon AbstractButton.getSelectedIcon()
    選択された状態のボタンのアイコンを返します。
    Icon TransferHandler.getVisualRepresentation​(Transferable t)
    転送の外観を設定するオブジェクトを返します。
    Icon型のパラメータを持つjavax.swing内のメソッド 
    修飾子と型 メソッド 説明
    void JTabbedPane.addTab​(String title, Icon icon, Component component)
    titleまたはicon、あるいはその両方(どちらかはnullでもかまわない)で表されるcomponentを追加します。
    void JTabbedPane.addTab​(String title, Icon icon, Component component, String tip)
    titleまたはicon、あるいはその両方(どちらかはnullでもかまわない)で表されるcomponentおよびtipを追加します。
    static MatteBorder BorderFactory.createMatteBorder​(int top, int left, int bottom, int right, Icon tileIcon)
    指定されたアイコンの複数のタイルで構成される飾り縁ボーダーを生成します。
    Icon LookAndFeel.getDisabledIcon​(JComponent component, Icon icon)
    無効な状態のIconを返します。
    Icon LookAndFeel.getDisabledSelectedIcon​(JComponent component, Icon icon)
    無効で、かつ選択されているコンポーネントによって使用されるIconを返します。
    int JTabbedPane.indexOfTab​(Icon icon)
    指定されたiconを持つ最初のタブ・インデックスを返します。そのアイコンを持つタブがない場合は -1を返します。
    protected void AbstractButton.init​(String text, Icon icon)
    AbstractButtonの初期化。
    protected void JMenuItem.init​(String text, Icon icon)
    指定されたテキストおよびアイコンでメニュー項目を初期化します。
    void JTextPane.insertIcon​(Icon g)
    現在選択されているコンテンツの置換後の内容としてドキュメントにアイコンを挿入します。
    void JTabbedPane.insertTab​(String title, Icon icon, Component component, String tip, int index)
    指定されたtitleまたはicon、あるいはその両方(どちらかはnullでもかまわない)で表される、指定されたcomponentの新しいタブを、指定されたindexの位置に挿入します。
    static String SwingUtilities.layoutCompoundLabel​(FontMetrics fm, String text, Icon icon, int verticalAlignment, int horizontalAlignment, int verticalTextPosition, int horizontalTextPosition, Rectangle viewR, Rectangle iconR, Rectangle textR, int textIconGap)
    アイコン起点の位置、テキスト・ベースライン起点の位置、および可能であればクリップされた複合ラベル文字列を計算して返します。
    static String SwingUtilities.layoutCompoundLabel​(JComponent c, FontMetrics fm, String text, Icon icon, int verticalAlignment, int horizontalAlignment, int verticalTextPosition, int horizontalTextPosition, Rectangle viewR, Rectangle iconR, Rectangle textR, int textIconGap)
    アイコン起点の位置、テキスト・ベースライン起点の位置、および可能であればクリップされた複合ラベル文字列を計算して返します。
    void AbstractButton.setDisabledIcon​(Icon disabledIcon)
    無効な状態のボタンのアイコンを設定します。
    void JLabel.setDisabledIcon​(Icon disabledIcon)
    このJLabelが無効にされている(JLabel.setEnabled(false)が実行されている)場合に表示されるアイコンを設定します。
    void JTabbedPane.setDisabledIconAt​(int index, Icon disabledIcon)
    indexの無効なアイコンをiconに設定します。nullにすることもできます。
    void AbstractButton.setDisabledSelectedIcon​(Icon disabledSelectedIcon)
    無効かつ選択状態のボタンのアイコンを設定します。
    void JInternalFrame.setFrameIcon​(Icon icon)
    この内部フレームのタイトル・バー(通常は左上隅)に表示するイメージを設定します。
    void AbstractButton.setIcon​(Icon defaultIcon)
    ボタンのデフォルトのアイコンを設定します。
    void JLabel.setIcon​(Icon icon)
    このコンポーネントが表示するアイコンを定義します。
    void JOptionPane.setIcon​(Icon newIcon)
    表示するアイコンを設定します。
    void JTabbedPane.setIconAt​(int index, Icon icon)
    indexのアイコンをiconに設定します。nullにすることもできます。
    void AbstractButton.setPressedIcon​(Icon pressedIcon)
    押された状態のボタンのアイコンを設定します。
    void AbstractButton.setRolloverIcon​(Icon rolloverIcon)
    反転した状態のボタンのアイコンを設定します。
    void AbstractButton.setRolloverSelectedIcon​(Icon rolloverSelectedIcon)
    反転して選択された状態のボタンのアイコンを設定します。
    void AbstractButton.setSelectedIcon​(Icon selectedIcon)
    選択された状態のボタンのアイコンを設定します。
    static int JOptionPane.showConfirmDialog​(Component parentComponent, Object message, String title, int optionType, int messageType, Icon icon)
    選択肢の数がoptionTypeパラメータによって決定される、指定されたアイコンを持つダイアログを表示します。
    static Object JOptionPane.showInputDialog​(Component parentComponent, Object message, String title, int messageType, Icon icon, Object[] selectionValues, Object initialSelectionValue)
    初期選択、指定可能な選択項目、およびそれ以外のすべてのオプションの指定が可能なブロッキング・ダイアログでユーザーに入力を求めます。
    static int JOptionPane.showInternalConfirmDialog​(Component parentComponent, Object message, String title, int optionType, int messageType, Icon icon)
    指定されたアイコンを持つ内部ダイアログ・パネルを表示します。選択項目数はoptionTypeパラメータで決まります。
    static Object JOptionPane.showInternalInputDialog​(Component parentComponent, Object message, String title, int messageType, Icon icon, Object[] selectionValues, Object initialSelectionValue)
    初期選択、指定可能な選択項目、およびそれ以外のすべてのオプションの指定が可能なブロッキング内部ダイアログでユーザーに入力を求めます。
    static void JOptionPane.showInternalMessageDialog​(Component parentComponent, Object message, String title, int messageType, Icon icon)
    すべてのパラメータを指定して、メッセージを表示するための内部ダイアログ・パネルを表示します。
    static int JOptionPane.showInternalOptionDialog​(Component parentComponent, Object message, String title, int optionType, int messageType, Icon icon, Object[] options, Object initialValue)
    指定されたアイコンを持つ内部ダイアログ・パネルを表示します。初期選択はinitialValueパラメータ、選択項目数はoptionTypeパラメータで決まります。
    static void JOptionPane.showMessageDialog​(Component parentComponent, Object message, String title, int messageType, Icon icon)
    すべてのパラメータを指定して、メッセージを表示するためのダイアログを表示します。
    static int JOptionPane.showOptionDialog​(Component parentComponent, Object message, String title, int optionType, int messageType, Icon icon, Object[] options, Object initialValue)
    最初の選択がinitialValueパラメータによって決定され、選択肢の数がoptionTypeパラメータによって決定される、指定されたアイコンを持つダイアログを表示します。
    Icon型のパラメータを持つjavax.swing内のコンストラクタ 
    コンストラクタ 説明
    AbstractAction​(String name, Icon icon)
    指定された名前および小さいアイコンを使用してActionを作成します。
    JButton​(String text, Icon icon)
    初期テキストおよびアイコン付きのボタンを生成します。
    JButton​(Icon icon)
    アイコン付きのボタンを生成します。
    JCheckBox​(String text, Icon icon)
    初期状態で選択されていない、指定されたテキストおよびアイコン付きのチェックボックスを生成します。
    JCheckBox​(String text, Icon icon, boolean selected)
    テキストおよびアイコン付きのチェックボックスを生成し、それが初期状態で選択されるかどうかを指定します。
    JCheckBox​(Icon icon)
    初期状態で選択されていない、アイコン付きのチェックボックスを生成します。
    JCheckBox​(Icon icon, boolean selected)
    アイコン付きのチェックボックスを生成し、それが初期状態で選択されるかどうかを指定します。
    JCheckBoxMenuItem​(String text, Icon icon)
    初期状態で選択されていない、指定されたテキストおよびアイコン付きのチェックボックス・メニュー項目を生成します。
    JCheckBoxMenuItem​(String text, Icon icon, boolean b)
    指定されたテキスト、アイコン、および選択状態を持つチェックボックス・メニュー項目を生成します。
    JCheckBoxMenuItem​(Icon icon)
    初期状態で選択されていない、アイコン付きのチェックボックス・メニュー項目を生成します。
    JLabel​(String text, Icon icon, int horizontalAlignment)
    指定されたテキスト、イメージ、および水平方向の配置方法で、JLabelのインスタンスを作成します。
    JLabel​(Icon image)
    JLabelのインスタンスを、指定されたイメージで作成します。
    JLabel​(Icon image, int horizontalAlignment)
    JLabelのインスタンスを、指定されたイメージと水平方向の配置方法で作成します。
    JMenuItem​(String text, Icon icon)
    指定されたテキストおよびアイコンでJMenuItemを作成します。
    JMenuItem​(Icon icon)
    指定されたアイコンでJMenuItemを作成します。
    JOptionPane​(Object message, int messageType, int optionType, Icon icon)
    指定されたメッセージ型、オプション、およびアイコンを使用して、メッセージを表示するためのJOptionPaneのインスタンスを生成します。
    JOptionPane​(Object message, int messageType, int optionType, Icon icon, Object[] options)
    指定されたメッセージ型、アイコン、およびオプションを使用して、メッセージを表示するためのJOptionPaneのインスタンスを生成します。
    JOptionPane​(Object message, int messageType, int optionType, Icon icon, Object[] options, Object initialValue)
    指定されたメッセージ型、アイコン、およびオプションを使い、初期状態で選択されているオプションを指定して、メッセージを表示するためのJOptionPaneのインスタンスを生成します。
    JRadioButton​(String text, Icon icon)
    初期状態では選択解除のラジオ・ボタンを、テキストとイメージの指定ありで作成します。
    JRadioButton​(String text, Icon icon, boolean selected)
    ラジオ・ボタンを、テキスト、イメージ、および選択状態の指定ありで作成します。
    JRadioButton​(Icon icon)
    初期状態では選択解除されているラジオ・ボタンを、イメージの指定あり、テキストの指定なしで作成します。
    JRadioButton​(Icon icon, boolean selected)
    ラジオ・ボタンを、選択状態とイメージの指定あり、テキストの指定なしで作成します。
    JRadioButtonMenuItem​(String text, Icon icon)
    指定されたIconとテキストを使用して、ラジオ・ボタン・メニュー項目を作成します。
    JRadioButtonMenuItem​(String text, Icon icon, boolean selected)
    ラジオ・ボタン・メニュー項目を、テキスト、イメージ、および選択状態を指定して作成します。
    JRadioButtonMenuItem​(Icon icon)
    アイコンを指定してJRadioButtonMenuItemを作成します。
    JRadioButtonMenuItem​(Icon icon, boolean selected)
    ラジオ・ボタン・メニュー項目を、イメージおよび選択状態を指定し、テキストを指定しないで作成します。
    JToggleButton​(String text, Icon icon)
    初期状態で選択解除されているトグル・ボタンを、指定されたテキストおよびイメージで作成します。
    JToggleButton​(String text, Icon icon, boolean selected)
    トグル・ボタンを、指定されたテキスト、イメージ、および選択状態で作成します。
    JToggleButton​(Icon icon)
    初期状態で選択解除されているトグル・ボタンを、イメージの指定あり、テキストの指定なしで作成します。
    JToggleButton​(Icon icon, boolean selected)
    トグル・ボタンを、イメージおよび選択状態の指定あり、テキストの指定なしで作成します。
  • javax.swing.borderでのIconの使用

    Iconとして宣言されているjavax.swing.border内のフィールド 
    修飾子と型 フィールド 説明
    protected Icon MatteBorder.tileIcon
    ボーダーのタイ・リングに使用されるアイコン。
    Iconを返すjavax.swing.border内のメソッド 
    修飾子と型 メソッド 説明
    Icon MatteBorder.getTileIcon()
    ボーダーのタイリングに使用したカラーを返します。べた一色が使用されている場合はnullを返します。
    Icon型のパラメータを持つjavax.swing.border内のコンストラクタ 
    コンストラクタ 説明
    MatteBorder​(int top, int left, int bottom, int right, Icon tileIcon)
    飾り縁ボーダーを、指定されたイン・セットおよびタイル・アイコンで作成します。
    MatteBorder​(Insets borderInsets, Icon tileIcon)
    飾り縁ボーダーを、指定されたイン・セットおよびタイル・アイコンで作成します。
    MatteBorder​(Icon tileIcon)
    飾り縁ボーダーを、指定されたタイル・アイコンで作成します。
  • javax.swing.colorchooserでのIconの使用

    Iconを返すjavax.swing.colorchooser内のメソッド 
    修飾子と型 メソッド 説明
    abstract Icon AbstractColorChooserPanel.getLargeDisplayIcon()
    パネルの大きな表示アイコンを返します。
    abstract Icon AbstractColorChooserPanel.getSmallDisplayIcon()
    パネルの小さな表示アイコンを返します。
  • javax.swing.filechooserでのIconの使用

    Iconを返すjavax.swing.filechooser内のメソッド 
    修飾子と型 メソッド 説明
    Icon FileView.getIcon​(File f)
    JFileChooserでこのファイルを表すアイコンです。
    Icon FileSystemView.getSystemIcon​(File f)
    システム・ファイル・ブラウザに表示されるファイル、ディレクトリ、またはフォルダのアイコンです。
  • javax.swing.plafでのIconの使用

    Iconを実装しているjavax.swing.plaf内のクラス 
    修飾子と型 クラス 説明
    class  IconUIResource
    UIResourceを実装するIconラッパー・クラスです。
    Icon型のパラメータを持つjavax.swing.plaf内のコンストラクタ 
    コンストラクタ 説明
    IconUIResource​(Icon delegate)
    既存のIconインスタンスをラップする、UIResourceのアイコン・オブジェクトを作成します。
    MatteBorderUIResource​(int top, int left, int bottom, int right, Icon tileIcon)
    MatteBorderUIResourceを構築します。
    MatteBorderUIResource​(Icon tileIcon)
    MatteBorderUIResourceを構築します。
  • javax.swing.plaf.basicでのIconの使用

    Iconとして宣言されているjavax.swing.plaf.basic内のフィールド 
    修飾子と型 フィールド 説明
    protected Icon BasicMenuItemUI.arrowIcon
    矢印アイコン。
    protected Icon BasicMenuItemUI.checkIcon
    チェック・アイコン。
    protected Icon BasicInternalFrameTitlePane.closeIcon
    閉じるアイコン。
    protected Icon BasicTreeUI.collapsedIcon
    折りたたまれたアイコン。
    protected Icon BasicFileChooserUI.computerIcon
    コンピュータ・アイコン
    protected Icon BasicFileChooserUI.detailsViewIcon
    詳細表示アイコン
    protected Icon BasicFileChooserUI.directoryIcon
    ディレクトリ・アイコン
    protected Icon BasicTreeUI.expandedIcon
    展開されたアイコン。
    protected Icon BasicFileChooserUI.fileIcon
    ファイル・アイコン
    protected Icon BasicFileChooserUI.floppyDriveIcon
    フロッピ・ドライブ・アイコン
    protected Icon BasicFileChooserUI.hardDriveIcon
    ハード・ドライブ・アイコン
    protected Icon BasicFileChooserUI.homeFolderIcon
    ホーム・フォルダ・アイコン
    protected Icon BasicRadioButtonUI.icon
    アイコン。
    protected Icon BasicInternalFrameTitlePane.iconIcon
    アイコン化アイコン。
    protected Icon BasicFileChooserUI.listViewIcon
    アイコン
    protected Icon BasicInternalFrameTitlePane.maxIcon
    最大化アイコン。
    protected Icon BasicInternalFrameTitlePane.minIcon
    最小化アイコン。
    protected Icon BasicFileChooserUI.newFolderIcon
    「新規フォルダ」アイコン
    protected Icon BasicFileChooserUI.upFolderIcon
    上のフォルダ・アイコン
    protected Icon BasicFileChooserUI.viewMenuIcon
    表示メニュー・アイコン
    Icon型の型パラメータを持つjavax.swing.plaf.basic内のフィールド 
    修飾子と型 フィールド 説明
    protected Hashtable<File,​Icon> BasicFileChooserUI.BasicFileView.iconCache
    アイコン・キャッシュ
    Iconを返すjavax.swing.plaf.basic内のメソッド 
    修飾子と型 メソッド 説明
    static Icon BasicIconFactory.createEmptyFrameIcon()
    空のフレーム・アイコンを返します。
    Icon BasicFileChooserUI.BasicFileView.getCachedIcon​(File f)
    ファイルのキャッシュされたアイコンを返します。
    static Icon BasicIconFactory.getCheckBoxIcon()
    チェックボックスのアイコンを返します。
    static Icon BasicIconFactory.getCheckBoxMenuItemIcon()
    チェックボックスのメニュー・アイテム・アイコンを返します。
    Icon BasicTreeUI.getCollapsedIcon()
    折りたたまれたアイコンを返します。
    Icon BasicRadioButtonUI.getDefaultIcon()
    デフォルトのアイコンを返します。
    Icon BasicTreeUI.getExpandedIcon()
    展開されたアイコンを返します。
    protected Icon BasicOptionPaneUI.getIcon()
    レシーバがルック・アンド・フィールを提供しているJOptionPaneからのアイコン、またはgetDefaultIconから返されたデフォルトのアイコンを返します。
    protected Icon BasicTabbedPaneUI.getIconForTab​(int tabIndex)
    タブのアイコンを返します。
    protected Icon BasicOptionPaneUI.getIconForType​(int messageType)
    渡されたタイプに使用するアイコンを返します。
    static Icon BasicIconFactory.getMenuArrowIcon()
    メニューの矢印アイコンを返します。
    static Icon BasicIconFactory.getMenuItemArrowIcon()
    メニュー・アイテムの矢印アイコンを返します。
    static Icon BasicIconFactory.getMenuItemCheckIcon()
    メニュー・アイテムのチェック・アイコンを返します。
    static Icon BasicIconFactory.getRadioButtonIcon()
    ラジオ・ボタンのアイコンを返します。
    static Icon BasicIconFactory.getRadioButtonMenuItemIcon()
    ラジオ・ボタンのメニュー・アイテム・アイコンを返します。
    Icon型のパラメータを持つjavax.swing.plaf.basic内のメソッド 
    修飾子と型 メソッド 説明
    void BasicFileChooserUI.BasicFileView.cacheIcon​(File f, Icon i)
    ファイルのアイコンをキャッシュします。
    protected void BasicTreeUI.drawCentered​(Component c, Graphics graphics, Icon icon, int x, int y)
    (x,y)を中心とするiconを描画します。
    protected Dimension BasicMenuItemUI.getPreferredMenuItemSize​(JComponent c, Icon checkIcon, Icon arrowIcon, int defaultTextIconGap)
    メニュー・アイテムの優先サイズを返します。
    protected String BasicLabelUI.layoutCL​(JLabel label, FontMetrics fontMetrics, String text, Icon icon, Rectangle viewR, Rectangle iconR, Rectangle textR)
    呼出しをSwingUtilities.layoutCompoundLabel()に転送します。
    protected void BasicTabbedPaneUI.layoutLabel​(int tabPlacement, FontMetrics metrics, int tabIndex, String title, Icon icon, Rectangle tabRect, Rectangle iconRect, Rectangle textRect, boolean isSelected)
    ラベルをレイアウトします。
    protected void BasicTabbedPaneUI.paintIcon​(Graphics g, int tabPlacement, int tabIndex, Icon icon, Rectangle iconRect, boolean isSelected)
    アイコンをペイントします。
    protected void BasicMenuItemUI.paintMenuItem​(Graphics g, JComponent c, Icon checkIcon, Icon arrowIcon, Color background, Color foreground, int defaultTextIconGap)
    メニュー・アイテムをペイントします。
    void BasicTreeUI.setCollapsedIcon​(Icon newG)
    折りたたまれたアイコンを設定します。
    void BasicTreeUI.setExpandedIcon​(Icon newG)
    展開されたアイコンを設定します。
  • javax.swing.plaf.metalでのIconの使用

    Iconを実装しているjavax.swing.plaf.metal内のクラス 
    修飾子と型 クラス 説明
    class  MetalCheckBoxIcon
    OrganicCheckBoxUIに使用するCheckboxIconの実装です
    class  MetalComboBoxIcon
    MetalComboBoxを示す水平線を描画するユーティリティ・クラスです。
    static class  MetalIconFactory.FileIcon16
    警告: このクラスの直列化されたオブジェクトは、今後のSwingリリースと互換ではなくなる予定です。
    static class  MetalIconFactory.FolderIcon16
    警告: このクラスの直列化されたオブジェクトは、今後のSwingリリースと互換ではなくなる予定です。
    static class  MetalIconFactory.PaletteCloseIcon
    Paletteクローズのアイコンを定義します。
    static class  MetalIconFactory.TreeControlIcon
    警告: このクラスの直列化されたオブジェクトは、今後のSwingリリースと互換ではなくなる予定です。
    static class  MetalIconFactory.TreeFolderIcon
    警告: このクラスの直列化されたオブジェクトは、今後のSwingリリースと互換ではなくなる予定です。
    static class  MetalIconFactory.TreeLeafIcon
    クラスはツリーのリーフのアイコンを表します。
    Iconとして宣言されているjavax.swing.plaf.metal内のフィールド 
    修飾子と型 フィールド 説明
    protected Icon MetalComboBoxButton.comboIcon
    アイコン。
    protected static Icon MetalSliderUI.horizThumbIcon
    デフォルトの水平サムIconです。
    protected Icon MetalInternalFrameTitlePane.paletteCloseIcon
    パレット・クローズ・アイコン。
    protected static Icon MetalSliderUI.vertThumbIcon
    デフォルトの垂直サムIconです。
    Iconを返すjavax.swing.plaf.metal内のメソッド 
    修飾子と型 メソッド 説明
    static Icon MetalIconFactory.getCheckBoxIcon()
    チェックボックス・アイコンを返します。
    static Icon MetalIconFactory.getCheckBoxMenuItemIcon()
    JCheckBoxMenuItemによって使用されるアイコンを返します。
    Icon MetalComboBoxButton.getComboIcon()
    JComboBoxのアイコンを返します。
    Icon MetalLookAndFeel.getDisabledIcon​(JComponent component, Icon icon)
    無効な状態のIconを返します。
    Icon MetalLookAndFeel.getDisabledSelectedIcon​(JComponent component, Icon icon)
    無効で、かつ選択されているコンポーネントによって使用されるIconを返します。
    static Icon MetalIconFactory.getFileChooserDetailViewIcon()
    FileChooserDetailViewIconのインスタンスを返します。
    static Icon MetalIconFactory.getFileChooserHomeFolderIcon()
    FileChooserHomeFolderIconのインスタンスを返します。
    static Icon MetalIconFactory.getFileChooserListViewIcon()
    FileChooserListViewIconのインスタンスを返します。
    static Icon MetalIconFactory.getFileChooserNewFolderIcon()
    FileChooserNewFolderIconのインスタンスを返します。
    static Icon MetalIconFactory.getFileChooserUpFolderIcon()
    FileChooserUpFolderIconのインスタンスを返します。
    static Icon MetalIconFactory.getHorizontalSliderThumbIcon()
    水平スライダで使用するサム・アイコンを返します。
    static Icon MetalIconFactory.getInternalFrameAltMaximizeIcon​(int size)
    InternalFrameAltMaximizeIconの新しいインスタンスを構築します。
    static Icon MetalIconFactory.getInternalFrameCloseIcon​(int size)
    InternalFrameCloseIconの新しいインスタンスを構築します。
    static Icon MetalIconFactory.getInternalFrameDefaultMenuIcon()
    InternalFrameDefaultMenuIconのインスタンスを返します。
    static Icon MetalIconFactory.getInternalFrameMaximizeIcon​(int size)
    InternalFrameMaximizeIconの新しいインスタンスを構築します。
    static Icon MetalIconFactory.getInternalFrameMinimizeIcon​(int size)
    InternalFrameMinimizeIconの新しいインスタンスを構築します。
    static Icon MetalIconFactory.getMenuArrowIcon()
    JMenuが使用するアイコンを返します。
    static Icon MetalIconFactory.getMenuItemArrowIcon()
    JMenuItemが使用するアイコンを返します。
    static Icon MetalIconFactory.getMenuItemCheckIcon()
    JCheckBoxMenuItemによって使用されるアイコンを返します。
    static Icon MetalIconFactory.getRadioButtonIcon()
    RadioButtonIconのインスタンスを返します。
    static Icon MetalIconFactory.getRadioButtonMenuItemIcon()
    JRadioButtonMenuItemが使用するアイコンを返します。
    static Icon MetalIconFactory.getTreeComputerIcon()
    TreeComputerIconのインスタンスを返します。
    static Icon MetalIconFactory.getTreeControlIcon​(boolean isCollapsed)
    TreeControlIconの新しいインスタンスを構築します。
    static Icon MetalIconFactory.getTreeFloppyDriveIcon()
    TreeFloppyDriveIconのインスタンスを返します。
    static Icon MetalIconFactory.getTreeFolderIcon()
    TreeFolderIconの新しいインスタンスを構築します。
    static Icon MetalIconFactory.getTreeHardDriveIcon()
    TreeHardDriveIconのインスタンスを返します。
    static Icon MetalIconFactory.getTreeLeafIcon()
    TreeLeafIconの新しいインスタンスを構築します。
    static Icon MetalIconFactory.getVerticalSliderThumbIcon()
    垂直スライダで使用するサム・アイコンを返します。
    Icon型のパラメータを持つjavax.swing.plaf.metal内のメソッド 
    修飾子と型 メソッド 説明
    Icon MetalLookAndFeel.getDisabledIcon​(JComponent component, Icon icon)
    無効な状態のIconを返します。
    Icon MetalLookAndFeel.getDisabledSelectedIcon​(JComponent component, Icon icon)
    無効で、かつ選択されているコンポーネントによって使用されるIconを返します。
    void MetalComboBoxButton.setComboIcon​(Icon i)
    JComboBoxのアイコンを設定します。
    Icon型のパラメータを持つjavax.swing.plaf.metal内のコンストラクタ 
    コンストラクタ 説明
    MetalComboBoxButton​(JComboBox<Object> cb, Icon i, boolean onlyIcon, CellRendererPane pane, JList<Object> list)
    MetalComboBoxButtonの新しいインスタンスを構築します。
    MetalComboBoxButton​(JComboBox<Object> cb, Icon i, CellRendererPane pane, JList<Object> list)
    MetalComboBoxButtonの新しいインスタンスを構築します。
  • javax.swing.plaf.synthでのIconの使用

    javax.swing.plaf.synthIconのサブインタフェース
    修飾子と型 インタフェース 説明
    interface  SynthIcon
    SynthContextを渡されたアイコン。
    Iconを返すjavax.swing.plaf.synth内のメソッド 
    修飾子と型 メソッド 説明
    protected Icon SynthButtonUI.getDefaultIcon​(AbstractButton b)
    デフォルトのアイコンを返します。
    protected Icon SynthButtonUI.getIcon​(AbstractButton b)
    ボタンのペイントに使用するアイコンを返します。
    Icon SynthStyle.getIcon​(SynthContext context, Object key)
    値がIconである特定のスタイル・プロパティを取得する簡易メソッドです。
    protected Icon SynthButtonUI.getSizingIcon​(AbstractButton b)
    推奨/最小/最大サイズの計算に使われるアイコンを返します。
    protected Icon SynthRadioButtonUI.getSizingIcon​(AbstractButton b)
    推奨/最小/最大サイズの計算に使われるアイコンを返します。
    Icon型のパラメータを持つjavax.swing.plaf.synth内のメソッド 
    修飾子と型 メソッド 説明
    static int SynthGraphicsUtils.getIconHeight​(Icon icon, SynthContext context)
    アイコンの高さを返します。
    static int SynthGraphicsUtils.getIconWidth​(Icon icon, SynthContext context)
    アイコンの幅を返します。
    Dimension SynthGraphicsUtils.getMaximumSize​(SynthContext ss, Font font, String text, Icon icon, int hAlign, int vAlign, int hTextPosition, int vTextPosition, int iconTextGap, int mnemonicIndex)
    アイコンやテキストを正しくレンダリングするのに必要な最大サイズを返します。
    Dimension SynthGraphicsUtils.getMinimumSize​(SynthContext ss, Font font, String text, Icon icon, int hAlign, int vAlign, int hTextPosition, int vTextPosition, int iconTextGap, int mnemonicIndex)
    アイコンやテキストを正しくレンダリングするのに必要な最小サイズを返します。
    Dimension SynthGraphicsUtils.getPreferredSize​(SynthContext ss, Font font, String text, Icon icon, int hAlign, int vAlign, int hTextPosition, int vTextPosition, int iconTextGap, int mnemonicIndex)
    アイコンやテキストを正しくレンダリングするのに必要な推奨サイズを返します。
    String SynthGraphicsUtils.layoutText​(SynthContext ss, FontMetrics fm, String text, Icon icon, int hAlign, int vAlign, int hTextPosition, int vTextPosition, Rectangle viewR, Rectangle iconR, Rectangle textR, int iconTextGap)
    テキストとアイコンを配置する位置を参照で返すテキストとアイコンをレイアウトします。
    static void SynthGraphicsUtils.paintIcon​(Icon icon, SynthContext context, Graphics g, int x, int y, int width, int height)
    アイコンをペイントします。
    void SynthGraphicsUtils.paintText​(SynthContext ss, Graphics g, String text, Icon icon, int hAlign, int vAlign, int hTextPosition, int vTextPosition, int iconTextGap, int mnemonicIndex, int textOffset)
    アイコンとテキストをペイントします。
  • javax.swing.textでのIconの使用

    Iconを返すjavax.swing.text内のメソッド 
    修飾子と型 メソッド 説明
    static Icon StyleConstants.getIcon​(AttributeSet a)
    属性リストからアイコンの設定を返します。
    Icon型のパラメータを持つjavax.swing.text内のメソッド 
    修飾子と型 メソッド 説明
    static void StyleConstants.setIcon​(MutableAttributeSet a, Icon c)
    アイコンの属性を設定します。
  • javax.swing.text.htmlでのIconの使用

    Iconを返すjavax.swing.text.html内のメソッド 
    修飾子と型 メソッド 説明
    Icon ImageView.getLoadingImageIcon()
    イメージのロード処理中に使うアイコンを返します。
    Icon ImageView.getNoImageIcon()
    イメージが見つからない場合に使用するアイコンを返します。
  • javax.swing.treeでのIconの使用

    Iconとして宣言されているjavax.swing.tree内のフィールド 
    修飾子と型 フィールド 説明
    protected Icon DefaultTreeCellRenderer.closedIcon
    展開されていない、葉以外のノードを表示するのに使うアイコンです。
    protected Icon DefaultTreeCellEditor.editingIcon
    編集時に使うアイコンです。
    protected Icon DefaultTreeCellRenderer.leafIcon
    葉ノードを表示するのに使うアイコンです。
    protected Icon DefaultTreeCellRenderer.openIcon
    展開されている、葉以外のノードを表示するのに使うアイコンです。
    Iconを返すjavax.swing.tree内のメソッド 
    修飾子と型 メソッド 説明
    Icon DefaultTreeCellRenderer.getClosedIcon()
    展開されていない葉以外のノードを表すために使用するアイコンを返します。
    Icon DefaultTreeCellRenderer.getDefaultClosedIcon()
    展開されていない葉以外のノードを表すために使用する、現在の葉のデフォルト・アイコンを返します。
    Icon DefaultTreeCellRenderer.getDefaultLeafIcon()
    葉ノードを表すために使用する、現在の葉のデフォルト・アイコンを返します。
    Icon DefaultTreeCellRenderer.getDefaultOpenIcon()
    展開されている葉以外のノードを表すために使用する、現在の葉のデフォルト・アイコンを返します。
    Icon DefaultTreeCellRenderer.getLeafIcon()
    葉ノードを表すために使用するアイコンを返します。
    Icon DefaultTreeCellRenderer.getOpenIcon()
    展開されている葉以外のノードを表すために使用するアイコンを返します。
    Icon型のパラメータを持つjavax.swing.tree内のメソッド 
    修飾子と型 メソッド 説明
    void DefaultTreeCellRenderer.setClosedIcon​(Icon newIcon)
    展開されていない葉以外のノードを表すために使用するアイコンを設定します。
    void DefaultTreeCellRenderer.setLeafIcon​(Icon newIcon)
    葉ノードを表すために使用するアイコンを設定します。
    void DefaultTreeCellRenderer.setOpenIcon​(Icon newIcon)
    展開されている葉以外のノードを表すために使用するアイコンを設定します。