com.glaivestone.toolbox.mv.text
Class BasicTextWindow

java.lang.Object
  |
  +--com.glaivestone.javax.util.EventManager
        |
        +--com.glaivestone.mv.ApplicationModel
              |
              +--com.glaivestone.mv.FrameWindowApplicationModel
                    |
                    +--com.glaivestone.toolbox.mv.text.BasicTextWindow
Direct Known Subclasses:
TextLogWindow, TextWindow

public abstract class BasicTextWindow
extends FrameWindowApplicationModel

Abstract superclass for text window implementations which provide a view on text.

Subclaseses can provide various flavors of a document model for their text (e.g., styled or plain text). Subclasses which support styled text will use the setCurrentAttributes service to configure the current set of text attributes for the document.


Field Summary
static java.lang.String NEW_LINE
           
static java.lang.String TEXT_PRINT_TARGET_SPECIFICATION
           
static java.util.Map TEXT_PROPERTIES_UNSTYLED
           
static java.util.Map TEXT_PROPERTIES_UNSTYLED_LOG
           
static java.lang.String TEXT_TYPE_SPECIFICATION
           
static java.lang.String TEXT_TYPE_STYLED
           
static java.lang.String TEXT_TYPE_UNSTYLED
           
 
Method Summary
 void appendString(java.lang.String aString)
          Append a string to the end of the current text in the document data model with the current text attributes..
 void appendString(java.lang.String aString, javax.swing.text.AttributeSet attributes)
          Append a string to the end of the current text in the document data model with the specified text attributes..
 javax.swing.text.AttributeSet getCurrentAttributes()
          Get the current set of text attributes.
 java.lang.String getText()
          Answer the contents of the model.
 javax.swing.text.Document getTextHolder()
          Answer the model containing the text.
 java.util.Map getTextSpecifications()
          Answer the specifications for configuring the text model.
 void setCurrentAttributes(javax.swing.text.AttributeSet attributes)
          Set the current text attributes.
 void setText(java.lang.String aString)
          Set the contents of the document to the given text.
 void setText(java.lang.String aString, javax.swing.text.AttributeSet attributes)
          Set the contents of the document to the given text.
 
Methods inherited from class com.glaivestone.mv.FrameWindowApplicationModel
getIconReference, getSubjectDescriptionHolder, getTitle
 
Methods inherited from class com.glaivestone.mv.ApplicationModel
closeWindow, getAllViews, getAllViews, getAllViews, getView, getWindow, openWindow, openWindow, requestCloseWindow, resolveResourceReference
 
Methods inherited from class com.glaivestone.javax.util.EventManager
addFirstListener, addListener, getEventTable, getEventTableForEdit, getListeners, removeListener
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NEW_LINE

public static final java.lang.String NEW_LINE

TEXT_TYPE_SPECIFICATION

public static final java.lang.String TEXT_TYPE_SPECIFICATION
See Also:
Constant Field Values

TEXT_TYPE_STYLED

public static final java.lang.String TEXT_TYPE_STYLED
See Also:
Constant Field Values

TEXT_TYPE_UNSTYLED

public static final java.lang.String TEXT_TYPE_UNSTYLED
See Also:
Constant Field Values

TEXT_PRINT_TARGET_SPECIFICATION

public static final java.lang.String TEXT_PRINT_TARGET_SPECIFICATION
See Also:
Constant Field Values

TEXT_PROPERTIES_UNSTYLED

public static final java.util.Map TEXT_PROPERTIES_UNSTYLED

TEXT_PROPERTIES_UNSTYLED_LOG

public static final java.util.Map TEXT_PROPERTIES_UNSTYLED_LOG
Method Detail

appendString

public void appendString(java.lang.String aString)
Append a string to the end of the current text in the document data model with the current text attributes..


appendString

public void appendString(java.lang.String aString,
                         javax.swing.text.AttributeSet attributes)
Append a string to the end of the current text in the document data model with the specified text attributes..


getCurrentAttributes

public javax.swing.text.AttributeSet getCurrentAttributes()
Get the current set of text attributes.


getText

public java.lang.String getText()
Answer the contents of the model.


getTextHolder

public javax.swing.text.Document getTextHolder()
Answer the model containing the text.


getTextSpecifications

public java.util.Map getTextSpecifications()
Answer the specifications for configuring the text model.


setCurrentAttributes

public void setCurrentAttributes(javax.swing.text.AttributeSet attributes)
Set the current text attributes.


setText

public void setText(java.lang.String aString)
Set the contents of the document to the given text.


setText

public void setText(java.lang.String aString,
                    javax.swing.text.AttributeSet attributes)
Set the contents of the document to the given text.


GFL 1.1 API