jfoenix/src/main/java/com/jfoenix/controls/JFXDrawersStack.java
public void addDrawer(JFXDrawer drawer) {
        if (drawer == null) {
            return;
        }

        if (drawer.getCachePolicy().equals(CachePolicy.IMAGE)) {
            throw new RuntimeException("Drawer is using unsupported cache strategy inside JFXDrawerStack");
        }

        if (drawers.isEmpty()) {
            if (content != null) {
                drawer.setContent(content);
            }
        } else {
            drawer.setContent(drawers.get(drawers.size() - 1));
        }

        drawers.add(drawer);
        getChildren().setAll(drawer);
        drawer.setPickOnBounds(false);

        // add listener to bring drawer to front on hold
        JFXNodeUtils.addPressAndHoldHandler(drawer.sidePane, Duration.millis(300), event -> {
            if (drawers.indexOf(drawer) < drawers.size() - 1) {
                drawer.bringToFront((param) -> {
                    updateDrawerPosition(drawer);
                    return param;
                });
            }
        });
    }
/**
     * add JFXDrawer to the stack
     * <p>
     * NOTE: this method is also called inside {@link JFXDrawersStack#toggle(JFXDrawer)} to add
     * the drawer if not added
     *
     * @param drawer
     */
add JFXDrawer to the stack

NOTE: this method is also called inside  JFXDrawersStack#toggle(JFXDrawer) to add
the drawer if not added

@param drawer
add JFXDrawer to the stack NOTE : this method is also called inside JFXDrawersStack#toggle ( JFXDrawer ) to add the drawer if not added @param drawer
public void addDrawer(JFXDrawer drawer) {
        if (drawer == null) {
            return;
        }
        if (drawer.getCachePolicy().equals(CachePolicy.IMAGE)) {
            throw new RuntimeException("Drawer is using unsupported cache strategy inside JFXDrawerStack");
        }
        if (drawers.isEmpty()) {
            if (content != null) {
                drawer.setContent(content);
            }
        } else {
            drawer.setContent(drawers.get(drawers.size() - 1));
        }
        drawers.add(drawer);
        getChildren().setAll(drawer);
        drawer.setPickOnBounds(false);
        JFXNodeUtils.addPressAndHoldHandler(drawer.sidePane, Duration.millis(300), event -> {
            if (drawers.indexOf(drawer) < drawers.size() - 1) {
                drawer.bringToFront((param) -> {
                    updateDrawerPosition(drawer);
                    return param;
                });
            }
        });
    }
public void addDrawer ( JFXDrawer drawer ) { if ( drawer == null ) { return ; } if ( drawer . getCachePolicy ( ) . equals ( CachePolicy . IMAGE ) ) { throw new RuntimeException ( "Drawer is using unsupported cache strategy inside JFXDrawerStack" ) ; } if ( drawers . isEmpty ( ) ) { if ( content != null ) { drawer . setContent ( content ) ; } } else { drawer . setContent ( drawers . get ( drawers . size ( ) - 1 ) ) ; } drawers . add ( drawer ) ; getChildren ( ) . setAll ( drawer ) ; drawer . setPickOnBounds ( false ) ; JFXNodeUtils . addPressAndHoldHandler ( drawer . sidePane , Duration . millis ( 300 ) , event -> { if ( drawers . indexOf ( drawer ) < drawers . size ( ) - 1 ) { drawer . bringToFront ( ( param ) -> { updateDrawerPosition ( drawer ) ; return param ; } ) ; } } ) ; }
add JFXDrawer to the stack
 <p>
 NOTE: this method is also called inside {@link JFXDrawersStack#toggle(JFXDrawer)} to add
 the drawer if not added
add JFXDrawer to the stack <p > NOTE : this method is also called inside { @link JFXDrawersStack#toggle ( JFXDrawer ) } to add the drawer if not added
// add listener to bring drawer to front on hold