- if (disconnectMenu.getMenuComponentCount() == 0) {
- JMenuItem noNodeAvailableItem = new JMenuItem(I18n.get("mainWindow.menu.disconnectNoNodeAvailable.name"));
- noNodeAvailableItem.setEnabled(false);
- disconnectMenu.add(noNodeAvailableItem);
+ }
+
+ /**
+ * Removes the pane containing the given project.
+ *
+ * @param project
+ * The project whose pane to remove
+ */
+ void removeProject(Project project) {
+ int projectIndex = getProjectIndex(project);
+ projectPane.remove(projectIndex);
+ }
+
+ /**
+ * @param project
+ */
+ void projectInsertStarted(Project project) {
+ int projectIndex = getProjectIndex(project);
+ if (projectIndex == -1) {
+ return;
+ }
+ projectPane.setTitleAt(projectIndex, I18n.get("projectPanel.title.starting", project.getName()));
+ }
+
+ /**
+ * @param project
+ * @param totalBlocks
+ * @param requiredBlocks
+ * @param successfulBlocks
+ * @param failedBlocks
+ * @param fatallyFailedBlocks
+ * @param finalizedTotal
+ */
+ void projectInsertProgressed(Project project, int totalBlocks, int requiredBlocks, int successfulBlocks, int failedBlocks, int fatallyFailedBlocks, boolean finalizedTotal) {
+ int projectIndex = getProjectIndex(project);
+ if (projectIndex == -1) {
+ return;
+ }
+ projectPane.setTitleAt(projectIndex, I18n.get("projectPanel.title.progress", project.getName(), requiredBlocks / (double) successfulBlocks));
+ }
+
+ /**
+ * @param project
+ */
+ void projectInsertGeneratedURI(Project project) {
+ /* TODO - update panel. */
+ }
+
+ /**
+ * @param project
+ * @param success
+ */
+ void projectInsertFinished(Project project, boolean success) {
+ int projectIndex = getProjectIndex(project);
+ if (projectIndex == -1) {
+ return;