public class LynxPresenter extends java.lang.Object implements Lynx.Listener
| Modifier and Type | Class and Description |
|---|---|
static interface |
LynxPresenter.View |
| Constructor and Description |
|---|
LynxPresenter(Lynx lynx,
LynxPresenter.View view,
int maxNumberOfTracesToShow) |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<Trace> |
getCurrentTraces()
Returns a list of the current traces stored in this presenter.
|
void |
onNewTraces(java.util.List<Trace> traces)
Given a list of Trace objects to show, updates the buffer of traces and refresh the view.
|
void |
onScrollToPosition(int lastVisiblePositionInTheList)
Based on the int passed as parameter changes auto scroll feature configuration to
enable/disabled.
|
void |
onShareButtonClicked()
Generates a plain representation of all the Trace objects this presenter has stored and share
them to other applications.
|
void |
pause()
Stops presenter lifecycle if it was previously initialized.
|
void |
resume()
Initializes presenter lifecycle if it wasn't initialized before.
|
void |
setLynxConfig(LynxConfig lynxConfig)
Updates and applies a new lynx configuration based on the LynxConfig object passed as
parameter.
|
void |
updateFilter(java.lang.String filter)
Updates the filter used to know which Trace objects we have to show in the UI.
|
void |
updateFilterTraceLevel(TraceLevel level) |
public LynxPresenter(Lynx lynx, LynxPresenter.View view, int maxNumberOfTracesToShow)
public void setLynxConfig(LynxConfig lynxConfig)
lynxConfig - the lynx configurationpublic void resume()
public void pause()
public void onNewTraces(java.util.List<Trace> traces)
onNewTraces in interface Lynx.Listenerpublic void updateFilter(java.lang.String filter)
filter - the filter to usepublic void updateFilterTraceLevel(TraceLevel level)
public void onShareButtonClicked()
public void onScrollToPosition(int lastVisiblePositionInTheList)
lastVisiblePositionInTheList - the index of the last visible positionpublic java.util.List<Trace> getCurrentTraces()