<resource-image>要素
ネームスペース: http://xmlns.oracle.com/uix/ui/laf

<resource-image>要素は、クラスパスからリソースとしてロードされるイメージ・アイコンを定義します。

構文
<resource-image
      uri="anyURI"
    [ height="positiveInteger" ]
    [ rtl-uri="anyURI" ]
    [ styleClass="string" ]
    [ width="positiveInteger" ]
>
     <!-- The following child can be anything derived from the given element -->
   <inlineStyle></inlineStyle>
</resource-image>

注意:
  • この要素は<icon>要素内で使用されます。

  • 説明

    <resource-image>要素は、ClassLoader.getResource()を使用してクラスパスからロードされるアイコンを登録します。 その他のアイコン・タイプ(context-imageやuri-imageなど)とは異なり、リソース・イメージ・アイコンはWebアプリケーションにインストールする必要がありません。 かわりに、リソース・イメージ・アイコンは、JARファイル内にパッケージしてクラスパスから直接ロードできます。

    uri属性は、クラスパス上に存在するイメージ・ファイルへのパスである必要があります。


    次の例では、リソース・イメージ・アイコンを登録する方法を示します。

                    <!-- Replace the error icon with a resource image icon.  -->
                    <icon name="ui:error">
                      <resource-image uri="org/example/laf/custom/images/error.gif"/>
                    </icon>

    属性

    説明
    height イメージ・アイコンの高さ。
    positiveInteger
    rtl-uri 右から左へ記述する言語用のアイコンのURI。 rtl-uri属性を指定しない場合、uri属性の値が左から右と右から左の両方の記述方向の言語に使用されます。
    URI
    styleClass アイコンのイメージに適用されるスタイル・クラス。
    string
    uri アイコンのURI。  必須。
    URI
    width イメージ・アイコンの幅。
    positiveInteger

    子要素

    説明 必須 組込み可能な数
    <inlineStyle>
    アイコンのインライン・スタイル。
    いいえ 無限