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
public abstract class CliView<OP extends Enum<OP>,OUT> extends Object
Framework for a CLI view with header, footer, and main part that is scrollable.
-
-
Constructor Summary
Constructors Constructor Description CliView(org.jline.terminal.Terminal terminal)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voidcleanUp()voidclearTerminal()protected voidclose()protected voidclose(SqlExecutionException e)protected voidclose(OUT result)protected abstract List<org.jline.utils.AttributedString>computeFooterLines()protected abstract List<org.jline.utils.AttributedString>computeHeaderLines()protected abstract List<org.jline.utils.AttributedString>computeMainHeaderLines()protected abstract List<org.jline.utils.AttributedString>computeMainLines()protected voiddisplay()protected abstract voidevaluate(OP operation, String binding)protected List<org.jline.utils.AttributedString>getFooterLines()protected List<org.jline.utils.AttributedString>getHeaderLines()protected intgetHeight()protected abstract org.jline.keymap.KeyMap<OP>getKeys()protected List<org.jline.utils.AttributedString>getMainHeaderLines()protected List<org.jline.utils.AttributedString>getMainLines()OUTgetResult()intgetTerminalHeight()intgetTerminalWidth()protected abstract StringgetTitle()protected org.jline.utils.AttributedStringgetTitleLine()protected intgetTotalMainWidth()protected intgetVisibleMainHeight()protected intgetWidth()protected abstract voidinit()Starts threads if necessary.protected booleanisRunning()voidopen()protected voidresetAllParts()Must be called when values in one or more parts have changed.protected voidresetMainPart()Must be called when values in the main part (main header or main) have changed.protected voidscrollDown()protected voidscrollDown(int n)protected voidscrollLeft()protected voidscrollRight()protected voidscrollUp()
-
-
-
Method Detail
-
open
public void open()
-
getResult
public OUT getResult()
-
isRunning
protected boolean isRunning()
-
close
protected void close()
-
close
protected void close(SqlExecutionException e)
-
close
protected void close(OUT result)
-
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
protected List<org.jline.utils.AttributedString> getHeaderLines()
-
getMainHeaderLines
protected List<org.jline.utils.AttributedString> getMainHeaderLines()
-
getMainLines
protected List<org.jline.utils.AttributedString> getMainLines()
-
getFooterLines
protected List<org.jline.utils.AttributedString> getFooterLines()
-
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
protected abstract org.jline.keymap.KeyMap<OP> getKeys()
-
getTitle
protected abstract String getTitle()
-
computeHeaderLines
protected abstract List<org.jline.utils.AttributedString> computeHeaderLines()
-
computeMainHeaderLines
protected abstract List<org.jline.utils.AttributedString> computeMainHeaderLines()
-
computeMainLines
protected abstract List<org.jline.utils.AttributedString> computeMainLines()
-
computeFooterLines
protected abstract List<org.jline.utils.AttributedString> computeFooterLines()
-
cleanUp
protected abstract void cleanUp()
-
-