@Test @DisplayName("Show non-blocking overlay and close by clicking on the GlassPane") void hideOverlayNonBlockingGlassPane() { robot.interact(() -> { workbench.showOverlay(overlay1, false); simulateGlassPaneClick(overlay1); assertEquals(1, overlays.size()); assertEquals(0, blockingOverlaysShown.size()); assertEquals(0, overlaysShown.size()); assertFalse(overlay1.isVisible()); GlassPane glassPane = overlays.get(overlay1).getGlassPane(); assertTrue(glassPane.isHide()); }); }
public final boolean showOverlay(Region overlay, boolean blocking) { LOGGER.trace("showOverlay"); if (!overlays.containsKey(overlay)) { overlays.put(overlay, new WorkbenchOverlay(overlay, new GlassPane())); } if (blockingOverlaysShown.contains(overlay) || nonBlockingOverlaysShown.contains(overlay)) { return false; } if (blocking) { LOGGER.trace("showOverlay - blocking"); return blockingOverlaysShown.add(overlay); } else { LOGGER.trace("showOverlay - non-blocking"); return nonBlockingOverlaysShown.add(overlay); } }
Workbench extends Control { public final boolean showOverlay(Region overlay, boolean blocking) { LOGGER.trace("showOverlay"); if (!overlays.containsKey(overlay)) { overlays.put(overlay, new WorkbenchOverlay(overlay, new GlassPane())); } if (blockingOverlaysShown.contains(overlay) || nonBlockingOverlaysShown.contains(overlay)) { return false; } if (blocking) { LOGGER.trace("showOverlay - blocking"); return blockingOverlaysShown.add(overlay); } else { LOGGER.trace("showOverlay - non-blocking"); return nonBlockingOverlaysShown.add(overlay); } } }
Workbench extends Control { public final boolean showOverlay(Region overlay, boolean blocking) { LOGGER.trace("showOverlay"); if (!overlays.containsKey(overlay)) { overlays.put(overlay, new WorkbenchOverlay(overlay, new GlassPane())); } if (blockingOverlaysShown.contains(overlay) || nonBlockingOverlaysShown.contains(overlay)) { return false; } if (blocking) { LOGGER.trace("showOverlay - blocking"); return blockingOverlaysShown.add(overlay); } else { LOGGER.trace("showOverlay - non-blocking"); return nonBlockingOverlaysShown.add(overlay); } } Workbench(); private  Workbench(WorkbenchBuilder builder); }
Workbench extends Control { public final boolean showOverlay(Region overlay, boolean blocking) { LOGGER.trace("showOverlay"); if (!overlays.containsKey(overlay)) { overlays.put(overlay, new WorkbenchOverlay(overlay, new GlassPane())); } if (blockingOverlaysShown.contains(overlay) || nonBlockingOverlaysShown.contains(overlay)) { return false; } if (blocking) { LOGGER.trace("showOverlay - blocking"); return blockingOverlaysShown.add(overlay); } else { LOGGER.trace("showOverlay - non-blocking"); return nonBlockingOverlaysShown.add(overlay); } } Workbench(); private  Workbench(WorkbenchBuilder builder); static WorkbenchBuilder builder(WorkbenchModule... modules); final void openModule(WorkbenchModule module); final void openAddModulePage(); final boolean closeModule(WorkbenchModule module); final void completeModuleCloseable(WorkbenchModule module); final boolean showOverlay(Region overlay, boolean blocking); final boolean hideOverlay(Region overlay); final void clearOverlays(); final WorkbenchDialog showDialog(WorkbenchDialog dialog); final WorkbenchDialog showErrorDialog(String title,
                                               String message,
                                               Consumer<ButtonType> onResult); final WorkbenchDialog showErrorDialog(String title,
                                               String message,
                                               Exception exception,
                                               Consumer<ButtonType> onResult); final WorkbenchDialog showErrorDialog(String title,
                                               String message,
                                               String details,
                                               Consumer<ButtonType> onResult); final WorkbenchDialog showWarningDialog(String title,
                                                 String message,
                                                 Consumer<ButtonType> onResult); final WorkbenchDialog showConfirmationDialog(String title,
                                                      String message,
                                                      Consumer<ButtonType> onResult); final WorkbenchDialog showInformationDialog(String title,
                                                     String message,
                                                     Consumer<ButtonType> onResult); final void hideDialog(WorkbenchDialog dialog); final void showDrawer(Region drawer, Side side); final void showDrawer(Region drawer, Side side, int percentage); final void hideDrawer(); final void showNavigationDrawer(); final void hideNavigationDrawer(); final ObservableList<WorkbenchModule> getOpenModules(); final ObservableList<WorkbenchModule> getModules(); final WorkbenchModule getActiveModule(); final ReadOnlyObjectProperty<WorkbenchModule> activeModuleProperty(); final Node getActiveModuleView(); final ReadOnlyObjectProperty<Node> activeModuleViewProperty(); final boolean isSingleModuleLayout(); final ObservableList<ToolbarItem> getToolbarControlsLeft(); final ObservableList<ToolbarItem> getToolbarControlsRight(); final ObservableMap<Region, WorkbenchOverlay> getOverlays(); final NavigationDrawer getNavigationDrawer(); final void setNavigationDrawer(NavigationDrawer navigationDrawer); final ObjectProperty<NavigationDrawer> navigationDrawerProperty(); final ObservableList<MenuItem> getNavigationDrawerItems(); final ObservableList<Region> getNonBlockingOverlaysShown(); final ObservableList<Region> getBlockingOverlaysShown(); final int getModulesPerPage(); final void setModulesPerPage(int modulesPerPage); final IntegerProperty modulesPerPageProperty(); final Callback<Workbench, Tab> getTabFactory(); final void setTabFactory(Callback<Workbench, Tab> tabFactory); final ObjectProperty<Callback<Workbench, Tab>> tabFactoryProperty(); final Callback<Workbench, Tile> getTileFactory(); final void setTileFactory(Callback<Workbench, Tile> tileFactory); final ObjectProperty<Callback<Workbench, Tile>> tileFactoryProperty(); final Callback<Workbench, Page> getPageFactory(); final void setPageFactory(Callback<Workbench, Page> pageFactory); final ObjectProperty<Callback<Workbench, Page>> pageFactoryProperty(); final int getAmountOfPages(); final ReadOnlyIntegerProperty amountOfPagesProperty(); final Region getDrawerShown(); final ReadOnlyObjectProperty<Region> drawerShownProperty(); final Side getDrawerSideShown(); final ReadOnlyObjectProperty<Side> drawerSideShownProperty(); @Override final String getUserAgentStylesheet(); }
