Example #1
0
 /**
  * Shows the given Bayesian network in the viewer
  *
  * @param state the Bayesian Network to display
  */
 public synchronized void showBayesianNetwork(DialogueState state) {
   currentState = state;
   if (!isUpdating) {
     new Thread(
             () -> {
               isUpdating = true;
               if (tab.getMainFrame().getSystem().isPaused()) {
                 update();
               } else {
                 synchronized (currentState) {
                   update();
                 }
               }
               isUpdating = false;
             })
         .start();
   }
 }
Example #2
0
 /** Updates the viewer with the current state. */
 private void update() {
   Layout<String, Integer> layout = getGraphLayout(currentState, tab.showParameters());
   setGraphLayout(layout);
   updateDistribs();
 }