-
- 既知のすべてのサブインタフェース:
SynthIcon
- 既知のすべての実装クラス:
IconUIResource,ImageIcon,MetalCheckBoxIcon,MetalComboBoxIcon,MetalIconFactory.FileIcon16,MetalIconFactory.FolderIcon16,MetalIconFactory.PaletteCloseIcon,MetalIconFactory.TreeControlIcon,MetalIconFactory.TreeFolderIcon,MetalIconFactory.TreeLeafIcon
public interface Icon通常はコンポーネントを装飾するために使う、固定サイズの小型イメージです。- 導入されたバージョン:
- 1.2
- 関連項目:
ImageIcon
-
-
メソッドのサマリー
すべてのメソッド インスタンス・メソッド 抽象メソッド 修飾子と型 メソッド 説明 intgetIconHeight()アイコンの高さを返します。intgetIconWidth()アイコンの幅を返します。voidpaintIcon(Component c, Graphics g, int x, int y)指定された位置にアイコンを描画します。
-
-
-
メソッドの詳細
-
paintIcon
void paintIcon(Component c, Graphics g, int x, int y)
指定された位置にアイコンを描画します。 Iconの実装はコンポーネント引数を使って、フォアグラウンド・カラーまたはバックグラウンド・カラーなどを描画するのに使用するプロパティを取得できます。- パラメータ:
c- ペイントに便利なプロパティを取得するComponentg- グラフィックス・コンテキストx- アイコンの左上隅のX座標y- アイコンの左上隅のY座標
-
getIconWidth
int getIconWidth()
アイコンの幅を返します。- 戻り値:
- アイコンの固定の幅を指定するint値
-
getIconHeight
int getIconHeight()
アイコンの高さを返します。- 戻り値:
- アイコンの固定の高さを指定するint値
-
-