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
Results in the ResultRepository. If these top-level entries are aggregate types like ResultSetResults,
they may be expanded to also list their content Results.
Results with appropriate ResultRenderers will be rendered in another BorderPane of the JavaFX GUI.
Results with appropriate ResultSavers may be stored to disk using a "Save" (or "Save all" in case of aggregate results) button also displayed
in the TreeTableView.
Top-level Results 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
Results with appropriate ResultRenderers 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
Results with appropriate ResultRenderers are displayed in the supplied BorderPane
upon selection.viewerPane - the pane for displaying resultsapp - the surrounding Applicationpublic 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 Resultpublic boolean removeResult(Result res)
ResultRepository.ResultConsumer interface.res - the new Resultpublic void notifyAdded(Result added)
ResultRepository.ResultConsumernotifyAdded in interface ResultRepository.ResultConsumeradded - the Result addedpublic void notifyRemoved(Result removed)
ResultRepository.ResultConsumerResultRepository.ResultConsumer that a Result has been removed from the ResultRepository.notifyRemoved in interface ResultRepository.ResultConsumerremoved - the Result removedpublic void notifyRefresh(Result renamed)
ResultRepository.ResultConsumerResultRepository.ResultConsumer that a Result has been modified in the ResultRepository
and the view should be refreshed.notifyRefresh in interface ResultRepository.ResultConsumerrenamed - the Result renamed