Serializable
, Comparable<Screen.RefreshType>
public static enum Screen.RefreshType extends Enum<Screen.RefreshType>
Enum Constant | Description |
---|---|
AUTOMATIC |
Using automatic mode, the Screen will make a guess at which refresh type would be the fastest and use this one.
|
COMPLETE |
In
RefreshType.COMPLETE mode, the screen will send a clear command to the terminal, then redraw the
whole back-buffer line by line. |
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. |
Modifier and Type | Method | Description |
---|---|---|
static Screen.RefreshType |
valueOf(String name) |
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.
|
public static final Screen.RefreshType AUTOMATIC
public static final Screen.RefreshType DELTA
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.public static final Screen.RefreshType COMPLETE
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?)public static Screen.RefreshType[] values()
for (Screen.RefreshType c : Screen.RefreshType.values()) System.out.println(c);
public static Screen.RefreshType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullCopyright © 2020. All rights reserved.