Class ReportingResourceWorkspace.SnapshotUpdater

  • All Implemented Interfaces:
    java.lang.Runnable, java.util.concurrent.Future<java.util.Optional<java.awt.image.BufferedImage>>, java.util.concurrent.RunnableFuture<java.util.Optional<java.awt.image.BufferedImage>>
    Enclosing class:
    ReportingResourceWorkspace

    public static class ReportingResourceWorkspace.SnapshotUpdater
    extends javax.swing.SwingWorker<java.util.Optional<java.awt.image.BufferedImage>,​java.lang.Void>
    Background worker that resizes a byte[] to 250x300 for display in thumbnails/preview panels. Provide a callback to actually handle the results.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class javax.swing.SwingWorker

        javax.swing.SwingWorker.StateValue
    • Constructor Summary

      Constructors 
      Constructor Description
      SnapshotUpdater​(byte[] snapshotBytes, java.util.function.Consumer<java.awt.image.BufferedImage> callback)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.util.Optional<java.awt.image.BufferedImage> doInBackground()  
      protected void done()  
      • Methods inherited from class javax.swing.SwingWorker

        addPropertyChangeListener, cancel, execute, firePropertyChange, get, get, getProgress, getPropertyChangeSupport, getState, isCancelled, isDone, process, publish, removePropertyChangeListener, run, setProgress
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SnapshotUpdater

        public SnapshotUpdater​(byte[] snapshotBytes,
                               java.util.function.Consumer<java.awt.image.BufferedImage> callback)
    • Method Detail

      • doInBackground

        protected java.util.Optional<java.awt.image.BufferedImage> doInBackground()
        Specified by:
        doInBackground in class javax.swing.SwingWorker<java.util.Optional<java.awt.image.BufferedImage>,​java.lang.Void>
      • done

        protected void done()
        Overrides:
        done in class javax.swing.SwingWorker<java.util.Optional<java.awt.image.BufferedImage>,​java.lang.Void>