Enum Screen.RefreshType

java.lang.Object
java.lang.Enum<Screen.RefreshType>
com.googlecode.lanterna.screen.Screen.RefreshType
All Implemented Interfaces:
Serializable, Comparable<Screen.RefreshType>, java.lang.constant.Constable
Enclosing interface:
Screen

public static enum Screen.RefreshType extends Enum<Screen.RefreshType>
This enum represents the different ways a Screen can refresh the screen, moving the back-buffer data into the front-buffer that is being displayed.
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Using automatic mode, the Screen will make a guess at which refresh type would be the fastest and use this one.
    In RefreshType.COMPLETE mode, the screen will send a clear command to the terminal, then redraw the whole back-buffer line by line.
    In RefreshType.DELTA mode, the Screen will calculate a diff between the back-buffer and the front-buffer, then figure out the set of terminal commands that is required to make the front-buffer exactly like the back-buffer.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the enum constant of this type with the specified name.
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • AUTOMATIC

      public static final Screen.RefreshType AUTOMATIC
      Using automatic mode, the Screen will make a guess at which refresh type would be the fastest and use this one.
    • DELTA

      public static final Screen.RefreshType DELTA
      In RefreshType.DELTA mode, the Screen will calculate a diff between the back-buffer and the front-buffer, then figure out the set of terminal commands that is required to make the front-buffer exactly like the back-buffer. This normally works well when you have modified only parts of the screen, but if you have modified almost everything it will cause a lot of overhead and you should use RefreshType.COMPLETE instead.
    • COMPLETE

      public static final Screen.RefreshType COMPLETE
      In RefreshType.COMPLETE mode, the screen will send a clear command to the terminal, then redraw the whole back-buffer line by line. This is more expensive than RefreshType.COMPLETE, especially when you have only touched smaller parts of the screen, but can be faster if you have modified most of the content, as well as if you suspect the screen's internal front buffer is out-of-sync with what's really showing on the terminal (you didn't go and call methods on the underlying Terminal while in screen mode, did you?)
  • Constructor Details

    • RefreshType

      private RefreshType()
  • Method Details

    • values

      public static Screen.RefreshType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static Screen.RefreshType valueOf(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:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null