@InterfaceAudience.Private public class TopScreenView extends AbstractScreenView
Modifier and Type | Field and Description |
---|---|
private static int |
MESSAGE_ROW |
private int |
pageSize |
private static int |
RECORD_HEADER_ROW |
private static int |
RECORD_START_ROW |
private static int |
SUMMARY_ROW_NUM |
private static int |
SUMMARY_START_ROW |
private TopScreenPresenter |
topScreenPresenter |
Constructor and Description |
---|
TopScreenView(Screen screen,
Terminal terminal,
long initialRefreshDelay,
Admin admin,
Mode initialMode) |
Modifier and Type | Method and Description |
---|---|
private void |
clearMessage() |
TerminalSize |
doResizeIfNecessary() |
int |
getPageSize() |
TerminalSize |
getTerminalSize() |
ScreenView |
handleKeyPress(KeyPress keyPress) |
ScreenView |
handleTimer() |
void |
init() |
private String |
limitLineLength(String line,
int length) |
private void |
showHeaders(List<Header> headers) |
private void |
showRecords(List<Header> headers,
List<Record> records,
Record selectedRecord) |
private void |
showSummary(Summary summary) |
void |
showTopScreen(Summary summary,
List<Header> headers,
List<Record> records,
Record selectedRecord) |
private ScreenView |
unknownCommandMessage() |
private void |
updatePageSize(TerminalSize terminalSize) |
cancelTimer, clearTerminal, getScreen, getTerminal, getTerminalPrinter, hideCursor, refreshTerminal, setCursorPosition, setTimer
private static final int SUMMARY_START_ROW
private static final int SUMMARY_ROW_NUM
private static final int MESSAGE_ROW
private static final int RECORD_HEADER_ROW
private static final int RECORD_START_ROW
private final TopScreenPresenter topScreenPresenter
private int pageSize
public TopScreenView(Screen screen, Terminal terminal, long initialRefreshDelay, Admin admin, Mode initialMode)
public void init()
init
in interface ScreenView
init
in class AbstractScreenView
public ScreenView handleTimer()
handleTimer
in interface ScreenView
handleTimer
in class AbstractScreenView
@Nullable public ScreenView handleKeyPress(KeyPress keyPress)
handleKeyPress
in interface ScreenView
handleKeyPress
in class AbstractScreenView
public TerminalSize getTerminalSize()
getTerminalSize
in class AbstractScreenView
public TerminalSize doResizeIfNecessary()
doResizeIfNecessary
in class AbstractScreenView
private void updatePageSize(TerminalSize terminalSize)
public int getPageSize()
public void showTopScreen(Summary summary, List<Header> headers, List<Record> records, Record selectedRecord)
private void showSummary(Summary summary)
private void showRecords(List<Header> headers, List<Record> records, Record selectedRecord)
private void showHeaders(List<Header> headers)
private String limitLineLength(String line, int length)
private void clearMessage()
private ScreenView unknownCommandMessage()
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.