JClass 4.5.0 API
Documentation

com.klg.jclass.field.validate
Class TextEvent

java.lang.Object
  |
  +--com.klg.jclass.field.validate.TextEvent

public class TextEvent
extends Object

TextEvent is posted when text has been changed in a field.


Field Summary
protected  boolean allowChange
           
protected  int end
           
protected  boolean isDeletion
           
protected  String newText
           
protected  String originalText
           
protected  int start
           
 
Constructor Summary
TextEvent(String original_text, int start, int end, String new_text, boolean is_deletion)
          Constructs a TextEvent.
 
Method Summary
 boolean getAllowChange()
          Determines whether the value change be allowed.
 int getEndPosition()
          Gets the ending position of the text to modify.
 String getOriginalText()
          Returns the orignal text
 int getStartPosition()
          Gets the starting position of the text to modify.
 String getText()
          Gets the string to be inserted.
 boolean isDeletion()
          Returns true if text is being deleted.
 void setAllowChange(boolean v)
          Determines whether the value change be allowed (default: true).
 void setEndPosition(int v)
          Sets the ending position of the text to modify.
 void setStartPosition(int v)
          Sets the starting position of the text to modify.
 void setText(String v)
          Sets the string to be inserted.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

originalText

protected String originalText

start

protected int start

end

protected int end

newText

protected String newText

isDeletion

protected boolean isDeletion

allowChange

protected boolean allowChange
Constructor Detail

TextEvent

public TextEvent(String original_text,
                 int start,
                 int end,
                 String new_text,
                 boolean is_deletion)
Constructs a TextEvent.
Parameters:
original_text - text before insertion
start - starting position to insert text
end - ending position of text
new_text - new text after insertion
Method Detail

getOriginalText

public String getOriginalText()
Returns the orignal text

getStartPosition

public int getStartPosition()
Gets the starting position of the text to modify.

setStartPosition

public void setStartPosition(int v)
Sets the starting position of the text to modify.

getEndPosition

public int getEndPosition()
Gets the ending position of the text to modify.

setEndPosition

public void setEndPosition(int v)
Sets the ending position of the text to modify.

getText

public String getText()
Gets the string to be inserted.

setText

public void setText(String v)
Sets the string to be inserted.

isDeletion

public boolean isDeletion()
Returns true if text is being deleted.

getAllowChange

public boolean getAllowChange()
Determines whether the value change be allowed.

setAllowChange

public void setAllowChange(boolean v)
Determines whether the value change be allowed (default: true).

Copyright© 1999-2000 KL Group Inc.
All rights reserved.