public class ResultRepositoryRenderer extends Object implements ResultRepository.ResultConsumer
ResultRepository
in the JavaFX GUI.
The results are rendered in a TreeTableView
with top-level entries corresponding to top-level
Result
s in the ResultRepository
. If these top-level entries are aggregate types like ResultSetResult
s,
they may be expanded to also list their content Result
s.
Result
s with appropriate ResultRenderer
s will be rendered in another BorderPane
of the JavaFX GUI.
Result
s with appropriate ResultSaver
s may be stored to disk using a "Save" (or "Save all" in case of aggregate results) button also displayed
in the TreeTableView
.
Top-level Result
s may removed from the view (and the ResultRepository
) via a "Remove" button.
This class implements ResultRepository.ResultConsumer
is is automatically notified if new results are added to the ResultRepository
.Constructor and Description |
---|
ResultRepositoryRenderer(BorderPane viewerPane,
Application app)
Creates a new
ResultRepositoryRenderer for the current Application , where
Result s with appropriate ResultRenderer s are displayed in the supplied BorderPane
upon selection. |
Modifier and Type | Method and Description |
---|---|
void |
addListener(ListChangeListener listener)
Adds a listener to the list of elements in the
TreeTableView . |
void |
addResult(Result res)
Adds a result to the rendered view.
|
Control |
getControl()
Returns the Control (i.e., the
TreeTableView in the current implementation) that renders the ResultRepository contents. |
void |
notifyAdded(Result added)
|
void |
notifyRefresh(Result renamed)
Notifies the
ResultRepository.ResultConsumer that a Result has been modified in the ResultRepository
and the view should be refreshed. |
void |
notifyRemoved(Result removed)
Notifies the
ResultRepository.ResultConsumer that a Result has been removed from the ResultRepository . |
boolean |
removeResult(Result res)
Removes a result from the rendered view.
|
public ResultRepositoryRenderer(BorderPane viewerPane, Application app)
ResultRepositoryRenderer
for the current Application
, where
Result
s with appropriate ResultRenderer
s are displayed in the supplied BorderPane
upon selection.viewerPane
- the pane for displaying resultsapp
- the surrounding Application
public Control getControl()
TreeTableView
in the current implementation) that renders the ResultRepository
contents.public void addListener(ListChangeListener listener)
TreeTableView
.listener
- the listenerpublic void addResult(Result res)
ResultRepository.ResultConsumer
interface.res
- the new Result
public boolean removeResult(Result res)
ResultRepository.ResultConsumer
interface.res
- the new Result
public void notifyAdded(Result added)
ResultRepository.ResultConsumer
notifyAdded
in interface ResultRepository.ResultConsumer
added
- the Result
addedpublic void notifyRemoved(Result removed)
ResultRepository.ResultConsumer
ResultRepository.ResultConsumer
that a Result
has been removed from the ResultRepository
.notifyRemoved
in interface ResultRepository.ResultConsumer
removed
- the Result
removedpublic void notifyRefresh(Result renamed)
ResultRepository.ResultConsumer
ResultRepository.ResultConsumer
that a Result
has been modified in the ResultRepository
and the view should be refreshed.notifyRefresh
in interface ResultRepository.ResultConsumer
renamed
- the Result
renamed