- All Implemented Interfaces:
Serializable
,Comparable<Screen.RefreshType>
,java.lang.constant.Constable
- Enclosing interface:
Screen
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 ConstantsEnum ConstantDescriptionUsing automatic mode, the Screen will make a guess at which refresh type would be the fastest and use this one.InRefreshType.COMPLETE
mode, the screen will send a clear command to the terminal, then redraw the whole back-buffer line by line.InRefreshType.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 -
Method Summary
Modifier and TypeMethodDescriptionstatic Screen.RefreshType
Returns the enum constant of this type with the specified name.static Screen.RefreshType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
AUTOMATIC
Using automatic mode, the Screen will make a guess at which refresh type would be the fastest and use this one. -
DELTA
InRefreshType.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 useRefreshType.COMPLETE
instead. -
COMPLETE
InRefreshType.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 thanRefreshType.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
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
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 nameNullPointerException
- if the argument is null
-