All Packages  Class Hierarchy  This Package  Previous  Next  Index  

Class java.awt.swing.text.DefaultStyledDocument.ElementSpec

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

public static class DefaultStyledDocument.ElementSpec
extends Object
Specification for building elements.


Variable Index

 o ContentType
A possible value for getType.
 o EndTagType
A possible value for getType.
 o JoinNextDirection
A possible value for getDirection.
 o JoinPreviousDirection
A possible value for getDirection.
 o OriginateDirection
A possible value for getDirection.
 o StartTagType
A possible value for getType.

Constructor Index

 o DefaultStyledDocument.ElementSpec(AttributeSet, short)
Constructor useful for markup when the markup will not be stored in the document.
 o DefaultStyledDocument.ElementSpec(AttributeSet, short, char[], int, int)
Constructor for creating a spec externally for batch input of content and markup into the document.
 o DefaultStyledDocument.ElementSpec(AttributeSet, short, int)
Constructor for parsing inside the document when the data has already been added, but len information is needed.

Method Index

 o getArray()
Gets the array of characters.
 o getAttributes()
Gets the element attributes.
 o getDirection()
Gets the direction.
 o getLength()
Gets the length.
 o getOffset()
Gets the starting offset.
 o getType()
Gets the element type.
 o setDirection(short)
Sets the direction.
 o setType(short)
Sets the element type.
 o toString()
Converts the element to a string.

Variables

 o StartTagType
public static final short StartTagType
A possible value for getType. This specifies that this record type is a start tag and represents markup that specifies the start of an element.

 o EndTagType
public static final short EndTagType
A possible value for getType. This specifies that this record type is a end tag and represents markup that specifies the end of an element.

 o ContentType
public static final short ContentType
A possible value for getType. This specifies that this record type represents content.

 o JoinPreviousDirection
public static final short JoinPreviousDirection
A possible value for getDirection. This specifies that the data associated with this record should be joined to what precedes it.

 o JoinNextDirection
public static final short JoinNextDirection
A possible value for getDirection. This specifies that the data associated with this record should be joined to what follows it.

 o OriginateDirection
public static final short OriginateDirection
A possible value for getDirection. This specifies that the data associated with this record should be used to originate a new element. This would be the normal value.

Constructors

 o DefaultStyledDocument.ElementSpec
public DefaultStyledDocument.ElementSpec(AttributeSet a,
                                         short type)
Constructor useful for markup when the markup will not be stored in the document.

Parameters:
a - the attributes for the element
type - the type of the element
 o DefaultStyledDocument.ElementSpec
public DefaultStyledDocument.ElementSpec(AttributeSet a,
                                         short type,
                                         int len)
Constructor for parsing inside the document when the data has already been added, but len information is needed.

Parameters:
a - the attributes for the element
type - the type of the element
len - the length
 o DefaultStyledDocument.ElementSpec
public DefaultStyledDocument.ElementSpec(AttributeSet a,
                                         short type,
                                         char[] txt,
                                         int offs,
                                         int len)
Constructor for creating a spec externally for batch input of content and markup into the document.

Parameters:
a - the attributes for the element
type - the element type
txt - the text for the element
offs - the offset into the text
len - the length of the text

Methods

 o setType
public void setType(short type)
Sets the element type.

Parameters:
type - the type
 o getType
public short getType()
Gets the element type.

Returns:
the type
 o setDirection
public void setDirection(short direction)
Sets the direction.

Parameters:
direction - the direction
 o getDirection
public short getDirection()
Gets the direction.

Returns:
the direction
 o getAttributes
public AttributeSet getAttributes()
Gets the element attributes.

Returns:
the attribute set
 o getArray
public char[] getArray()
Gets the array of characters.

Returns:
the array
 o getOffset
public int getOffset()
Gets the starting offset.

Returns:
the offset
 o getLength
public int getLength()
Gets the length.

Returns:
the length
 o toString
public String toString()
Converts the element to a string.

Returns:
the string
Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index  

Submit a bug or feature