Examples of SearchAction


Examples of com.eclipsesource.tabris.ui.action.SearchAction

    verify( remoteObject ).set( "proposals", new JsonArray().add( "foo" ).add( "bar" ) );
  }

  @Test
  public void testSendsNullProposalsAsEmptyArray() {
    SearchAction action = spy( new TestSearchAction() );
    when( actionDescriptor.getAction() ).thenReturn( action );
    new RemoteSearchAction( ui, uiRenderer, actionDescriptor );
    JsonObject properties = new JsonObject();
    properties.add( "query", "bar" );
    environment.dispatchNotify( "Modify", properties );
View Full Code Here

Examples of com.eclipsesource.tabris.ui.action.SearchAction

    verify( remoteObject ).set( "proposals", new JsonArray() );
  }

  @Test( expected = IllegalArgumentException.class )
  public void testFailsWithNullProposals() {
    SearchAction action = spy( new TestSearchAction() );
    when( actionDescriptor.getAction() ).thenReturn( action );
    new RemoteSearchAction( ui, uiRenderer, actionDescriptor );
    when( actionDescriptor.getAction() ).thenReturn( action );
    JsonObject properties = new JsonObject();
    properties.add( "query", "bar" );
View Full Code Here

Examples of com.eclipsesource.tabris.ui.action.SearchAction

  }

  @Test
  public void testActivatesServerPushSessionOnActivate() {
    RemoteSearchAction remoteAction = new RemoteSearchAction( ui, uiRenderer, actionDescriptor );
    SearchAction action = spy( new TestSearchAction() );
    when( actionDescriptor.getAction() ).thenReturn( action );

    remoteAction.handleCall( "activate", null );

    assertTrue( ServerPushManager.getInstance().isServerPushActive() );
View Full Code Here

Examples of com.eclipsesource.tabris.ui.action.SearchAction

  }

  @Override
  public void handleNotify( String event, JsonObject properties ) {
    super.handleNotify( event, properties );
    SearchAction action = ( SearchAction )getDescriptor().getAction();
    if( event.equals( EVENT_SEARCH ) ) {
      handleSearch( properties, action );
    } else if( event.equals( EVENT_MODIFY ) ) {
      handleModify( properties, action );
    }
View Full Code Here

Examples of com.eclipsesource.tabris.ui.action.SearchAction

    proposalsMenu.setVisible( true );
  }

  private void doSearch( String query ) {
    ActionDescriptor descriptor = getDescriptor();
    SearchAction action = ( SearchAction )descriptor.getAction();
    action.search( query );
    activateText( false );
    text.setText( "" );
    clearMenuItems();
  }
View Full Code Here

Examples of com.eclipsesource.tabris.ui.action.SearchAction

    }

    @Override
    public void handleEvent( Event event ) {
      Text text = ( Text )event.widget;
      SearchAction action = ( SearchAction )getDescriptor().getAction();
      String query = text.getText();
      action.modified( query, proposalHandler );
      notifyListenersAboutModify( action, query );
    }
View Full Code Here

Examples of com.eclipsesource.tabris.ui.action.SearchAction

  }

  @Override
  public void handleNotify( String event, JsonObject properties ) {
    super.handleNotify( event, properties );
    SearchAction action = ( SearchAction )getDescriptor().getAction();
    if( event.equals( EVENT_SEARCH ) ) {
      action.search( properties.get( PROPERTY_QUERY ).asString() );
    } else if( event.equals( EVENT_MODIFY ) ) {
      action.modified( properties.get( PROPERTY_QUERY ).asString(), new ProposalHandlerImpl( getRemoteObject() ) );
    }
  }
View Full Code Here

Examples of com.eclipsesource.tabris.ui.action.SearchAction

    proposalsMenu.setVisible( true );
  }

  private void doSearch( String query ) {
    ActionDescriptor descriptor = getDescriptor();
    SearchAction action = ( SearchAction )descriptor.getAction();
    action.search( query );
    activateText( false );
    text.setText( "" );
    clearMenuItems();
  }
View Full Code Here

Examples of com.eclipsesource.tabris.ui.action.SearchAction

    }

    @Override
    public void handleEvent( Event event ) {
      Text text = ( Text )event.widget;
      SearchAction action = ( SearchAction )getDescriptor().getAction();
      action.modified( text.getText(), proposalHandler );
    }
View Full Code Here

Examples of hidb2.gui.action.SearchAction

    //    openFileCheckerAction = new OpenFileChecker("Open File Checker", window);
    //    register(openFileCheckerAction);
    //
    //    refreshFileListAction = new RefreshFileList("Refresh File List",window);
    //    register(refreshFileListAction);
    searchAction = new SearchAction("Search", window);
    register(searchAction);
    }
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.