Enum DisposeMethod

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<DisposeMethod>

    public enum DisposeMethod
    extends java.lang.Enum<DisposeMethod>
    When gifs transition from frame to frame, the new frame is overlaid on top of the previous frame, with the 'disposeMethod' metadata property of each frame telling the current frame what to do with the previous frame once the new frame is displayed.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      DO_NOT_DISPOSE
      'doNotDispose' tells the current frame to display the pixels from the previous frame that were not replaced with the new frame.
      NONE
      'none' or unspecified replaces the entire non-transparent frame with the new one.
      RESTORE_TO_BACKGROUND_COLOR
      'restoreToBackgroundColor' makes the background color or background tile show through the transparent pixels of the new frame (replacing the image areas of the previous frame).
      RESTORE_TO_PREVIOUS
      'restoreToPrevious' restores to the state of the most recent un-disposed frame.
    • Enum Constant Detail

      • NONE

        public static final DisposeMethod NONE
        'none' or unspecified replaces the entire non-transparent frame with the new one.
      • DO_NOT_DISPOSE

        public static final DisposeMethod DO_NOT_DISPOSE
        'doNotDispose' tells the current frame to display the pixels from the previous frame that were not replaced with the new frame. When not dealing with transparent frames 'none' and 'doNotDispose' behave the same.
      • RESTORE_TO_BACKGROUND_COLOR

        public static final DisposeMethod RESTORE_TO_BACKGROUND_COLOR
        'restoreToBackgroundColor' makes the background color or background tile show through the transparent pixels of the new frame (replacing the image areas of the previous frame).
      • RESTORE_TO_PREVIOUS

        public static final DisposeMethod RESTORE_TO_PREVIOUS
        'restoreToPrevious' restores to the state of the most recent un-disposed frame. For example, if you have a static background that is set to Do Not Dispose, that image will reappear in the areas left by a replaced frame (until a new frame has been declared as 'doNotDispose').
    • Method Detail

      • values

        public static DisposeMethod[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (DisposeMethod c : DisposeMethod.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static DisposeMethod valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getDisposeMethodValue

        public java.lang.String getDisposeMethodValue()
      • getDisposeMethodFromId

        public static DisposeMethod getDisposeMethodFromId​(int id)