|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Styled_Writer
A Styled_Writer is used to write styled text.
This interface is used to write text that may have various text style attributes - font face, size, color, etc. - associated with it.
Method Summary | |
---|---|
Styled_Writer |
Write(String text)
Write plain text. |
Styled_Writer |
Write(String text,
AttributeSet style)
Write styled text. |
Method Detail |
---|
Styled_Writer Write(String text, AttributeSet style) throws IOException
A style may be assembled using combinations of the numerous StyleConstants setXXX functions applied to a SimpleAttributeSet. For example:
SimpleAttributeSet bold_red_text = new SimpleAttributeSet ();
StyleConstants.setBold (bold_red_text, true);
StyleConstants.setForeground (bold_red_text, Color.RED);
StyleConstants.setFontFamily (bold_red_text, "Monospaced");
assembles a style that will produce text in a bold, red, monospaced font.
text
- The text String to be written.style
- The AttributeSet to be applied to the text. This
may be null if plain text is to be displayed.
IOException
StyleConstants
,
SimpleAttributeSet
Styled_Writer Write(String text) throws IOException
This is the same as writing
text will a null style.
text
- The text String to be written.
IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |