Package palmed.edit.util

Examples of palmed.edit.util.Coordinate


    public void testStepForwardAndBackwardResultsInEmptySelection()
    {
        mockText.getLine( 0 );
        control( mockText ).setReturnValue( "this is my test" );
        mockView.update( new Coordinate( 1, 0 ) );
        mockView.update( new Coordinate( 0, 0 ) );
        replay();
        selection.forward();
        selection.backward();
        assertTrue( selection.isEmpty() );
    }
View Full Code Here


    public void testStepForwardSelectsFirstCharacter()
    {
        mockText.getLine( 0 );
        control( mockText ).setReturnValue( "this is my test" );
        mockView.update( new Coordinate( 1, 0 ) );
        replay();
        selection.forward();
        assertFalse( selection.isEmpty() );
    }
View Full Code Here

    {
        mockText.getHeight();
        control( mockText ).setReturnValue( 1 );
        mockText.getLine( 0 );
        control( mockText ).setReturnValue( "this is my test" );
        mockView.update( new Coordinate( 3, 0 ) );
        replay();
        selection.extend( 3, 0 );
        assertFalse( selection.isEmpty() );
    }
View Full Code Here

    {
        mockText.getHeight();
        control( mockText ).setReturnValue( 7 );
        mockText.getLine( 5 );
        control( mockText ).setReturnValue( "this is my test" );
        mockView.update( new Coordinate( 3, 5 ) );
        replay();
        selection.extend( 3, 5 );
        assertFalse( selection.isEmpty() );
    }
View Full Code Here

        assertFalse( selection.isEmpty() );
    }

    public void testResetEmptySelectionStaysEmpty()
    {
        mockView.update( new Coordinate( 0, 0 ) );
        replay();
        selection.clear();
        assertTrue( selection.isEmpty() );
    }
View Full Code Here

    {
        mockText.getHeight();
        control( mockText ).setReturnValue( 7 );
        mockText.getLine( 5 );
        control( mockText ).setReturnValue( "this is my test" );
        mockView.update( new Coordinate( 3, 5 ) );
        replay();
        selection.extend( 3, 5 );
        reset();
        mockView.update( new Coordinate( 3, 5 ) );
        replay();
        selection.clear();
        assertTrue( selection.isEmpty() );
    }
View Full Code Here

    {
        mockText.getHeight();
        control( mockText ).setReturnValue( 7 );
        mockText.getLine( 5 );
        control( mockText ).setReturnValue( "this is my test" );
        mockView.update( new Coordinate( 3, 5 ) );
        replay();
        selection.extend( 3, 5 );
        reset();
        mockText.remove( new Coordinate( 0, 0 ), new Coordinate( 3, 5 ) );
        mockView.update( new Coordinate( 0, 0 ) );
        replay();
        selection.delete();
        assertTrue( selection.isEmpty() );
    }
View Full Code Here

    {
        mockText.getHeight();
        control( mockText ).setReturnValue( 7 );
        mockText.getLine( 5 );
        control( mockText ).setReturnValue( "this is my test" );
        mockView.update( new Coordinate( 3, 5 ) );
        mockView.update( new Coordinate( 3, 5 ) );
        replay();
        selection.extend( 3, 5 );
        selection.clear();
        reset();
        mockText.getHeight();
        control( mockText ).setReturnValue( 7 );
        mockText.getLine( 0 );
        control( mockText ).setReturnValue( "this is my test" );
        mockView.update( new Coordinate( 0, 0 ) );
        replay();
        selection.extend( 0, 0 );
        reset();
        mockText.remove( new Coordinate( 0, 0 ), new Coordinate( 3, 5 ) );
        mockView.update( new Coordinate( 0, 0 ) );
        replay();
        selection.delete();
        assertTrue( selection.isEmpty() );
    }
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.