-
Bug
-
Resolution: Fixed
-
P3
-
1.2.0
-
1.2beta4
-
generic
-
generic
-
Not verified
Text retured from InputMethodEvent#getText() does not equal to the original
The AttributedCharacterIterator object which is obtained from
InputMethodEvent.getText() does not equal to the one which is
used on the InputMethodEvent construction
Problem on Windows 95 as well as Solaris environment.
Compile and run the attached test case.
-----------------------------------------------------------------------------
import java.awt.event.InputMethodEvent;
import java.awt.Canvas;
import java.text.AttributedString;
class test
{
public static void main( String args[] )
{
Canvas c = new Canvas();
AttributedString as = new AttributedString( "This is an attributed string" );
InputMethodEvent ime = new InputMethodEvent( c,
InputMethodEvent.INPUT_METHOD_TEXT_CHANGED,
as.getIterator(), 0, null, null );
if ( as.getIterator().equals(ime.getText()) )
System.out.println( "Passed." );
else
System.out.println( "Failed." );
}
}
The AttributedCharacterIterator object which is obtained from
InputMethodEvent.getText() does not equal to the one which is
used on the InputMethodEvent construction
Problem on Windows 95 as well as Solaris environment.
Compile and run the attached test case.
-----------------------------------------------------------------------------
import java.awt.event.InputMethodEvent;
import java.awt.Canvas;
import java.text.AttributedString;
class test
{
public static void main( String args[] )
{
Canvas c = new Canvas();
AttributedString as = new AttributedString( "This is an attributed string" );
InputMethodEvent ime = new InputMethodEvent( c,
InputMethodEvent.INPUT_METHOD_TEXT_CHANGED,
as.getIterator(), 0, null, null );
if ( as.getIterator().equals(ime.getText()) )
System.out.println( "Passed." );
else
System.out.println( "Failed." );
}
}