Class CliView<OP extends Enum<OP>,OUT>
java.lang.Object
org.apache.flink.table.client.cli.CliView<OP,OUT>
- Type Parameters:
OP- supported list of operations
- Direct Known Subclasses:
CliInputView,CliResultView,CliRowView
Framework for a CLI view with header, footer, and main part that is scrollable.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidcleanUp()voidprotected voidclose()protected voidprotected voidprotected abstract List<org.jline.utils.AttributedString>protected abstract List<org.jline.utils.AttributedString>protected abstract List<org.jline.utils.AttributedString>protected abstract List<org.jline.utils.AttributedString>protected voiddisplay()protected abstract voidprotected List<org.jline.utils.AttributedString>protected List<org.jline.utils.AttributedString>protected intprotected abstract org.jline.keymap.KeyMap<OP>getKeys()protected List<org.jline.utils.AttributedString>protected List<org.jline.utils.AttributedString>intintprotected abstract StringgetTitle()protected org.jline.utils.AttributedStringprotected intprotected intprotected intgetWidth()protected abstract voidinit()Starts threads if necessary.protected booleanvoidopen()protected voidMust be called when values in one or more parts have changed.protected voidMust be called when values in the main part (main header or main) have changed.protected voidprotected voidscrollDown(int n) protected voidprotected voidprotected voidscrollUp()
-
Field Details
-
terminal
protected final org.jline.terminal.Terminal terminal -
offsetX
protected int offsetX -
offsetY
protected int offsetY
-
-
Constructor Details
-
CliView
public CliView(org.jline.terminal.Terminal terminal)
-
-
Method Details
-
open
public void open() -
getResult
-
isRunning
protected boolean isRunning() -
close
protected void close() -
close
-
close
-
display
protected void display() -
scrollLeft
protected void scrollLeft() -
scrollRight
protected void scrollRight() -
scrollUp
protected void scrollUp() -
scrollDown
protected void scrollDown() -
scrollDown
protected void scrollDown(int n) -
getVisibleMainHeight
protected int getVisibleMainHeight() -
getHeaderLines
-
getMainHeaderLines
-
getMainLines
-
getTotalMainWidth
protected int getTotalMainWidth() -
getTitleLine
protected org.jline.utils.AttributedString getTitleLine() -
resetAllParts
protected void resetAllParts()Must be called when values in one or more parts have changed. -
resetMainPart
protected void resetMainPart()Must be called when values in the main part (main header or main) have changed. -
getWidth
protected int getWidth() -
getHeight
protected int getHeight() -
clearTerminal
public void clearTerminal() -
getTerminalWidth
public int getTerminalWidth() -
getTerminalHeight
public int getTerminalHeight() -
init
protected abstract void init()Starts threads if necessary. -
getKeys
-
evaluate
-
getTitle
-
computeHeaderLines
-
computeMainHeaderLines
-
computeMainLines
-
cleanUp
protected abstract void cleanUp()
-