JavaTM Platform
Standard Ed. 6

javax.swing.text.html.parser
クラス Element

java.lang.Object
  上位を拡張 javax.swing.text.html.parser.Element
すべての実装されたインタフェース:
Serializable, DTDConstants

public final class Element
extends Object
implements DTDConstants, Serializable

ELEMENT 構成要素を使って DTD に記述されたとおりの要素です。これは、タグに不可欠な記述です。タイプ、コンテンツモデル、属性、属性の型などを記述しています。 この記述は、ドキュメントを正しく解析するために Parser により使われます。

関連項目:
DTD, AttributeList

フィールドの概要
 AttributeList atts
           
 ContentModel content
           
 Object data
          ユーザーデータを格納するフィールドです。
 BitSet exclusions
           
 BitSet inclusions
           
 int index
           
 String name
           
 boolean oEnd
           
 boolean oStart
           
 int type
           
 
インタフェース javax.swing.text.html.parser.DTDConstants から継承されたフィールド
ANY, CDATA, CONREF, CURRENT, DEFAULT, EMPTY, ENDTAG, ENTITIES, ENTITY, FIXED, GENERAL, ID, IDREF, IDREFS, IMPLIED, MD, MODEL, MS, NAME, NAMES, NMTOKEN, NMTOKENS, NOTATION, NUMBER, NUMBERS, NUTOKEN, NUTOKENS, PARAMETER, PI, PUBLIC, RCDATA, REQUIRED, SDATA, STARTTAG, SYSTEM
 
メソッドの概要
 AttributeList getAttribute(String name)
          属性を名前で取得します。
 AttributeList getAttributeByValue(String name)
          属性を値で取得します。
 AttributeList getAttributes()
          属性を取得します。
 ContentModel getContent()
          コンテンツモデルを返します。
 int getIndex()
          インデックスを取得します。
 String getName()
          要素の名前を取得します。
 int getType()
          型を取得します。
 boolean isEmpty()
          空かどうかを判定します。
static int name2type(String nm)
           
 boolean omitEnd()
          終了タグを省略できる場合に true を返します。
 boolean omitStart()
          開始タグを省略できる場合に true を返します。
 String toString()
          文字列に変換します。
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

フィールドの詳細

index

public int index

name

public String name

oStart

public boolean oStart

oEnd

public boolean oEnd

inclusions

public BitSet inclusions

exclusions

public BitSet exclusions

type

public int type

content

public ContentModel content

atts

public AttributeList atts

data

public Object data
ユーザーデータを格納するフィールドです。ほとんどの場合、スタイルシートの格納に使われます。

メソッドの詳細

getName

public String getName()
要素の名前を取得します。


omitStart

public boolean omitStart()
開始タグを省略できる場合に true を返します。


omitEnd

public boolean omitEnd()
終了タグを省略できる場合に true を返します。


getType

public int getType()
型を取得します。


getContent

public ContentModel getContent()
コンテンツモデルを返します。


getAttributes

public AttributeList getAttributes()
属性を取得します。


getIndex

public int getIndex()
インデックスを取得します。


isEmpty

public boolean isEmpty()
空かどうかを判定します。


toString

public String toString()
文字列に変換します。

オーバーライド:
クラス Object 内の toString
戻り値:
このオブジェクトの文字列表現

getAttribute

public AttributeList getAttribute(String name)
属性を名前で取得します。


getAttributeByValue

public AttributeList getAttributeByValue(String name)
属性を値で取得します。


name2type

public static int name2type(String nm)

JavaTM Platform
Standard Ed. 6

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

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