package net.hexid.hexbot.bot.gui;

import javafx.event.Event;

public class BotTabPane extends javafx.scene.control.TabPane {
	public BotTabPane() {
		super();
		setSide(javafx.geometry.Side.BOTTOM); // have the tabs along the bottom
	}

	public void addBotTab(final BotTab tab) {
		// kill the process and remove the tab from the list when closed
		tab.setOnClosed(new javafx.event.EventHandler<Event>() {
			public void handle(Event e) {
				tab.killProcess(); // stop the bot process in the tab
			}
		});
		getTabs().add(tab);
		getSelectionModel().select(tab);
	}
}
@@ -54,16 +54,49 @@
 t.Event;
+%0Aimport javafx.scene.control.Tab;
 %0A%0Apublic
@@ -304,15 +304,47 @@
 Tab 
-t
+botT
 ab) %7B%0A
+%09%09Tab tab = botTab.getTab();%0A
 %09%09//
@@ -502,17 +502,20 @@
 ) %7B%0A%09%09%09%09
-t
+botT
 ab.killP

Allow use of new BotTab in the BotTabPane