JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.field
Class Field.TextFieldContent

java.lang.Object
  |
  +--com.klg.jclass.field.Field.TextFieldContent
All Implemented Interfaces:
AbstractDocument.Content, Serializable
Enclosing class:
Field

public class Field.TextFieldContent
extends Object
implements AbstractDocument.Content, Serializable

See Also:
Serialized Form

Field Summary
 Vector marks
           
protected  boolean overstrike
           
 
Constructor Summary
Field.TextFieldContent()
          Creates a new TextFieldContent object.
Field.TextFieldContent(int length)
          Creates a new TextFieldContent object, with the initial size specified.
 
Method Summary
 Position createPosition(int offset)
          Creates a position within the content that will track change as the content is mutated.
 void getChars(int offset, int len, Segment chars)
          Retrieves a portion of the content.
 boolean getOverstrike()
           
 String getString(int offset, int len)
          Retrieves a portion of the content.
 UndoableEdit insertString(int offset, String str)
          Inserts a string into the content.
 void insertText(int offset, int length, char[] replArray, int replOffset, int replLength)
           
 int length()
          Returns the length of the content.
 UndoableEdit remove(int offset, int nitems)
          Removes part of the content.
protected  void replaceRange(int offset, char[] replArray, int replOffset, int replLength)
           
 void setOverstrike(boolean overstrike)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

overstrike

protected boolean overstrike

marks

public transient Vector marks
Constructor Detail

Field.TextFieldContent

public Field.TextFieldContent()
Creates a new TextFieldContent object. Initial size defaults to 10.


Field.TextFieldContent

public Field.TextFieldContent(int length)
Creates a new TextFieldContent object, with the initial size specified. If the length is < 1, a size of 1 is used.

Method Detail

length

public int length()
Returns the length of the content.

Specified by:
length in interface AbstractDocument.Content

replaceRange

protected void replaceRange(int offset,
                            char[] replArray,
                            int replOffset,
                            int replLength)

insertString

public UndoableEdit insertString(int offset,
                                 String str)
                          throws BadLocationException
Inserts a string into the content.

Specified by:
insertString in interface AbstractDocument.Content
BadLocationException

insertText

public void insertText(int offset,
                       int length,
                       char[] replArray,
                       int replOffset,
                       int replLength)

remove

public UndoableEdit remove(int offset,
                           int nitems)
                    throws BadLocationException
Removes part of the content. offset + nitems must be < length().

Specified by:
remove in interface AbstractDocument.Content
BadLocationException

getString

public String getString(int offset,
                        int len)
                 throws BadLocationException
Retrieves a portion of the content. offset + len must be <= length().

Specified by:
getString in interface AbstractDocument.Content
BadLocationException

getChars

public void getChars(int offset,
                     int len,
                     Segment chars)
              throws BadLocationException
Retrieves a portion of the content. offset + len must be <= length()

Specified by:
getChars in interface AbstractDocument.Content
BadLocationException

createPosition

public Position createPosition(int offset)
                        throws BadLocationException
Creates a position within the content that will track change as the content is mutated.

Specified by:
createPosition in interface AbstractDocument.Content
BadLocationException

setOverstrike

public void setOverstrike(boolean overstrike)

getOverstrike

public boolean getOverstrike()

Copyright © 2004 Quest Software Inc..
All rights reserved.