JavaTM Platform
Standard Ed. 6

javax.swing.text
クラス DefaultStyledDocument.ElementSpec

java.lang.Object
  上位を拡張 javax.swing.text.DefaultStyledDocument.ElementSpec
含まれているクラス:
DefaultStyledDocument

public static class DefaultStyledDocument.ElementSpec
extends Object

要素を構築する実装です。

警告: このクラスの直列化されたオブジェクトは、今後の Swing リリースと互換ではなくなる予定です。現在の直列化のサポートは、短期間の運用や、同じバージョンの Swing を実行するアプリケーション間の RMI に適しています。JDK Version 1.4 以降、すべての JavaBeans の長期間の運用サポートは、java.beans パッケージに追加されています。詳細は、XMLEncoder を参照してください。


フィールドの概要
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)
          データがすでに追加されているが 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)
データがすでに追加されているが 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
戻り値:
文字列

JavaTM Platform
Standard Ed. 6

バグの報告と機能のリクエスト
さらに詳しい API リファレンスおよび開発者ドキュメントについては、Java SE 開発者用ドキュメントを参照してください。開発者向けの詳細な解説、概念の概要、用語の定義、バグの回避策、およびコード実例が含まれています。

Copyright 2009 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Documentation Redistribution Policy も参照してください。