wt.visitor
Class TextOutputVisitor

java.lang.Object
  extended by wt.visitor.VisitorAdapter
      extended by wt.visitor.TextOutputVisitor
All Implemented Interfaces:
Visitor
Direct Known Subclasses:
BOMHierarchyVisitor, BOMPartsListVisitor

public class TextOutputVisitor
extends VisitorAdapter

The TextOutputVisitor can be used as a base class for Visitor implementations that are primarily used to produce text output. This class contains a reference to a PrintWriter for producing text output. Connvenience methods are also available for localizing text output.

Supported API: true

Extendable: true


Constructor Summary
TextOutputVisitor()
          Construct an instance.
TextOutputVisitor(OutputStream a_outputStream)
          Construct an instance.
TextOutputVisitor(OutputStream a_outputStream, ResourceBundle a_resourceBundle)
          Construct an instance.
 
Method Summary
 PrintWriter getPrintWriter()
          Gets the value of the attribute: printWriter.
 ResourceBundle getResourceBundle()
          Gets the object for the association that plays role: theResourceBundle.
 void printLocalizedMessage(LocalizableMessage a_localizedMessage)
          Prints a message using the locale.
 void printLocalizedMessage(ResourceBundle a_resourceBundle, String a_messageKey, Object[] a_params)
          Prints a message using the message key, parameters, and resource bundle.
 void printLocalizedMessage(String a_messageKey, Object[] a_params)
          Prints a message using the message key, parameters, and the instance resource bundle.
 void setPrintWriter(OutputStream a_outputStream)
          Sets the PrintWriter instance.
 void setPrintWriter(PrintWriter a_PrintWriter)
          Sets the value of the attribute: printWriter.
 void setResourceBundle(ResourceBundle a_ResourceBundle)
          Sets the object for the association that plays role: theResourceBundle.
 
Methods inherited from class wt.visitor.VisitorAdapter
visit, visitLevel, visitLevel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextOutputVisitor

public TextOutputVisitor(OutputStream a_outputStream,
                         ResourceBundle a_resourceBundle)
                  throws WTPropertyVetoException
Construct an instance.

Supported API: true

Parameters:
a_outputStream -
a_resourceBundle -
Throws:
WTPropertyVetoException

TextOutputVisitor

public TextOutputVisitor(OutputStream a_outputStream)
                  throws WTPropertyVetoException
Construct an instance.

Supported API: true

Parameters:
a_outputStream -
Throws:
WTPropertyVetoException

TextOutputVisitor

public TextOutputVisitor()
Construct an instance.

Supported API: true

Method Detail

getPrintWriter

public PrintWriter getPrintWriter()
Gets the value of the attribute: printWriter.

Supported API: true

Returns:
PrintWriter

setPrintWriter

public void setPrintWriter(PrintWriter a_PrintWriter)
                    throws WTPropertyVetoException
Sets the value of the attribute: printWriter.

Supported API: true

Parameters:
a_PrintWriter -
Throws:
WTPropertyVetoException

getResourceBundle

public ResourceBundle getResourceBundle()
Gets the object for the association that plays role: theResourceBundle.

Supported API: true

Returns:
ResourceBundle

setResourceBundle

public void setResourceBundle(ResourceBundle a_ResourceBundle)
                       throws WTPropertyVetoException
Sets the object for the association that plays role: theResourceBundle.

Supported API: true

Parameters:
a_ResourceBundle -
Throws:
WTPropertyVetoException

setPrintWriter

public void setPrintWriter(OutputStream a_outputStream)
                    throws WTPropertyVetoException
Sets the PrintWriter instance.

Supported API: true

Parameters:
a_outputStream -
Throws:
WTPropertyVetoException

printLocalizedMessage

public void printLocalizedMessage(String a_messageKey,
                                  Object[] a_params)
Prints a message using the message key, parameters, and the instance resource bundle.

Supported API: true

Parameters:
a_messageKey -
a_params -

printLocalizedMessage

public void printLocalizedMessage(ResourceBundle a_resourceBundle,
                                  String a_messageKey,
                                  Object[] a_params)
Prints a message using the message key, parameters, and resource bundle.

Supported API: true

Parameters:
a_resourceBundle -
a_messageKey -
a_params -

printLocalizedMessage

public void printLocalizedMessage(LocalizableMessage a_localizedMessage)
Prints a message using the locale.

Supported API: true

Parameters:
a_localizedMessage -