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.
ContentType- A possible value for getType.
EndTagType- A possible value for getType.
JoinNextDirection- A possible value for getDirection.
JoinPreviousDirection- A possible value for getDirection.
OriginateDirection- A possible value for getDirection.
StartTagType- A possible value for getType.
DefaultStyledDocument.ElementSpec(AttributeSet, short)
- Constructor useful for markup when the markup will not
be stored in the document.
DefaultStyledDocument.ElementSpec(AttributeSet, short, char[], int, int)
- Constructor for creating a spec externally for batch
input of content and markup into the document.
DefaultStyledDocument.ElementSpec(AttributeSet, short, int)
- Constructor for parsing inside the document when
the data has already been added, but len information
is needed.
getArray()
- Gets the array of characters.
getAttributes()
- Gets the element attributes.
getDirection()
- Gets the direction.
getLength()
- Gets the length.
getOffset()
- Gets the starting offset.
getType()
- Gets the element type.
setDirection(short)
- Sets the direction.
setType(short)
- Sets the element type.
toString()
- Converts the element to a string.
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.
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.
ContentType
public static final short ContentType
- A possible value for getType. This specifies
that this record type represents content.
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.
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.
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.
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
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
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
setType
public void setType(short type)
- Sets the element type.
- Parameters:
- type - the type
getType
public short getType()
- Gets the element type.
- Returns:
- the type
setDirection
public void setDirection(short direction)
- Sets the direction.
- Parameters:
- direction - the direction
getDirection
public short getDirection()
- Gets the direction.
- Returns:
- the direction
getAttributes
public AttributeSet getAttributes()
- Gets the element attributes.
- Returns:
- the attribute set
getArray
public char[] getArray()
- Gets the array of characters.
- Returns:
- the array
getOffset
public int getOffset()
- Gets the starting offset.
- Returns:
- the offset
getLength
public int getLength()
- Gets the length.
- Returns:
- the length
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