Class TextContext


  • public class TextContext
    extends java.lang.Object
    The text context exists to allow multiple text displays to share instances of formatting-related objects. Many of these objects are expensive to create and destroy, but are serially reusable. By sharing them amongst text displays, we can amortize the cost of their creation over many such displays. Note that this sharing is not thread-safe; there must be a separate text context for each thread.

    The text context is opaque; it has no client-callable methods other than constructor and destructor. The client simply has to create one and pass it to each displayable stream through the stream's SetContext() method.

    • Constructor Summary

      Constructors 
      Constructor Description
      TextContext()
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void detach()  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TextContext

        public TextContext()
        Constructor.

        Create an initially unassociated text context. The caller can then associate this context with text streams.

    • Method Detail

      • detach

        public void detach()