}
}
+ /**
+ * @param project
+ */
+ void projectInsertStarted(Project project) {
+ ProjectPanel projectPanel = findProjectPanel(project);
+ if (projectPanel == null) {
+ return;
+ }
+
+ }
+
+ /**
+ * @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) {
+
+ }
+
+ /**
+ * @param project
+ */
+ void projectInsertGeneratedURI(Project project) {
+
+ }
+
+ /**
+ * @param project
+ * @param success
+ */
+ void projectInsertFinished(Project project, boolean success) {
+
+ }
+
//
// PRIVATE METHODS
//
/**
+ * Locates the project panel that contains the given project.
+ *
+ * @param project
+ * The wanted project
+ */
+ private ProjectPanel findProjectPanel(Project project) {
+ int tabCount = projectPane.getTabCount();
+ for (int tabIndex = 1; tabIndex < tabCount; tabIndex++) {
+ Component tabComponent = projectPane.getComponentAt(tabIndex);
+ if (tabComponent instanceof ProjectPanel) {
+ if (((ProjectPanel) tabComponent).getProject() == project) {
+ return (ProjectPanel) tabComponent;
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
* Initializes the window by creating all its components.
*/
private void initWindow() {
* @see net.pterodactylus.jsite.core.CoreListener#projectInsertStarted(net.pterodactylus.jsite.project.Project)
*/
public void projectInsertStarted(Project project) {
- /* TODO - show in interface */
+ mainWindow.projectInsertStarted(project);
}
/**
* int, int, int, int, int, boolean)
*/
public void projectInsertProgressed(Project project, int totalBlocks, int requiredBlocks, int successfulBlocks, int failedBlocks, int fatallyFailedBlocks, boolean finalizedTotal) {
- /* TODO - show in interface */
+ mainWindow.projectInsertProgressed(project, totalBlocks, requiredBlocks, successfulBlocks, failedBlocks, fatallyFailedBlocks, finalizedTotal);
}
/**
* java.lang.String)
*/
public void projectInsertGeneratedURI(Project project, String uri) {
- /* TODO - show in interface */
+ mainWindow.projectInsertGeneratedURI(project);
}
/**
* boolean)
*/
public void projectInsertFinished(Project project, boolean success) {
- /* TODO - show in interface */
+ mainWindow.projectInsertFinished(project, success);
}
//
private void start() {
Logging.setup("jSite");
+ addLookAndFeel("NimROD", "com.nilo.plaf.nimrod.NimRODLookAndFeel");
CoreImpl core = new CoreImpl();
String configDirectory = System.getProperty("user.home") + File.separator + ".jSite";