@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 |
lastRefreshTimestamp |
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) |
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
public TopScreenPresenter(TopScreenView topScreenView, long initialRefreshDelay, TopScreenModel topScreenModel)
public void init()
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()
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)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.