Examples of CursorListener


Examples of com.google.collide.client.editor.selection.SelectionModel.CursorListener

    this.listenerRegistrar = listenerRegistrar;
    searchTask = new SearchTask(document, viewportModel, scheduler);
    searchTaskHandler = new SearchTaskHandler();
    css = res.parenMatchHighlighterCss();

    cursorListener = new CursorListener() {
      @Override
      public void onCursorChange(LineInfo lineInfo, int column, boolean isExplicitChange) {
        cancel();
        maybeSearch(lineInfo, column);
      }
View Full Code Here

Examples of com.google.collide.client.editor.selection.SelectionModel.CursorListener

    public ParenMatchHelper(SelectionModel model) {
      this.selectionModel = model;
    }
   
    void register() {
      remover = selectionModel.getCursorListenerRegistrar().add(new CursorListener() {
        @Override
        public void onCursorChange(LineInfo lineInfo, int column, boolean isExplicitChange) {
          timer.schedule(50);
        }
      });
View Full Code Here

Examples of org.apache.mina.util.byteaccess.CompositeByteArray.CursorListener

        CompositeByteArray cba = new CompositeByteArray();
        cba.addLast(ba1);
        cba.addLast(ba2);
        cba.addLast(ba3);

        CursorListener cl = mc.createMock(CursorListener.class);

        mc.reset();
        mc.replay();
        Cursor cursor = cba.cursor(cl);
        mc.verify();

        mc.reset();
        cl.enteredFirstComponent(0, ba1);
        mc.replay();
        cursor.get();
        mc.verify();

        mc.reset();
        mc.replay();
        cursor.setIndex(10);
        mc.verify();

        mc.reset();
        cl.enteredNextComponent(10, ba2);
        mc.replay();
        cursor.put((byte) 55);
        mc.verify();

        mc.reset();
        mc.replay();
        cursor.setIndex(9);
        mc.verify();

        mc.reset();
        cl.enteredPreviousComponent(0, ba1);
        cl.enteredNextComponent(10, ba2);
        mc.replay();
        cursor.putInt(66);
        mc.verify();

        mc.reset();
        cl.enteredNextComponent(20, ba3);
        mc.replay();
        cursor.setIndex(29);
        cursor.get();
        mc.verify();

        cba.removeLast(); // Force cursor to relocate itself.

        mc.reset();
        cl.enteredLastComponent(10, ba2);
        mc.replay();
        cursor.setIndex(15);
        cursor.get();
        mc.verify();

        mc.reset();
        cl.enteredPreviousComponent(0, ba1);
        mc.replay();
        cursor.setIndex(0);
        cursor.get();
        mc.verify();
    }
View Full Code Here

Examples of org.apache.mina.util.byteaccess.CompositeByteArray.CursorListener

        CompositeByteArray cba = new CompositeByteArray();
        cba.addLast(ba1);
        cba.addLast(ba2);
        cba.addLast(ba3);

        CursorListener cl = mc.createMock(CursorListener.class);

        mc.reset();
        mc.replay();
        Cursor cursor = cba.cursor(cl);
        mc.verify();

        mc.reset();
        cl.enteredFirstComponent(0, ba1);
        mc.replay();
        cursor.get();
        mc.verify();

        mc.reset();
        mc.replay();
        cursor.setIndex(10);
        mc.verify();

        mc.reset();
        cl.enteredNextComponent(10, ba2);
        mc.replay();
        cursor.put((byte) 55);
        mc.verify();

        mc.reset();
        mc.replay();
        cursor.setIndex(9);
        mc.verify();

        mc.reset();
        cl.enteredPreviousComponent(0, ba1);
        cl.enteredNextComponent(10, ba2);
        mc.replay();
        cursor.putInt(66);
        mc.verify();

        mc.reset();
        cl.enteredNextComponent(20, ba3);
        mc.replay();
        cursor.setIndex(29);
        cursor.get();
        mc.verify();

        cba.removeLast(); // Force cursor to relocate itself.

        mc.reset();
        cl.enteredLastComponent(10, ba2);
        mc.replay();
        cursor.setIndex(15);
        cursor.get();
        mc.verify();

        mc.reset();
        cl.enteredPreviousComponent(0, ba1);
        mc.replay();
        cursor.setIndex(0);
        cursor.get();
        mc.verify();
    }
View Full Code Here

