Package palmed.edit.util

Examples of palmed.edit.util.Coordinate


        assertTrue( THRESHOLD < string.length() );
        text.read( createInputStreamStub( string ) );
        reset();
        try
        {
            text.insert( new Coordinate( 1, 0 ), '*' );
        }
        catch( Exception e )
        {
            return;
        }
View Full Code Here


        assertTrue( THRESHOLD < string.length() );
        text.read( createInputStreamStub( string ) );
        reset();
        try
        {
            text.insert( new Coordinate( 0, -1 ), '*' );
        }
        catch( Exception e )
        {
            return;
        }
View Full Code Here

        assertTrue( THRESHOLD < string.length() );
        text.read( createInputStreamStub( string ) );
        reset();
        try
        {
            text.insert( new Coordinate( 0, 7 ), '*' );
        }
        catch( Exception e )
        {
            return;
        }
View Full Code Here

        assertTrue( THRESHOLD < string.length() );
        text.read( createInputStreamStub( string ) );
        reset();
        try
        {
            text.insert( new Coordinate( 0, -1 ), '*' );
        }
        catch( Exception e )
        {
            return;
        }
View Full Code Here

        text.read( createInputStreamStub( string ) );
        reset();
        mockView.update( string.length() + 1, 1 );
        mockView.modified( true );
        replay();
        text.insert( new Coordinate( THRESHOLD + 1, 0 ), '*' );
        assertEquals( "this is my very long *string larger than three times the threshold", text.getLine( 0 ) );
        verify();
        reset();
        mockView.update( string.length() + 2, 1 );
        mockView.modified( true );
        replay();
        text.insert( new Coordinate( THRESHOLD, 0 ), '*' );
        assertEquals( "this is my very long* *string larger than three times the threshold", text.getLine( 0 ) );
        verify();
        reset();
        mockView.update( string.length() + 3, 1 );
        mockView.modified( true );
        replay();
        text.insert( new Coordinate( THRESHOLD - 1, 0 ), '*' );
        assertEquals( "this is my very lon*g* *string larger than three times the threshold", text.getLine( 0 ) );
    }
View Full Code Here

        text.read( createInputStreamStub( string ) );
        reset();
        mockView.update( 30, 7 );
        mockView.modified( true );
        replay();
        text.insert( new Coordinate( 29, 5 ), '*' );
        assertEquals( " string larger than threshold*", text.getLine( 5 ) );
    }
View Full Code Here

        text.read( createInputStreamStub( string ) );
        reset();
        mockView.update( string.length() - 3, 1 );
        mockView.modified( true );
        replay();
        text.remove( new Coordinate( 7, 0 ), new Coordinate( 10, 0 ) );
        assertEquals( "this is string", text.getLine( 0 ) );
    }
View Full Code Here

        text.read( createInputStreamStub( string ) );
        reset();
        mockView.update( string.length() - 1, 1 );
        mockView.modified( true );
        replay();
        text.remove( new Coordinate( THRESHOLD - 2, 0 ), new Coordinate( THRESHOLD - 1, 0 ) );
        assertEquals( "this is my very log string larger than three times the threshold", text.getLine( 0 ) );
        verify();
        reset();
        mockView.update( string.length() - 2, 1 );
        mockView.modified( true );
        replay();
        text.remove( new Coordinate( THRESHOLD + 3, 0 ), new Coordinate( THRESHOLD + 4, 0 ) );
        assertEquals( "this is my very log strng larger than three times the threshold", text.getLine( 0 ) );
        verify();
        reset();
        mockView.update( string.length() - 8, 1 );
        mockView.modified( true );
        replay();
        text.remove( new Coordinate( THRESHOLD - 3, 0 ), new Coordinate( THRESHOLD + 3, 0 ) );
        assertEquals( "this is my very lng larger than three times the threshold", text.getLine( 0 ) );
    }
View Full Code Here

        text.read( createInputStreamStub( string ) );
        reset();
        mockView.update( 16, 3 );
        mockView.modified( true );
        replay();
        text.remove( new Coordinate( 2, 1 ), new Coordinate( 15, 5 ) );
        assertEquals( "", text.getLine( 0 ) );
        assertEquals( "ththan threshold", text.getLine( 1 ) );
        assertEquals( "", text.getLine( 2 ) );
        assertNull( text.getLine( 3 ) );
    }
View Full Code Here

        final int x = coordinate_.x_ - width_;
        final int length = text.getLine( line ).length();
        if( x <= length )
        {
            hasBeenFound_ = true;
            functor_.select( text, new Coordinate( x, line ) );
        }
        width_ += length;
    }
View Full Code Here

TOP

Related Classes of palmed.edit.util.Coordinate

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.