wt.visitor
Class TextOutputVisitor

java.lang.Object
  extended bywt.visitor.VisitorAdapter
      extended bywt.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


Field Summary
private static String CLASSNAME
           
private  PrintWriter printWriter
           
private static String RESOURCE
           
private  Locale theLocale
           
private  ResourceBundle theResourceBundle
           
 
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
 Locale getLocale()
          Gets the object for the association that plays role: theLocale.
 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 setLocale(Locale a_Locale)
          Sets the object for the association that plays role: theLocale.
 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.
private  void theLocaleValidate(Locale a_Locale)
           
 
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
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

printWriter

private PrintWriter printWriter

theResourceBundle

private ResourceBundle theResourceBundle

theLocale

private Locale theLocale
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

getLocale

public Locale getLocale()
Gets the object for the association that plays role: theLocale.

Supported API: false

Returns:
Locale

setLocale

public void setLocale(Locale a_Locale)
               throws WTPropertyVetoException
Sets the object for the association that plays role: theLocale.

Supported API: false

Parameters:
a_Locale -
Throws:
WTPropertyVetoException

theLocaleValidate

private void theLocaleValidate(Locale a_Locale)
                        throws WTPropertyVetoException
Parameters:
a_Locale -
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 -