|
|||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||
概要: 内部クラス | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Object | +--oracle.html.IHtmlItemImpl | +--oracle.html.StyleElement
説明:
StyleElementクラスとStyleクラスはいっしょに機能して、CSS1(Cascading Style Sheet Level 1)の埋込みサポートおよびインライン・サポートを提供します。
使用方法:
このクラスのインスタンスを使用して、特定のスタイルを定義するスタイル・プロパティ(フォント、カラー、サイズなど)をグループ化します。 次に、このクラスのインスタンスをStyleクラスのインスタンスに関連付けることにより、特定のHTML要素/タグを定義済みのスタイルに関連付けます。
例:
// Creats a new HtmlHead object Htmlhead hd = new HtmlHead("Style Example"); // Creats a new Style object Style s = new Style(); // Creates a new StyleElement object StyleElement se = new StyleElement(); // adds a font property to this object se.addProperty("font", "10pt Arial"); // adds the new object to the Style object s.addElement("BODY", se); // adds the style object to the head object hd.addStyle(s);
Style
, HtmlHead
コンストラクタの概要 | |
StyleElement()
空のStyleElementオブジェクトを作成します。 |
メソッドの概要 | |
StyleElement |
addProperty(java.lang.String name, java.lang.String value)
StyleElementオブジェクトにスタイル・プロパティ(名前/値ペア)を追加します。 |
java.util.Enumeration |
properties()
|
java.lang.String |
propertyAt(int index)
指定された位置にあるプロパティを取り出します。 |
StyleElement |
setPropertyAt(java.lang.String name, java.lang.String value, int index)
インデックスにより指定された位置にプロパティを設定します。 |
int |
size()
オブジェクト内のプロパティ数を返します。 |
java.lang.String |
toHTML()
オブジェクトの内容をHTML文字列として返します。 |
java.lang.String |
toString()
|
クラス oracle.html.IHtmlItemImplから継承したメソッド |
print, print |
クラス java.lang.Objectから継承したメソッド |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
コンストラクタの詳細 |
public StyleElement()
メソッドの詳細 |
public StyleElement addProperty(java.lang.String name, java.lang.String value)
name
- スタイルの名前(たとえば「font」)value
- 指定されたスタイルの値(たとえば「10pt」)public java.lang.String propertyAt(int index)
index
- 指定された位置public StyleElement setPropertyAt(java.lang.String name, java.lang.String value, int index)
name
- プロパティの名前(たとえば「font」)value
- プロパティの値(たとえば「10pt Arial」)index
- 指定された位置public int size()
public java.lang.String toHTML()
public java.lang.String toString()
public java.util.Enumeration properties()
|
|||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||
概要: 内部クラス | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |