diff --git a/extra/jheidi/resetTabsMySQL.ajl b/extra/jheidi/resetTabsMySQL.ajl new file mode 100644 index 00000000..470228c8 --- /dev/null +++ b/extra/jheidi/resetTabsMySQL.ajl @@ -0,0 +1,45 @@ + import javax.swing.table.*; + + WindowContext context = argObj("windowContext"); + HashObject profile = context.get("profile"); + + Text banner = null; + Table table = null; + + if ( "Host".equals(arg("selectedTab")) ) + { + banner = context.get("/mainTabs/Database/toolbar/banner"); + banner.setText("No database selected"); + table = context.get("/mainTabs/Database/table"); + table.clear(); + banner = context.get("/mainTabs/Query/toolbar/banner"); + banner.setText("SQL query on " + profile.get("user") + "@" + profile.get("host")); + } + else + { + banner = context.get("/mainTabs/Query/toolbar/banner"); + banner.setText("SQL query on database: " + context.get("currentDB")); + } + + banner = context.get("/mainTabs/Table/toolbar/banner"); + banner.setText("No table selected"); + table = context.get("/mainTabs/Table/table"); + table.clear(); + banner = context.get("/mainTabs/Data/toolbar/banner"); + banner.setText("No table selected"); + table = context.get("/mainTabs/Data/table"); + table.clear(); + + ToolbarButton btn = context.get("/mainTabs/Table/toolbar/New Field"); + btn.setEnabled(false); + + btn = context.get("/mainTabs/Table/toolbar/Manage Indexes"); + btn.setEnabled(false); + + + + + + + + diff --git a/extra/jheidi/resetTabsOracle.ajl b/extra/jheidi/resetTabsOracle.ajl new file mode 100644 index 00000000..29ca4d30 --- /dev/null +++ b/extra/jheidi/resetTabsOracle.ajl @@ -0,0 +1,44 @@ + import javax.swing.table.*; + + WindowContext context = argObj("windowContext"); + HashObject profile = context.get("profile"); + + Text banner = null; + Table table = null; + + if ( "Instance".equals(arg("selectedTab")) ) + { + banner = context.get("/mainTabs/Schema/toolbar/banner"); + banner.setText("No schema selected"); + table = context.get("/mainTabs/Schema/table"); + table.clear(); + banner = context.get("/mainTabs/Query/toolbar/banner"); + banner.setText("SQL query on " + profile.get("user") + "@" + profile.get("host")); + } + else + { + banner = context.get("/mainTabs/Query/toolbar/banner"); + } + + banner = context.get("/mainTabs/Table/toolbar/banner"); + banner.setText("No table selected"); + table = context.get("/mainTabs/Table/table"); + table.clear(); + banner = context.get("/mainTabs/Data/toolbar/banner"); + banner.setText("No table selected"); + table = context.get("/mainTabs/Data/table"); + table.clear(); + + ToolbarButton btn = context.get("/mainTabs/Table/toolbar/New Field"); + btn.setEnabled(false); + + btn = context.get("/mainTabs/Table/toolbar/Manage Indexes"); + btn.setEnabled(false); + + + + + + + +