Java プラットフォーム 1.2

javax.swing.text
クラス DefaultStyledDocument.ElementSpec

java.lang.Object
  |
  +--javax.swing.text.DefaultStyledDocument.ElementSpec

public static class DefaultStyledDocument.ElementSpec
extends Object

要素を構築するための仕様です。

警告: このクラスの直列化されたオブジェクトは、今後の Swing リリースと互換ではなくなる予定です。現在の直列化のサポートは、短期間の運用や、同じバージョンの Swing を実行するアプリケーション間の RMI に適しています。今後の Swing リリースでは、長期間の持続性をサポートする予定です。


フィールドの概要
static short ContentType
          getType の値です。
static short EndTagType
          getType の値です。
static short JoinFractureDirection
          getDirection の値です。
static short JoinNextDirection
          getDirection の値です。
static short JoinPreviousDirection
          getDirection の値です。
static short OriginateDirection
          getDirection の値です。
static short StartTagType
          getType の値です。
 
コンストラクタの概要
DefaultStyledDocument.ElementSpec(AttributeSet a, short type)
          マークアップがドキュメントに格納されないときに、マークアップに有用なコンストラクタです。
DefaultStyledDocument.ElementSpec(AttributeSet a, short type, char[] txt, int offs, int len)
          コンテンツとマークアップをドキュメントにバッチ入力するためのスペックを外部に作成するのに使うコンストラクタです。
DefaultStyledDocument.ElementSpec(AttributeSet a, short type, int len)
          データは追加済みだが長さの情報が必要なときに、ドキュメント内の解析に使うコンストラクタです。
 
メソッドの概要
 char[] getArray()
          文字列の配列を取得します。
 AttributeSet getAttributes()
          要素の属性を取得します。
 short getDirection()
          方向を取得します。
 int getLength()
          長さを取得します。
 int getOffset()
          開始オフセットを取得します。
 short getType()
          要素のタイプを取得します。
 void setDirection(short direction)
          方向を設定します。
 void setType(short type)
          要素のタイプを設定します。
 String toString()
          要素を文字列に変換します。
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

フィールドの詳細

StartTagType

public static final short StartTagType
getType の値です。このレコードのタイプが開始タグであることを指定し、要素の開始を指定するマークアップを表します。

EndTagType

public static final short EndTagType
getType の値です。このレコードのタイプが終了タグであることを指定し、要素の終了を指定するマークアップを表します。

ContentType

public static final short ContentType
getType の値です。このレコードのタイプがコンテンツを表すことを指定します。

JoinPreviousDirection

public static final short JoinPreviousDirection
getDirection の値です。このレコードに関連付けられているデータを、先行する内容に結合するように指定します。

JoinNextDirection

public static final short JoinNextDirection
getDirection の値です。このレコードに関連付けられているデータを、後に続く内容に結合するように指定します。

OriginateDirection

public static final short OriginateDirection
getDirection の値です。このレコードに関連付けられているデータを、新しい要素の作成に使うように指定します。これが通常の値になります。

JoinFractureDirection

public static final short JoinFractureDirection
getDirection の値です。このレコードに関連付けられているデータを、分割要素に結合するように指定します。
コンストラクタの詳細

DefaultStyledDocument.ElementSpec

public DefaultStyledDocument.ElementSpec(AttributeSet a,
                                         short type)
マークアップがドキュメントに格納されないときに、マークアップに有用なコンストラクタです。
パラメータ:
a - 要素の属性
type - 要素のタイプ (StartTagType、EndTagType、ContentType)

DefaultStyledDocument.ElementSpec

public DefaultStyledDocument.ElementSpec(AttributeSet a,
                                         short type,
                                         int len)
データは追加済みだが長さの情報が必要なときに、ドキュメント内の解析に使うコンストラクタです。
パラメータ:
a - 要素の属性
type - 要素のタイプ (StartTagType、EndTagType、ContentType)
len - 長さ >= 0

DefaultStyledDocument.ElementSpec

public DefaultStyledDocument.ElementSpec(AttributeSet a,
                                         short type,
                                         char[] txt,
                                         int offs,
                                         int len)
コンテンツとマークアップをドキュメントにバッチ入力するためのスペックを外部に作成するのに使うコンストラクタです。
パラメータ:
a - 要素の属性
type - 要素のタイプ (StartTagType、EndTagType、ContentType)
txt - 要素のテキスト
offs - テキストに対するオフセット >= 0
len - テキストの長さ >= 0
メソッドの詳細

setType

public void setType(short type)
要素のタイプを設定します。
パラメータ:
type - 要素のタイプ (StartTagType、EndTagType、ContentType)

getType

public short getType()
要素のタイプを取得します。
戻り値:
要素のタイプ (StartTagType、EndTagType、ContentType)

setDirection

public void setDirection(short direction)
方向を設定します。
パラメータ:
direction - 方向 (JoinPreviousDirection、JoinNextDirection)

getDirection

public short getDirection()
方向を取得します。
戻り値:
方向 (JoinPreviousDirection、JoinNextDirection)

getAttributes

public AttributeSet getAttributes()
要素の属性を取得します。
戻り値:
属性セット

getArray

public char[] getArray()
文字列の配列を取得します。
戻り値:
配列

getOffset

public int getOffset()
開始オフセットを取得します。
戻り値:
開始オフセット >= 0

getLength

public int getLength()
長さを取得します。
戻り値:
長さ >= 0

toString

public String toString()
要素を文字列に変換します。
戻り値:
文字列
オーバーライド:
クラス Object 内の toString

Java プラットフォーム 1.2

バグや機能要求の報告
新しい javadoc の表示についてのコメントやご提案
Java は、米国およびその他の国における米国 Sun Microsystems, Inc. の商標もしくは登録商標です。
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.