Package com.eclipsesource.tabris.interaction

Examples of com.eclipsesource.tabris.interaction.AppLauncher.open()


  @Test( expected = IllegalArgumentException.class )
  public void testFailsWithNullOptions() {
    AppLauncher launcher = new AppLauncherImpl();

    launcher.open( null );
  }

  @Test
  public void testOpenCreatsCallOperation() {
    RemoteObject remoteObject = environment.getRemoteObject();
View Full Code Here


  @Test
  public void testOpenCreatsCallOperation() {
    RemoteObject remoteObject = environment.getRemoteObject();
    AppLauncher launcher = new AppLauncherImpl();

    launcher.open( new MailOptions( "foo" ) );

    ArgumentCaptor<JsonObject> captor = ArgumentCaptor.forClass( JsonObject.class );
    verify( remoteObject ).call( eq( "open" ), captor.capture() );
    assertEquals( JsonValue.valueOf( App.MAIL.toString() ), captor.getValue().get( "app" ) );
  }
View Full Code Here

    AppLauncher launcher = new AppLauncherImpl();
    LaunchOptions options = new MailOptions( "foo" );
    options.add( "foo", "bar" );
    options.add( "foo1", "bar1" );

    launcher.open( options );

    ArgumentCaptor<JsonObject> captor = ArgumentCaptor.forClass( JsonObject.class );
    verify( remoteObject ).call( eq( "open" ), captor.capture() );
    assertEquals( JsonValue.valueOf( "bar" ), captor.getValue().get( "foo" ) );
    assertEquals( JsonValue.valueOf( "bar1" ), captor.getValue().get( "foo1" ) );
View Full Code Here

  protected void openLocation( double latitude, double longitude ) {
    AppLauncher appLauncher = RWT.getClient().getService( AppLauncher.class );
    if( appLauncher != null ) {
      MapsOptions mapsOptions = new MapsOptions( latitude, longitude );
      appLauncher.open( mapsOptions );
    }
  }

  private void openErrorDialog( String title, String message ) {
    MessageBox box = new MessageBox( shell, SWT.ICON_ERROR );
View Full Code Here

    AppLauncher appLauncher = RWT.getClient().getService( AppLauncher.class );
    if( appLauncher != null ) {
      Book book = getCurrentPageData().get( BOOK_ITEM, Book.class );
      String body = format( "Check out the book \"{0}\".", book.getTitle() );
      MailOptions launchOptions = new MailOptions( "user@mail.com", body );
      appLauncher.open( launchOptions );
    }
  }
}
View Full Code Here

  @Override
  public void execute() {
    AppLauncher appLauncher = RWT.getClient().getService( AppLauncher.class );
    TwitterOptions twitterOptions = new TwitterOptions( "Just created a Tabris HelloWorld App. Take a look..." );
    twitterOptions.setUrl( "http://developer.eclipsesource.com/tabris" );
    appLauncher.open( twitterOptions );
  }

}
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.