Package palmed.edit.util

Examples of palmed.edit.util.Coordinate


        final String string = "this is my string";
        text.read( createInputStreamStub( string ) );
        reset();
        try
        {
            text.insert( new Coordinate( 30, 0 ), '*' );
        }
        catch( Exception e )
        {
            assertEquals( string, text.getLine( 0 ) );
            return;
View Full Code Here


        final String string = "this is my string";
        text.read( createInputStreamStub( string ) );
        reset();
        try
        {
            text.insert( new Coordinate( 0, -7 ), '*' );
        }
        catch( Exception e )
        {
            assertEquals( string, text.getLine( 0 ) );
            return;
View Full Code Here

        final String string = "this is my string";
        text.read( createInputStreamStub( string ) );
        reset();
        try
        {
            text.insert( new Coordinate( 0, 30 ), '*' );
        }
        catch( Exception e )
        {
            assertEquals( string, text.getLine( 0 ) );
            return;
View Full Code Here

        final String string = "this is my string";
        text.read( createInputStreamStub( string ) );
        reset();
        try
        {
            text.insert( new Coordinate( 0, -7 ), '*' );
        }
        catch( Exception e )
        {
            assertEquals( string, text.getLine( 0 ) );
            return;
View Full Code Here

        text.read( createInputStreamStub( string1 + string2 ) );
        reset();
        mockView.update( string2.length(), 2 );
        mockView.modified( true );
        replay();
        text.insertNewLine( new Coordinate( string1.length(), 0 ) );
        assertEquals( 2, text.getHeight() );
        assertEquals( string1, text.getLine( 0 ) );
        assertEquals( string2, text.getLine( 1 ) );
    }
View Full Code Here

    public void testRemoveBetweenSamePositionsIsNoOp() throws IOException
    {
        final String string = "this is my string";
        text.read( createInputStreamStub( string ) );
        reset();
        text.remove( new Coordinate( 5, 0 ), new Coordinate( 5, 0 ) );
        assertEquals( string, text.getLine( 0 ) );
    }
View Full Code Here

        text.read( createInputStreamStub( string1 + string2 + string3 ) );
        reset();
        mockView.update( (string1 + string3).length(), 1 );
        mockView.modified( true );
        replay();
        text.remove( new Coordinate( string1.length(), 0 ), new Coordinate( (string1 + string2).length(), 0 ) );
        assertEquals( string1 + string3, text.getLine( 0 ) );
    }
View Full Code Here

        content.resize( 5, 6 );
    }

    public void testCursorPositionUnchangedWhenNotScrolled()
    {
        final Coordinate position = new Coordinate( 2, 2 );
        mockView.update( position );
        replay();
        content.update( position );
    }
View Full Code Here

        reset();
        final String result = "abwx";
        mockView.update( result.length(), 1 );
        mockView.modified( true );
        replay();
        text.remove( new Coordinate( 2, 0 ), new Coordinate( 4, 3 ) );
        assertEquals( 1, text.getHeight() );
        assertEquals( result, text.getLine( 0 ) );
        assertNull( text.getLine( 1 ) );
    }
View Full Code Here

        content.update( position );
    }

    public void testScrollInsideView()
    {
        mockView.update( new Coordinate( -3, -2 ) );
        mockView.update( 12, 10 );
        mockScrollView.scrolled( new Coordinate( 3, 2 ) );
        replay();
        content.scroll( 3, 2 );
    }
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.