Package com.eclipsesource.tabris.widgets

Examples of com.eclipsesource.tabris.widgets.RefreshListener


  }

  @Test
  public void testHasListeners() {
    RefreshHandler handler = new RefreshHandler();
    RefreshListener listener1 = mock( RefreshListener.class );
    RefreshListener listener2 = mock( RefreshListener.class );

    handler.addRefreshListener( listener1 );
    handler.addRefreshListener( listener2 );

    List<RefreshListener> refreshListeners = handler.getRefreshListeners();
View Full Code Here


  }

  @Test
  public void testRemovesListenerCreatesListen() {
    RefreshHandler handler = new RefreshHandler();
    RefreshListener listener = mock( RefreshListener.class );

    handler.addRefreshListener( listener );
    handler.removeRefreshListener( listener );

    verify( enironment.getRemoteObject() ).listen( "Refresh", false );
View Full Code Here

  }

  @Test
  public void testRemovesListenerCreatesListenOnlyIfNoListenersPresent() {
    RefreshHandler handler = new RefreshHandler();
    RefreshListener listener = mock( RefreshListener.class );
    handler.addRefreshListener( listener );
    handler.addRefreshListener( mock( RefreshListener.class ) );

    handler.removeRefreshListener( listener );
View Full Code Here

  }

  @Test
  public void testNotifyNotofiesListeners() {
    RefreshHandler handler = new RefreshHandler();
    RefreshListener listener = mock( RefreshListener.class );
    handler.addRefreshListener( listener );

    enironment.dispatchNotify( "Refresh", null );

    verify( listener ).refresh();
View Full Code Here


  @Test
  public void testNotifiesNoRefreshListenerForOtherEvent() {
    RefreshComposite composite = new RefreshComposite( shell, SWT.NONE );
    RefreshListener listener = mock( RefreshListener.class );
    composite.addRefreshListener( listener );
    RefreshCompositeOperationHandler handler = new RefreshCompositeOperationHandler( composite );

    handler.handleNotify( "FocusIn", null );
View Full Code Here

  }

  @Test
  public void testNotifiesRefreshListener() {
    RefreshComposite composite = new RefreshComposite( shell, SWT.NONE );
    RefreshListener listener = mock( RefreshListener.class );
    composite.addRefreshListener( listener );
    RefreshCompositeOperationHandler handler = new RefreshCompositeOperationHandler( composite );

    handler.handleNotify( "Refresh", null );
View Full Code Here

  }

  @Test
  public void testNotifiesRefreshListeners() {
    RefreshComposite composite = new RefreshComposite( shell, SWT.NONE );
    RefreshListener listener = mock( RefreshListener.class );
    RefreshListener listener2 = mock( RefreshListener.class );
    composite.addRefreshListener( listener );
    composite.addRefreshListener( listener2 );
    RefreshCompositeOperationHandler handler = new RefreshCompositeOperationHandler( composite );

    handler.handleNotify( "Refresh", null );
View Full Code Here

  }

  private void setupPullToRefresh( final Tree tree ) {
    final RefreshHandler handler = new RefreshHandler();
    handler.setMessage( "Spoiler Alert!" );
    handler.addRefreshListener( new RefreshListener() {
      @Override
      public void refresh() {
        markDead( tree.getItems() );
        tree.update();
        handler.done();
View Full Code Here

TOP

Related Classes of com.eclipsesource.tabris.widgets.RefreshListener

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.