Class ConsoleSetupAnimation
java.lang.Object
eu.cloudnetservice.node.impl.console.animation.AbstractConsoleAnimation
eu.cloudnetservice.node.impl.console.animation.setup.ConsoleSetupAnimation
- All Implemented Interfaces:
Runnable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate booleanprivate intprivate final Deque<QuestionListEntry<?>> private final eu.cloudnetservice.driver.event.EventManagerprivate final Stringprivate final UUIDprivate final Stringprivate final eu.cloudnetservice.driver.language.I18nprivate final QueuedConsoleLogAppenderprivate final Stringprivate Collection<String> private Collection<String> private booleanprivate Stringprivate booleanFields inherited from class AbstractConsoleAnimation
console, cursorUp, finishHandler, LOGGER, startInstant, staticCursor, updateInterval -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddEntries(QuestionListEntry<?> @NonNull ... entries) voidaddEntriesFirst(QuestionListEntry<?> @NonNull ... entries) booleanvoidcancellable(boolean cancellable) booleanvoidentries()private @NonNull org.jline.jansi.AnsieraseLines(@NonNull org.jline.jansi.Ansi ansi, int count) voidprotected booleanhandleInput(@NonNull QuestionAnswerType<?> answerType, @NonNull QuestionListEntry<?> entry, @NonNull String input) protected booleanbooleanvoid<T> TupdateCursor(String @NonNull ... texts) Methods inherited from class AbstractConsoleAnimation
addFinishHandler, addToCursor, console, eraseLastLine, print, run, staticCursor, updateInterval
-
Field Details
-
i18n
private final eu.cloudnetservice.driver.language.I18n i18n -
eventManager
private final eu.cloudnetservice.driver.event.EventManager eventManager -
logHandler
-
handlerId
-
header
-
overwritePrompt
-
results
-
entries
-
previousPrompt
-
previousPrintingEnabled
private boolean previousPrintingEnabled -
previousHistory
-
previousConsoleLines
-
previousUseMatchingHistorySearch
private boolean previousUseMatchingHistorySearch -
currentCursor
private int currentCursor -
cancelled
private boolean cancelled -
cancellable
private boolean cancellable
-
-
Constructor Details
-
ConsoleSetupAnimation
public ConsoleSetupAnimation(@NonNull @Service @NonNull eu.cloudnetservice.driver.language.I18n i18n, @NonNull @NonNull eu.cloudnetservice.driver.event.EventManager eventManager, @NonNull @NonNull QueuedConsoleLogAppender logHandler, @Nullable @Nullable String header, @Nullable @Nullable String footer, @Nullable @Nullable String overwritePrompt)
-
-
Method Details
-
addEntries
-
addEntriesFirst
-
entries
-
cancelled
public boolean cancelled() -
cancellable
public boolean cancellable() -
cancellable
public void cancellable(boolean cancellable) -
result
-
hasResult
-
console
- Overrides:
consolein classAbstractConsoleAnimation
-
handleTick
protected boolean handleTick()- Specified by:
handleTickin classAbstractConsoleAnimation- Returns:
- if the animation is finished and should be cancelled
-
handleDone
public void handleDone()- Overrides:
handleDonein classAbstractConsoleAnimation
-
handleInput
protected boolean handleInput(@NonNull @NonNull QuestionAnswerType<?> answerType, @NonNull @NonNull QuestionListEntry<?> entry, @NonNull @NonNull String input) throws InterruptedException - Throws:
InterruptedException
-
resetConsole
public void resetConsole()- Overrides:
resetConsolein classAbstractConsoleAnimation
-
updateCursor
-
eraseLines
-