Contents | Package | Class | Tree | Deprecated | Index | Help | Java 1.2 Beta 3 | ||
PREV | NEXT | SHOW LISTS | HIDE LISTS |
Method Summary | |
Style | addStyle(String nm,
Style parent)
|
Color | getBackground(AttributeSet attr)
|
Element | getCharacterElement(int pos)
|
Font | getFont(AttributeSet attr)
|
Color | getForeground(AttributeSet attr)
|
Style | getLogicalStyle(int p)
|
Element | getParagraphElement(int pos)
|
Style | getStyle(String nm)
|
void | removeStyle(String nm)
|
void | setCharacterAttributes(int offset,
int length,
AttributeSet s,
boolean replace)
|
void | setLogicalStyle(int pos,
Style s)
|
void | setParagraphAttributes(int offset,
int length,
AttributeSet s,
boolean replace)
|
Method Detail |
public Style addStyle(String nm, Style parent)
nm
- the name of the style (must be unique within the
collection of named styles). The name may be null if the style
is unnamed, but the caller is responsible
for managing the reference returned as an unnamed style can't
be fetched by name. An unnamed style may be useful for things
like character attribute overrides such as found in a style
run.
parent
- the parent style. This may be null if unspecified
attributes need not be resolved in some other style.
public void removeStyle(String nm)
nm
- the name of the style to remove
public Style getStyle(String nm)
nm
- the name of the style
public void setCharacterAttributes(int offset, int length, AttributeSet s, boolean replace)
offset
- the start of the change
length
- the length of the change
s
- the attributes to change to. Any attributes
defined will be applied to the text for the given range.
replace
- indicates whether or not the previous
attributes should be cleared before the new attributes
as set. If true, the operation will replace the
previous attributes entirely. If false, the new
attributes will be merged with the previous attributes.
public void setParagraphAttributes(int offset, int length, AttributeSet s, boolean replace)
offset
- the start of the change
length
- the length of the change
s
- the attributes to change to. Any attributes
defined will be applied to the text for the given range.
replace
- indicates whether or not the previous
attributes should be cleared before the new attributes
as set. If true, the operation will replace the
previous attributes entirely. If false, the new
attributes will be merged with the previous attributes.
public void setLogicalStyle(int pos, Style s)
pos
- the starting position
s
- the style to set
public Style getLogicalStyle(int p)
p
- the position
public Element getParagraphElement(int pos)
pos
- the offset
public Element getCharacterElement(int pos)
pos
- the offset
public Color getForeground(AttributeSet attr)
attr
- the set of attributes
public Color getBackground(AttributeSet attr)
attr
- the set of attributes
public Font getFont(AttributeSet attr)
attr
- the set of attributes
Contents | Package | Class | Tree | Deprecated | Index | Help | Java 1.2 Beta 3 | ||
PREV | NEXT | SHOW LISTS | HIDE LISTS |