src/main/java/org/openjfx/ImageListHandlersController.java
private void onImageFileListChanged() {

        // only allow 50 images, all remnant would be removed
        if (imageState.imageFileList.size() > imageState.maxImageFiles) {
            notification.notifyInfo("Only allow 50 images. Auto clear " + (imageState.imageFileList.size() - imageState.maxImageFiles) + " images");
            imageState.imageFileList.subList(0, imageState.maxImageFiles).clear();
        } else {
            notification.notifyInfo(String.format("Loading %s image(s)", imageState.imageWrapperList.size()));
        }

        messaging.postMessage(SubjectEnum.OnImageFileListChanged, true);

        this.updateClearAllButtonState();

        imageState.updateImageModel(
                (imageWrapperList) -> {
                    ImageUtil.safeJavaFxExecute((data) -> {
//                        this.repaintImageList();
                        notification.notifyInfo(String.format("%s new image(s) loaded", imageWrapperList.size()));
                        this.toggleEditItemWrapper();

                    });

                }
        );
    }
/**
     * Call back when image file list changed, say added or cleared (clear all)
     */
Call back when image file list changed, say added or cleared (clear all)
Call back when image file list changed say added or cleared ( clear all )
private void onImageFileListChanged() {
        if (imageState.imageFileList.size() > imageState.maxImageFiles) {
            notification.notifyInfo("Only allow 50 images. Auto clear " + (imageState.imageFileList.size() - imageState.maxImageFiles) + " images");
            imageState.imageFileList.subList(0, imageState.maxImageFiles).clear();
        } else {
            notification.notifyInfo(String.format("Loading %s image(s)", imageState.imageWrapperList.size()));
        }
        messaging.postMessage(SubjectEnum.OnImageFileListChanged, true);
        this.updateClearAllButtonState();
        imageState.updateImageModel(
                (imageWrapperList) -> {
                    ImageUtil.safeJavaFxExecute((data) -> {
                        notification.notifyInfo(String.format("%s new image(s) loaded", imageWrapperList.size()));
                        this.toggleEditItemWrapper();
                    });
                }
        );
    }
private void onImageFileListChanged ( ) { if ( imageState . imageFileList . size ( ) > imageState . maxImageFiles ) { notification . notifyInfo ( "Only allow 50 images. Auto clear " + ( imageState . imageFileList . size ( ) - imageState . maxImageFiles ) + " images" ) ; imageState . imageFileList . subList ( 0 , imageState . maxImageFiles ) . clear ( ) ; } else { notification . notifyInfo ( String . format ( "Loading %s image(s)" , imageState . imageWrapperList . size ( ) ) ) ; } messaging . postMessage ( SubjectEnum . OnImageFileListChanged , true ) ; this . updateClearAllButtonState ( ) ; imageState . updateImageModel ( ( imageWrapperList ) -> { ImageUtil . safeJavaFxExecute ( ( data ) -> { notification . notifyInfo ( String . format ( "%s new image(s) loaded" , imageWrapperList . size ( ) ) ) ; this . toggleEditItemWrapper ( ) ; } ) ; } ) ; }
Call back when image file list changed, say added or cleared (clear all)
Call back when image file list changed say added or cleared ( clear all )
// only allow 50 images, all remnant would be removed //                        this.repaintImageList();