@Test public void testCallingExitMultipleTimesDoesNotThrowNullPointerException() { nifty.exit(); nifty.exit(); nifty.exit(); }
public void exit() { if (currentScreen == null) { return; } currentScreen.endScreen( new EndNotify() { @Override public final void perform() { exit = true; currentScreen = null; } }); }
Nifty { public void exit() { if (currentScreen == null) { return; } currentScreen.endScreen( new EndNotify() { @Override public final void perform() { exit = true; currentScreen = null; } }); } }
Nifty { public void exit() { if (currentScreen == null) { return; } currentScreen.endScreen( new EndNotify() { @Override public final void perform() { exit = true; currentScreen = null; } }); } Nifty(
      @Nonnull final RenderDevice newRenderDevice,
      @Nonnull final SoundDevice newSoundDevice,
      @Nonnull final InputSystem newInputSystem,
      @Nonnull final TimeProvider newTimeProvider); }
Nifty { public void exit() { if (currentScreen == null) { return; } currentScreen.endScreen( new EndNotify() { @Override public final void perform() { exit = true; currentScreen = null; } }); } Nifty(
      @Nonnull final RenderDevice newRenderDevice,
      @Nonnull final SoundDevice newSoundDevice,
      @Nonnull final InputSystem newInputSystem,
      @Nonnull final TimeProvider newTimeProvider); String getVersion(); @Nonnull EventService getEventService(); void publishEvent(@Nonnull final String id, @Nonnull final NiftyEvent event); void subscribeAnnotations(@Nonnull final Object object); void unsubscribeAnnotations(@Nonnull final Object object); void subscribe(
      @Nonnull final Screen screen,
      @Nonnull final String elementId,
      @Nonnull final Class<T> eventClass,
      @Nonnull final S subscriber); void unsubscribe(@Nullable final String elementId, final Object object); void unsubscribeScreen(@Nonnull final Screen screen); void unsubscribeElement(@Nonnull final Screen screen, @Nonnull final String elementId); void setAlternateKeyForNextLoadXml(@Nullable final String alternateKeyForNextLoadXmlParam); boolean update(); void render(final boolean clearScreen); void resetMouseInputEvents(); @Deprecated void executeEndOfFrameElementActions(); void fromXml(@Nonnull final String filename, @Nonnull final String startScreen); void fromXmlWithoutStartScreen(@Nonnull final String filename); void fromXml(
      @Nonnull final String filename,
      @Nonnull final String startScreen,
      final ScreenController... controllers); void fromXml(
      @Nonnull final String fileId,
      @Nonnull final InputStream input,
      @Nonnull final String startScreen); void fromXmlWithoutStartScreen(@Nonnull final String fileId, @Nonnull final InputStream input); void fromXml(
      @Nonnull final String fileId,
      @Nonnull final InputStream input,
      @Nonnull final String startScreen,
      @Nonnull final ScreenController... controllers); void addXml(@Nonnull final String filename); void addXml(@Nonnull @WillClose final InputStream stream); void validateXml(@Nonnull final String filename); void validateXml(@Nonnull @WillClose final InputStream stream); void gotoScreen(@Nonnull final String id); void setAlternateKey(@Nullable final String alternateKey); @Nonnull Collection<String> getAllScreensName(); void removeScreen(@Nonnull final String id); @Nonnull Collection<String> getAllStylesName(); void exit(); void resolutionChanged(); @Nullable Screen getScreen(@Nonnull final String id); @Nonnull SoundSystem getSoundSystem(); @Nonnull NiftyRenderEngine getRenderEngine(); @Nullable Screen getCurrentScreen(); boolean isActive(@Nonnull final String filename, @Nonnull final String screenId); void registerPopup(@Nonnull final PopupType popup); void showPopup(
      @Nonnull final Screen screen,
      @Nonnull final String id,
      @Nullable final Element defaultFocusElement); @Nullable Element createPopup(@Nonnull final String popupId); @Nonnull Element createPopup(@Nonnull final Screen screen, @Nonnull final String popupId); @Nullable Element createPopupWithId(@Nonnull final String popupId, @Nonnull final String id); @Nonnull Element createPopupWithId(
      @Nonnull final Screen screen,
      @Nonnull final String popupId,
      @Nonnull final String id); @Nullable Element createPopupWithStyle(@Nonnull final String popupId, @Nullable final String style); @Nonnull Element createPopupWithStyle(
      @Nonnull final Screen screen,
      @Nonnull final String popupId,
      @Nullable final String style); @Nullable Element createPopupWithStyle(
      @Nonnull final String popupId,
      @Nonnull final String id,
      @Nullable final String style); @Nonnull Element createPopupWithStyle(
      @Nonnull final Screen screen,
      @Nonnull final String popupId,
      @Nonnull final String id,
      @Nullable final String style); @Nullable Element createPopupWithStyle(
      @Nonnull final String popupId,
      @Nullable final String style,
      @Nullable final Attributes parameters); @Nonnull Element createPopupWithStyle(
      @Nonnull final Screen screen,
      @Nonnull final String popupId,
      @Nullable final String style,
      @Nullable final Attributes parameters); @Nullable Element createPopupWithStyle(
      @Nonnull final String popupId,
      @Nonnull final String id,
      @Nullable final String style,
      @Nullable final Attributes parameters); @Nonnull Element createPopupWithStyle(
      @Nonnull final Screen screen,
      @Nonnull final String popupId,
      @Nonnull final String id,
      @Nullable final String style,
      @Nullable final Attributes parameters); Element findPopupByName(final String id); @Nullable Element getTopMostPopup(); void closePopup(@Nonnull final String id); void closePopup(@Nonnull final String id, @Nullable final EndNotify closeNotify); @Nonnull Element addControl(
      @Nonnull final Screen screen,
      @Nonnull final Element parent,
      @Nonnull final StandardControl standardControl); void removeElement(@Nonnull final Screen screen, @Nonnull final Element element); void removeElement(
      @Nonnull final Screen screen,
      @Nonnull final Element element,
      @Nullable final EndNotify endNotify); void moveElement(
      @Nonnull final Screen screen,
      @Nonnull final Element elementToMove,
      @Nonnull final Element destination,
      @Nullable final EndNotify endNotify); @Deprecated void scheduleEndOfFrameElementAction(
      @Nonnull final Screen screen,
      @Nonnull final Element element,
      @Nonnull final Action action,
      @Nullable final EndNotify endNotify); void scheduleEndOfFrameElementAction(
      @Nonnull final Action action,
      @Nullable final EndNotify endNotify); @Nonnull MouseInputEventProcessor getMouseInputEventQueue(); void registerScreenController(@Nonnull final ScreenController... controllers); @Nullable ScreenController findScreenController(@Nonnull final String controllerClass); void unregisterScreenController(@Nonnull final ScreenController... controllers); @Nonnull ControllerFactory getControllerFactory(); @Nonnull NiftyLoader getLoader(); @Nonnull TimeProvider getTimeProvider(); void addScreen(@Nonnull final String id, @Nonnull final Screen screen); void registerStyle(@Nonnull final StyleType style); void registerControlDefintion(@Nonnull final ControlDefinitionType controlDefinition); void registerEffect(@Nonnull final RegisterEffectType registerEffectType); @Nullable ControlDefinitionType resolveControlDefinition(@Nullable final String name); @Nullable RegisterEffectType resolveRegisteredEffect(@Nullable final String name); @Nonnull StyleResolver getDefaultStyleResolver(); @Nullable String getAlternateKey(); void delayedMethodInvoke(@Nonnull final NiftyDelayedMethodInvoke method, @Nonnull final Object... params); void invokeMethods(); void setLocale(@Nonnull final Locale locale); Locale getLocale(); @Nonnull Map<String, BundleInfo> getResourceBundles(); void addResourceBundle(@Nonnull final String id, @Nonnull final String filename); void addResourceBundle(@Nonnull final String id, @Nonnull final ResourceBundle resourceBundle); @Nullable Properties getGlobalProperties(); void setGlobalProperties(@Nullable final Properties globalProperties); @Nonnull RootLayerFactory getRootLayerFactory(); void loadStyleFile(@Nonnull final String styleFile); void loadControlFile(@Nonnull final String controlFile); void registerResourceBundle(@Nonnull final String id, @Nonnull final String filename); void registerEffect(@Nonnull final String name, @Nonnull final String classParam); void registerSound(@Nonnull final String id, @Nonnull final String filename); void registerMusic(@Nonnull final String id, @Nonnull final String filename); void registerMouseCursor(
      @Nonnull final String id,
      @Nonnull final String filename,
      final int hotspotX,
      final int hotspotY); @Nonnull NiftyMouse getNiftyMouse(); @Nonnull Element createElementFromType(
      @Nonnull final Screen screen,
      @Nonnull final Element parent,
      final ElementType type,
      final int index); @Nonnull Element createElementFromType(
      @Nonnull final Screen screen,
      @Nonnull final Element parent,
      final ElementType type); @Nullable NiftyImage createImage(@Nonnull final String name, final boolean filterLinear); @Nullable NiftyImage createImage(@Nonnull final Screen screen, @Nonnull final String name, final boolean filterLinear); void setDebugOptionPanelColors(final boolean option); boolean isDebugOptionPanelColors(); @Nonnull String specialValuesReplace(@Nullable final String value); @Nonnull Clipboard getClipboard(); void setClipboard(@Nonnull final Clipboard clipboard); @Nullable RenderFont createFont(@Nonnull final String name); @Nonnull String getFontname(@Nonnull final RenderFont font); void enableAutoScaling(final int baseResolutionX, final int baseResolutionY); void enableAutoScaling(
      final int baseResolutionX,
      final int baseResolutionY,
      final float scaleX,
      final float scaleY); void disableAutoScaling(); @Nullable InputStream getResourceAsStream(@Nonnull final String ref); @Nonnull NiftyResourceLoader getResourceLoader(); void setIgnoreMouseEvents(final boolean newValue); boolean isIgnoreMouseEvents(); void setIgnoreKeyboardEvents(final boolean newValue); boolean isIgnoreKeyboardEvents(); NiftyInputConsumerNotify getNiftyInputConsumerNotify(); void setNiftyInputConsumerNotify(final NiftyInputConsumerNotify newNotify); void setAbsoluteClip(int x0,int y0,int x1,int y1); void setAbsoluteClipRect(int x,int y,int width,int height); void disableAbsoluteClip(); void internalPopupRemoved(final String id); void setNiftyMethodInvokerDebugEnabled(final boolean debugEnabled); boolean isNiftyMethodInvokerDebugEnabled(); static void setDefaultInputMappingType(@Nonnull final Class<? extends NiftyInputMapping> defaultInputMappingType); }
