JClass DesktopViews 6.3.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.
 String toString()
          Override toString() to print more meaningful results
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, 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
is_deletion - are we deleting?
Method Detail

getOriginalText

public String getOriginalText()
Returns the orignal text

Returns:
The original text

getStartPosition

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

Returns:
The start position

setStartPosition

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

Parameters:
v - The new starting position

getEndPosition

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

Returns:
The end position

setEndPosition

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

Parameters:
v - The new end position

getText

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

Returns:
The insertion string

setText

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

Parameters:
v - The new string to be inserted

isDeletion

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

Returns:
Is text being deleted?

getAllowChange

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

Returns:
Are changes allowed?

setAllowChange

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

Parameters:
v - Determines whether changes are allowed.

toString

public String toString()
Override toString() to print more meaningful results

Overrides:
toString in class Object
Returns:
a string representation of the this object

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