Workbench extends Control { public final boolean showOverlay(Region overlay, boolean blocking) { LOGGER.trace("showOverlay"); if (!overlays.containsKey(overlay)) { overlays.put(overlay, new WorkbenchOverlay(overlay, new GlassPane())); } if (blockingOverlaysShown.contains(overlay) || nonBlockingOverlaysShown.contains(overlay)) { return false; } if (blocking) { LOGGER.trace("showOverlay - blocking"); return blockingOverlaysShown.add(overlay); } else { LOGGER.trace("showOverlay - non-blocking"); return nonBlockingOverlaysShown.add(overlay); } } Workbench(); private  Workbench(WorkbenchBuilder builder); static WorkbenchBuilder builder(WorkbenchModule... modules); final void openModule(WorkbenchModule module); final void openAddModulePage(); final boolean closeModule(WorkbenchModule module); final void completeModuleCloseable(WorkbenchModule module); final boolean showOverlay(Region overlay, boolean blocking); final boolean hideOverlay(Region overlay); final void clearOverlays(); final WorkbenchDialog showDialog(WorkbenchDialog dialog); final WorkbenchDialog showErrorDialog(String title,
                                               String message,
                                               Consumer<ButtonType> onResult); final WorkbenchDialog showErrorDialog(String title,
                                               String message,
                                               Exception exception,
                                               Consumer<ButtonType> onResult); final WorkbenchDialog showErrorDialog(String title,
                                               String message,
                                               String details,
                                               Consumer<ButtonType> onResult); final WorkbenchDialog showWarningDialog(String title,
                                                 String message,
                                                 Consumer<ButtonType> onResult); final WorkbenchDialog showConfirmationDialog(String title,
                                                      String message,
                                                      Consumer<ButtonType> onResult); final WorkbenchDialog showInformationDialog(String title,
                                                     String message,
                                                     Consumer<ButtonType> onResult); final void hideDialog(WorkbenchDialog dialog); final void showDrawer(Region drawer, Side side); final void showDrawer(Region drawer, Side side, int percentage); final void hideDrawer(); final void showNavigationDrawer(); final void hideNavigationDrawer(); final ObservableList<WorkbenchModule> getOpenModules(); final ObservableList<WorkbenchModule> getModules(); final WorkbenchModule getActiveModule(); final ReadOnlyObjectProperty<WorkbenchModule> activeModuleProperty(); final Node getActiveModuleView(); final ReadOnlyObjectProperty<Node> activeModuleViewProperty(); final boolean isSingleModuleLayout(); final ObservableList<ToolbarItem> getToolbarControlsLeft(); final ObservableList<ToolbarItem> getToolbarControlsRight(); final ObservableMap<Region, WorkbenchOverlay> getOverlays(); final NavigationDrawer getNavigationDrawer(); final void setNavigationDrawer(NavigationDrawer navigationDrawer); final ObjectProperty<NavigationDrawer> navigationDrawerProperty(); final ObservableList<MenuItem> getNavigationDrawerItems(); final ObservableList<Region> getNonBlockingOverlaysShown(); final ObservableList<Region> getBlockingOverlaysShown(); final int getModulesPerPage(); final void setModulesPerPage(int modulesPerPage); final IntegerProperty modulesPerPageProperty(); final Callback<Workbench, Tab> getTabFactory(); final void setTabFactory(Callback<Workbench, Tab> tabFactory); final ObjectProperty<Callback<Workbench, Tab>> tabFactoryProperty(); final Callback<Workbench, Tile> getTileFactory(); final void setTileFactory(Callback<Workbench, Tile> tileFactory); final ObjectProperty<Callback<Workbench, Tile>> tileFactoryProperty(); final Callback<Workbench, Page> getPageFactory(); final void setPageFactory(Callback<Workbench, Page> pageFactory); final ObjectProperty<Callback<Workbench, Page>> pageFactoryProperty(); final int getAmountOfPages(); final ReadOnlyIntegerProperty amountOfPagesProperty(); final Region getDrawerShown(); final ReadOnlyObjectProperty<Region> drawerShownProperty(); final Side getDrawerSideShown(); final ReadOnlyObjectProperty<Side> drawerSideShownProperty(); @Override final String getUserAgentStylesheet();  }