public JSSplashScreenActivity( final JSNativeSplashScreen nativeSplashScreen, final SplashView splashView) { this.nativeSplashScreen = checkNotNull("nativeSplashScreen", nativeSplashScreen); this.splash = checkNotNull("splashView", splashView); this.isEnabled = nativeSplashScreen.isEnabled(); this.splashFilter = nativeSplashScreen.buildFilter(); }
private void saveState() { showAgain = splash.showAgain(); if (showAgain != null) { splashFilter.setDisplayNextTime(showAgain); nativeSplashScreen.getWbServices().save(splashFilter); } }
@Override public void onStartup(final PlaceRequest place) { this.place = place; nativeSplashScreen .getWbServices() .loadSplashScreenFilter( getFilter().getName(), new ParameterizedCommand<SplashScreenFilter>() { @Override public void execute(final SplashScreenFilter response) { if (response != null) { splashFilter = response; } init(); } }); nativeSplashScreen.onStartup(place); }
@Override public Integer getBodyHeight() { return nativeSplashScreen.getBodyHeight(); }
@Override public IsWidget getWidget() { return new HTML(nativeSplashScreen.getElement().getInnerHTML()); }
@Override public String getTitle() { return nativeSplashScreen.getTitle(); }
@Override public String getIdentifier() { return nativeSplashScreen.getId(); }
@Override public Collection<String> getTraits() { return nativeSplashScreen.getTraits(); }
@Override public String getSignatureId() { return nativeSplashScreen.getId(); }
@Override public void onShutdown() { nativeSplashScreen.onShutdown(); }
@Override public void onClose() { nativeSplashScreen.onClose(); saveState(); }
@Override public void onOpen() { nativeSplashScreen.onOpen(); }