public void updateTitle(final Workspace workspace, final TabPanel tabPanel) {
    titlePath = null;
    if (tabPanel instanceof WorkspaceTabPanel) {
      if (workspace == null || !workspace.isLoaded()) {
        setTitle("");
      } else {
        setTitle(workspace.getWorkspaceFilePath());
        titlePath = workspace.getWorkspaceFilePath();
        updateEllipsis();
      }
    } else if (tabPanel instanceof FunctionDiffViewTabPanel) {
      final String title = tabPanel.getTitle();

      setTitle(title);
    } else if (tabPanel instanceof ViewTabPanel) {
      final String title =
          String.format(
              "%s - %s",
              tabPanel.getTitle(),
              ((ViewTabPanel) tabPanel).getView().getGraphs().getDiff().getDiffName());

      setTitle(title);
    }
  }
This class represents the BinDiff main window.
java/ui/src/main/java/com/google/security/zynamics/bindiff/gui/window/MainWindow.java