Examples of org.apache.mina.util.byteaccess.CompositeByteArray.CursorListener

     *  The {@link CompositeByteArray} that will be the base for this class
     */
    public CompositeByteArrayRelativeBase( CompositeByteArray cba )
    {
        this.cba = cba;
        cursor = cba.cursor( cba.first(), new CursorListener()
        {

            public void enteredFirstComponent( int componentIndex, ByteArray component )
            {
                // Do nothing.
View Full Code Here

Examples of org.apache.mina.util.byteaccess.CompositeByteArray.CursorListener

        CompositeByteArray cba = new CompositeByteArray();
        cba.addLast(ba1);
        cba.addLast(ba2);
        cba.addLast(ba3);

        CursorListener cl = mc.createMock(CursorListener.class);

        mc.reset();
        mc.replay();
        Cursor cursor = cba.cursor(cl);
        mc.verify();

        mc.reset();
        cl.enteredFirstComponent(0, ba1);
        mc.replay();
        cursor.get();
        mc.verify();

        mc.reset();
        mc.replay();
        cursor.setIndex(10);
        mc.verify();

        mc.reset();
        cl.enteredNextComponent(10, ba2);
        mc.replay();
        cursor.put((byte) 55);
        mc.verify();

        mc.reset();
        mc.replay();
        cursor.setIndex(9);
        mc.verify();

        mc.reset();
        cl.enteredPreviousComponent(0, ba1);
        cl.enteredNextComponent(10, ba2);
        mc.replay();
        cursor.putInt(66);
        mc.verify();

        mc.reset();
        cl.enteredNextComponent(20, ba3);
        mc.replay();
        cursor.setIndex(29);
        cursor.get();
        mc.verify();

        cba.removeLast(); // Force cursor to relocate itself.

        mc.reset();
        cl.enteredLastComponent(10, ba2);
        mc.replay();
        cursor.setIndex(15);
        cursor.get();
        mc.verify();

        mc.reset();
        cl.enteredPreviousComponent(0, ba1);
        mc.replay();
        cursor.setIndex(0);
        cursor.get();
        mc.verify();
    }
View Full Code Here

Examples of org.apache.mina.util.byteaccess.CompositeByteArray.CursorListener

     *  The {@link CompositeByteArray} that will be the base for this class
     */
    public CompositeByteArrayRelativeBase( CompositeByteArray cba )
    {
        this.cba = cba;
        cursor = cba.cursor( cba.first(), new CursorListener()
        {

            public void enteredFirstComponent( int componentIndex, ByteArray component )
            {
                // Do nothing.
View Full Code Here

Examples of org.apache.mina.util.byteaccess.CompositeByteArray.CursorListener

     * @param cba
     *  The {@link CompositeByteArray} that will be the base for this class
     */
    public CompositeByteArrayRelativeBase(CompositeByteArray cba) {
        this.cba = cba;
        cursor = cba.cursor(cba.first(), new CursorListener() {

            public void enteredFirstComponent(int componentIndex, ByteArray component) {
                // Do nothing.
            }

View Full Code Here

Examples of org.apache.mina.util.byteaccess.CompositeByteArray.CursorListener

        CompositeByteArray cba = new CompositeByteArray();
        cba.addLast(ba1);
        cba.addLast(ba2);
        cba.addLast(ba3);

        CursorListener cl = mc.createMock(CursorListener.class);

        mc.reset();
        mc.replay();
        Cursor cursor = cba.cursor(cl);
        mc.verify();

        mc.reset();
        cl.enteredFirstComponent(0, ba1);
        mc.replay();
        cursor.get();
        mc.verify();

        mc.reset();
        mc.replay();
        cursor.setIndex(10);
        mc.verify();

        mc.reset();
        cl.enteredNextComponent(10, ba2);
        mc.replay();
        cursor.put((byte) 55);
        mc.verify();

        mc.reset();
        mc.replay();
        cursor.setIndex(9);
        mc.verify();

        mc.reset();
        cl.enteredPreviousComponent(0, ba1);
        cl.enteredNextComponent(10, ba2);
        mc.replay();
        cursor.putInt(66);
        mc.verify();

        mc.reset();
        cl.enteredNextComponent(20, ba3);
        mc.replay();
        cursor.setIndex(29);
        cursor.get();
        mc.verify();

        cba.removeLast(); // Force cursor to relocate itself.

        mc.reset();
        cl.enteredLastComponent(10, ba2);
        mc.replay();
        cursor.setIndex(15);
        cursor.get();
        mc.verify();

        mc.reset();
        cl.enteredPreviousComponent(0, ba1);
        mc.replay();
        cursor.setIndex(0);
        cursor.get();
        mc.verify();
    }
View Full Code Here

Examples of org.apache.mina.util.byteaccess.CompositeByteArray.CursorListener

        CompositeByteArray cba = new CompositeByteArray();
        cba.addLast(ba1);
        cba.addLast(ba2);
        cba.addLast(ba3);

        CursorListener cl = mc.createMock(CursorListener.class);

        mc.reset();
        mc.replay();
        Cursor cursor = cba.cursor(cl);
        mc.verify();

        mc.reset();
        cl.enteredFirstComponent(0, ba1);
        mc.replay();
        cursor.get();
        mc.verify();

        mc.reset();
        mc.replay();
        cursor.setIndex(10);
        mc.verify();

        mc.reset();
        cl.enteredNextComponent(10, ba2);
        mc.replay();
        cursor.put((byte) 55);
        mc.verify();

        mc.reset();
        mc.replay();
        cursor.setIndex(9);
        mc.verify();

        mc.reset();
        cl.enteredPreviousComponent(0, ba1);
        cl.enteredNextComponent(10, ba2);
        mc.replay();
        cursor.putInt(66);
        mc.verify();

        mc.reset();
        cl.enteredNextComponent(20, ba3);
        mc.replay();
        cursor.setIndex(29);
        cursor.get();
        mc.verify();

        cba.removeLast(); // Force cursor to relocate itself.

        mc.reset();
        cl.enteredLastComponent(10, ba2);
        mc.replay();
        cursor.setIndex(15);
        cursor.get();
        mc.verify();

        mc.reset();
        cl.enteredPreviousComponent(0, ba1);
        mc.replay();
        cursor.setIndex(0);
        cursor.get();
        mc.verify();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.