LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.view.win.swing.text
Class LyJTextAreaDocument

java.lang.Object
  extended by javax.swing.text.AbstractDocument
      extended by javax.swing.text.PlainDocument
          extended by leon.view.win.swing.text.LyJTextAreaDocument
All Implemented Interfaces:
java.io.Serializable, javax.swing.text.Document
Direct Known Subclasses:
LyJTextFieldDocument

public class LyJTextAreaDocument
extends javax.swing.text.PlainDocument

This class manages the content of a multilined text area.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.text.AbstractDocument
javax.swing.text.AbstractDocument.AbstractElement, javax.swing.text.AbstractDocument.AttributeContext, javax.swing.text.AbstractDocument.BranchElement, javax.swing.text.AbstractDocument.Content, javax.swing.text.AbstractDocument.DefaultDocumentEvent, javax.swing.text.AbstractDocument.ElementEdit, javax.swing.text.AbstractDocument.LeafElement
 
Field Summary
static java.lang.String __VERSION
           
 
Fields inherited from class javax.swing.text.PlainDocument
lineLimitAttribute, tabSizeAttribute
 
Fields inherited from class javax.swing.text.AbstractDocument
BidiElementName, ContentElementName, ElementNameAttribute, ParagraphElementName, SectionElementName
 
Fields inherited from interface javax.swing.text.Document
StreamDescriptionProperty, TitleProperty
 
Constructor Summary
LyJTextAreaDocument(int maxChars)
          Constructor.
 
Method Summary
 void beep()
          Emit a beep.
 void insertString(int offset, java.lang.String str, javax.swing.text.AttributeSet a)
          Insert a string in the text area.
 void setEnvironment(LyEnvironment environment)
          Sets the application environment.
 void setMaxChars(int maxChars)
          Sets the maximum number of characters of this area.
 void setPatterns(java.util.Collection<java.lang.String> patterns)
          Sets the list of available patterns.
 void setString(java.lang.String str)
          Sets the content of this document without any control.
 
Methods inherited from class javax.swing.text.PlainDocument
getDefaultRootElement, getParagraphElement
 
Methods inherited from class javax.swing.text.AbstractDocument
addDocumentListener, addUndoableEditListener, createPosition, dump, getAsynchronousLoadPriority, getBidiRootElement, getDocumentFilter, getDocumentListeners, getDocumentProperties, getEndPosition, getLength, getListeners, getProperty, getRootElements, getStartPosition, getText, getText, getUndoableEditListeners, putProperty, readLock, readUnlock, remove, removeDocumentListener, removeUndoableEditListener, render, replace, setAsynchronousLoadPriority, setDocumentFilter, setDocumentProperties
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

__VERSION

public static final java.lang.String __VERSION
See Also:
Constant Field Values
Constructor Detail

LyJTextAreaDocument

public LyJTextAreaDocument(int maxChars)
Constructor. Calls the super implementation and initialize the maximum number of char with the given number and sets the list of patterns to null.

Parameters:
maxChars - The maximum number of char of this text area
Method Detail

setPatterns

public void setPatterns(java.util.Collection<java.lang.String> patterns)
Sets the list of available patterns.

Parameters:
patterns - the new list og patterns

setEnvironment

public void setEnvironment(LyEnvironment environment)
Sets the application environment.

Parameters:
environment - the application environment

insertString

public void insertString(int offset,
                         java.lang.String str,
                         javax.swing.text.AttributeSet a)
                  throws javax.swing.text.BadLocationException
Insert a string in the text area.
Overriden to filter input.

Specified by:
insertString in interface javax.swing.text.Document
Overrides:
insertString in class javax.swing.text.PlainDocument
Parameters:
offset - the position of this insert
str - the string to insert
a - the attributes to associate with the inserted content. This may be null if there are no attributes
Throws:
javax.swing.text.BadLocationException - if the value of this field cannot be found
See Also:
Document.insertString(int, java.lang.String, javax.swing.text.AttributeSet)

setString

public void setString(java.lang.String str)
               throws javax.swing.text.BadLocationException
Sets the content of this document without any control.

Parameters:
str - the new content
Throws:
javax.swing.text.BadLocationException

beep

public void beep()
Emit a beep.


setMaxChars

public void setMaxChars(int maxChars)
Sets the maximum number of characters of this area.

Parameters:
maxChars - the new maximum

(c) January 2013 - W4 S.A.

Website: W4 S.A., contact us: support@w4global.com