@InterfaceAudience.Private public class TopScreenPresenter extends Object
Modifier and Type | Field and Description |
---|---|
private AtomicBoolean |
adjustFieldLength |
private EnumMap<Field,Boolean> |
fieldDisplayMap |
private EnumMap<Field,Integer> |
fieldLengthMap |
private int |
horizontalScroll |
private long |
iterations |
private long |
lastRefreshTimestamp |
private long |
numberOfIterations |
private Paging |
paging |
private AtomicLong |
refreshDelay |
private int |
terminalLength |
private TopScreenModel |
topScreenModel |
private TopScreenView |
topScreenView |
Constructor and Description |
---|
TopScreenPresenter(TopScreenView topScreenView,
long initialRefreshDelay,
TopScreenModel topScreenModel,
List<Field> initialFields,
long numberOfIterations) |
private final TopScreenView topScreenView
private final AtomicLong refreshDelay
private long lastRefreshTimestamp
private final AtomicBoolean adjustFieldLength
private final TopScreenModel topScreenModel
private int terminalLength
private int horizontalScroll
private final EnumMap<Field,Boolean> fieldDisplayMap
private final EnumMap<Field,Integer> fieldLengthMap
private final long numberOfIterations
private long iterations
public TopScreenPresenter(TopScreenView topScreenView, long initialRefreshDelay, TopScreenModel topScreenModel, @Nullable List<Field> initialFields, long numberOfIterations)
public void init()
private void updateTerminalLengthAndPageSize(@Nullable TerminalSize terminalSize, @Nullable Integer pageSize)
public long refresh(boolean force)
public void adjustFieldLength()
private void adjustFieldLengthIfNeeded()
private List<Header> getDisplayedHeaders()
private List<Record> getDisplayedRecords()
private Record getSelectedRecord()
public void arrowUp()
public void arrowDown()
public void pageUp()
public void pageDown()
public void arrowLeft()
public void arrowRight()
public void home()
public void end()
private int getHeaderSize()
public void switchSortOrder()
public ScreenView transitionToHelpScreen(Screen screen, Terminal terminal)
public ScreenView transitionToModeScreen(Screen screen, Terminal terminal)
public ScreenView transitionToFieldScreen(Screen screen, Terminal terminal)
private void switchMode(Mode nextMode)
public void drillDown()
private void reset()
private void initFieldDisplayMapAndFieldLengthMap(@Nullable List<Field> initialFields)
public ScreenView goToMessageMode(Screen screen, Terminal terminal, int row, String message)
public ScreenView goToInputModeForRefreshDelay(Screen screen, Terminal terminal, int row)
public ScreenView goToInputModeForFilter(Screen screen, Terminal terminal, int row, boolean ignoreCase)
public void clearFilters()
public ScreenView goToFilterDisplayMode(Screen screen, Terminal terminal, int row)
public boolean isIterationFinished()
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.