Class ImageFiles

java.lang.Object
io.github.jbastgen.stemma.app.io.ImageFiles

public final class ImageFiles extends Object
Which files the diff view shows as pictures (feature 56): the formats JavaFX can decode. SVG is text (its diff is the useful view) and WebP or TIFF cannot be decoded, so they keep the "Binary file" note.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final record 
    One version of a picture file.
    static final record 
    The two versions the view compares; either is null when the file does not exist on that side.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final long
    Larger files are not decoded: a picture is held in memory several times over.
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    Whether the path ends in the extension of a picture format JavaFX can show (case does not matter).
    static String
    size(long bytes)
    A size for people: 812 B, 3.1 KB, 1.4 MB.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • MAX_BYTES

      public static final long MAX_BYTES
      Larger files are not decoded: a picture is held in memory several times over.
      See Also:
  • Method Details

    • isImageFile

      public static boolean isImageFile(String path)
      Whether the path ends in the extension of a picture format JavaFX can show (case does not matter).
    • size

      public static String size(long bytes)
      A size for people: 812 B, 3.1 KB, 1.4 MB.