--- /dev/null
+package org.simantics.selectionview;\r
+\r
+\r
+/**\r
+ * @author Tuukka Lehtonen\r
+ */\r
+public class TabChangeEvent {\r
+\r
+ private final IPropertyTab oldTab;\r
+ private final String oldTabLabel;\r
+ private final IPropertyTab newTab;\r
+ private final String newTabLabel;\r
+\r
+ /**\r
+ * @param oldTab\r
+ * @param oldTabLabel\r
+ * @param newTab\r
+ * @param newTabLabel\r
+ */\r
+ public TabChangeEvent(IPropertyTab oldTab, String oldTabLabel, IPropertyTab newTab, String newTabLabel) {\r
+ this.oldTab = oldTab;\r
+ this.oldTabLabel = oldTabLabel;\r
+ this.newTab = newTab;\r
+ this.newTabLabel = newTabLabel;\r
+ }\r
+\r
+ /**\r
+ * @return <code>null</code> if no tab is currently selected or no tabs\r
+ * exist\r
+ */\r
+ public IPropertyTab getNewTab() {\r
+ return newTab;\r
+ }\r
+\r
+ /**\r
+ * @return <code>null</code> if no tab is currently selected or no tabs\r
+ * exist\r
+ */\r
+ public String getNewTabLabel() {\r
+ return newTabLabel;\r
+ }\r
+\r
+ /**\r
+ * @return <code>null</code> if no tab was previously selected\r
+ */\r
+ public IPropertyTab getOldTab() {\r
+ return oldTab;\r
+ }\r
+\r
+ /**\r
+ * @return <code>null</code> if no tab was previously selected\r
+ */\r
+ public String getOldTabLabel() {\r
+ return oldTabLabel;\r
+ }\r
+\r
+ @Override\r
+ public String toString() {\r
+ return getClass().getSimpleName() + "(" + oldTabLabel + " - " + oldTab + " => " + newTabLabel + " - " + newTab + ")";\r
+ }\r
+\r
+}\r