make oracle and mysql specific

This commit is contained in:
servertood
2008-12-29 20:38:55 +00:00
parent 8feb2cf393
commit 05ad9eb7bb
2 changed files with 89 additions and 0 deletions

View File

@@ -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);

View File

@@ -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);