Nifty { public void exit() { if (currentScreen == null) { return; } currentScreen.endScreen( new EndNotify() { @Override public final void perform() { exit = true; currentScreen = null; } }); } Nifty(
      @Nonnull final RenderDevice newRenderDevice,
      @Nonnull final SoundDevice newSoundDevice,
      @Nonnull final InputSystem newInputSystem,
      @Nonnull final TimeProvider newTimeProvider); String getVersion(); @Nonnull EventService getEventService(); void publishEvent(@Nonnull final String id, @Nonnull final NiftyEvent event); void subscribeAnnotations(@Nonnull final Object object); void unsubscribeAnnotations(@Nonnull final Object object); void subscribe(
      @Nonnull final Screen screen,
      @Nonnull final String elementId,
      @Nonnull final Class<T> eventClass,
      @Nonnull final S subscriber); void unsubscribe(@Nullable final String elementId, final Object object); void unsubscribeScreen(@Nonnull final Screen screen); void unsubscribeElement(@Nonnull final Screen screen, @Nonnull final String elementId); void setAlternateKeyForNextLoadXml(@Nullable final String alternateKeyForNextLoadXmlParam); boolean update(); void render(final boolean clearScreen); void resetMouseInputEvents(); @Deprecated void executeEndOfFrameElementActions(); void fromXml(@Nonnull final String filename, @Nonnull final String startScreen); void fromXmlWithoutStartScreen(@Nonnull final String filename); void fromXml(
      @Nonnull final String filename,
      @Nonnull final String startScreen,
      final ScreenController... controllers); void fromXml(
      @Nonnull final String fileId,
      @Nonnull final InputStream input,
      @Nonnull final String startScreen); void fromXmlWithoutStartScreen(@Nonnull final String fileId, @Nonnull final InputStream input); void fromXml(
      @Nonnull final String fileId,
      @Nonnull final InputStream input,
      @Nonnull final String startScreen,
      @Nonnull final ScreenController... controllers); void addXml(@Nonnull final String filename); void addXml(@Nonnull @WillClose final InputStream stream); void validateXml(@Nonnull final String filename); void validateXml(@Nonnull @WillClose final InputStream stream); void gotoScreen(@Nonnull final String id); void setAlternateKey(@Nullable final String alternateKey); @Nonnull Collection<String> getAllScreensName(); void removeScreen(@Nonnull final String id); @Nonnull Collection<String> getAllStylesName(); void exit(); void resolutionChanged(); @Nullable Screen getScreen(@Nonnull final String id); @Nonnull SoundSystem getSoundSystem(); @Nonnull NiftyRenderEngine getRenderEngine(); @Nullable Screen getCurrentScreen(); boolean isActive(@Nonnull final String filename, @Nonnull final String screenId); void registerPopup(@Nonnull final PopupType popup); void showPopup(
      @Nonnull final Screen screen,
      @Nonnull final String id,
      @Nullable final Element defaultFocusElement); @Nullable Element createPopup(@Nonnull final String popupId); @Nonnull Element createPopup(@Nonnull final Screen screen, @Nonnull final String popupId); @Nullable Element createPopupWithId(@Nonnull final String popupId, @Nonnull final String id); @Nonnull Element createPopupWithId(
      @Nonnull final Screen screen,
      @Nonnull final String popupId,
      @Nonnull final String id); @Nullable Element createPopupWithStyle(@Nonnull final String popupId, @Nullable final String style); @Nonnull Element createPopupWithStyle(
      @Nonnull final Screen screen,
      @Nonnull final String popupId,
      @Nullable final String style); @Nullable Element createPopupWithStyle(
      @Nonnull final String popupId,
      @Nonnull final String id,
      @Nullable final String style); @Nonnull Element createPopupWithStyle(
      @Nonnull final Screen screen,
      @Nonnull final String popupId,
      @Nonnull final String id,
      @Nullable final String style); @Nullable Element createPopupWithStyle(
      @Nonnull final String popupId,
      @Nullable final String style,
      @Nullable final Attributes parameters); @Nonnull Element createPopupWithStyle(
      @Nonnull final Screen screen,
      @Nonnull final String popupId,
      @Nullable final String style,
      @Nullable final Attributes parameters); @Nullable Element createPopupWithStyle(
      @Nonnull final String popupId,
      @Nonnull final String id,
      @Nullable final String style,
      @Nullable final Attributes parameters); @Nonnull Element createPopupWithStyle(
      @Nonnull final Screen screen,
      @Nonnull final String popupId,
      @Nonnull final String id,
      @Nullable final String style,
      @Nullable final Attributes parameters); Element findPopupByName(final String id); @Nullable Element getTopMostPopup(); void closePopup(@Nonnull final String id); void closePopup(@Nonnull final String id, @Nullable final EndNotify closeNotify); @Nonnull Element addControl(
      @Nonnull final Screen screen,
      @Nonnull final Element parent,
      @Nonnull final StandardControl standardControl); void removeElement(@Nonnull final Screen screen, @Nonnull final Element element); void removeElement(
      @Nonnull final Screen screen,
      @Nonnull final Element element,
      @Nullable final EndNotify endNotify); void moveElement(
      @Nonnull final Screen screen,
      @Nonnull final Element elementToMove,
      @Nonnull final Element destination,
      @Nullable final EndNotify endNotify); @Deprecated void scheduleEndOfFrameElementAction(
      @Nonnull final Screen screen,
      @Nonnull final Element element,
      @Nonnull final Action action,
      @Nullable final EndNotify endNotify); void scheduleEndOfFrameElementAction(
      @Nonnull final Action action,
      @Nullable final EndNotify endNotify); @Nonnull MouseInputEventProcessor getMouseInputEventQueue(); void registerScreenController(@Nonnull final ScreenController... controllers); @Nullable ScreenController findScreenController(@Nonnull final String controllerClass); void unregisterScreenController(@Nonnull final ScreenController... controllers); @Nonnull ControllerFactory getControllerFactory(); @Nonnull NiftyLoader getLoader(); @Nonnull TimeProvider getTimeProvider(); void addScreen(@Nonnull final String id, @Nonnull final Screen screen); void registerStyle(@Nonnull final StyleType style); void registerControlDefintion(@Nonnull final ControlDefinitionType controlDefinition); void registerEffect(@Nonnull final RegisterEffectType registerEffectType); @Nullable ControlDefinitionType resolveControlDefinition(@Nullable final String name); @Nullable RegisterEffectType resolveRegisteredEffect(@Nullable final String name); @Nonnull StyleResolver getDefaultStyleResolver(); @Nullable String getAlternateKey(); void delayedMethodInvoke(@Nonnull final NiftyDelayedMethodInvoke method, @Nonnull final Object... params); void invokeMethods(); void setLocale(@Nonnull final Locale locale); Locale getLocale(); @Nonnull Map<String, BundleInfo> getResourceBundles(); void addResourceBundle(@Nonnull final String id, @Nonnull final String filename); void addResourceBundle(@Nonnull final String id, @Nonnull final ResourceBundle resourceBundle); @Nullable Properties getGlobalProperties(); void setGlobalProperties(@Nullable final Properties globalProperties); @Nonnull RootLayerFactory getRootLayerFactory(); void loadStyleFile(@Nonnull final String styleFile); void loadControlFile(@Nonnull final String controlFile); void registerResourceBundle(@Nonnull final String id, @Nonnull final String filename); void registerEffect(@Nonnull final String name, @Nonnull final String classParam); void registerSound(@Nonnull final String id, @Nonnull final String filename); void registerMusic(@Nonnull final String id, @Nonnull final String filename); void registerMouseCursor(
      @Nonnull final String id,
      @Nonnull final String filename,
      final int hotspotX,
      final int hotspotY); @Nonnull NiftyMouse getNiftyMouse(); @Nonnull Element createElementFromType(
      @Nonnull final Screen screen,
      @Nonnull final Element parent,
      final ElementType type,
      final int index); @Nonnull Element createElementFromType(
      @Nonnull final Screen screen,
      @Nonnull final Element parent,
      final ElementType type); @Nullable NiftyImage createImage(@Nonnull final String name, final boolean filterLinear); @Nullable NiftyImage createImage(@Nonnull final Screen screen, @Nonnull final String name, final boolean filterLinear); void setDebugOptionPanelColors(final boolean option); boolean isDebugOptionPanelColors(); @Nonnull String specialValuesReplace(@Nullable final String value); @Nonnull Clipboard getClipboard(); void setClipboard(@Nonnull final Clipboard clipboard); @Nullable RenderFont createFont(@Nonnull final String name); @Nonnull String getFontname(@Nonnull final RenderFont font); void enableAutoScaling(final int baseResolutionX, final int baseResolutionY); void enableAutoScaling(
      final int baseResolutionX,
      final int baseResolutionY,
      final float scaleX,
      final float scaleY); void disableAutoScaling(); @Nullable InputStream getResourceAsStream(@Nonnull final String ref); @Nonnull NiftyResourceLoader getResourceLoader(); void setIgnoreMouseEvents(final boolean newValue); boolean isIgnoreMouseEvents(); void setIgnoreKeyboardEvents(final boolean newValue); boolean isIgnoreKeyboardEvents(); NiftyInputConsumerNotify getNiftyInputConsumerNotify(); void setNiftyInputConsumerNotify(final NiftyInputConsumerNotify newNotify); void setAbsoluteClip(int x0,int y0,int x1,int y1); void setAbsoluteClipRect(int x,int y,int width,int height); void disableAbsoluteClip(); void internalPopupRemoved(final String id); void setNiftyMethodInvokerDebugEnabled(final boolean debugEnabled); boolean isNiftyMethodInvokerDebugEnabled(); static void setDefaultInputMappingType(@Nonnull final Class<? extends NiftyInputMapping> defaultInputMappingType);  }