PIRL

PIRL.Utilities
Interface Styled_Writer

All Known Implementing Classes:
Messenger_Styled_Writer, Stream_Monitor, Stream_Monitor.Monitor_Writer, Styled_Multiwriter, Suspendable_Styled_Writer

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.

Version:
1.4
Author:
Bradford Castalia - UA/PIRL

Method Summary
 Styled_Writer Write(String text)
          Write plain text.
 Styled_Writer Write(String text, AttributeSet style)
          Write styled text.
 

Method Detail

Write

Styled_Writer Write(String text,
                    AttributeSet style)
                    throws IOException
Write styled text.

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.

Parameters:
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.
Returns:
This Styled_Writer
Throws:
IOException
See Also:
StyleConstants, SimpleAttributeSet

Write

Styled_Writer Write(String text)
                    throws IOException
Write plain text.

This is the same as writing text will a null style.

Parameters:
text - The text String to be written.
Returns:
This Styled_Writer
Throws:
IOException

PIRL

Copyright (C) \ 2003-2009 Bradford Castalia, University of Arizona