01: /*
02: * MainPanel.java
03: *
04: * This file is part of SQL Workbench/J, http://www.sql-workbench.net
05: *
06: * Copyright 2002-2008, Thomas Kellerer
07: * No part of this code maybe reused without the permission of the author
08: *
09: * To contact the author please send an email to: support@sql-workbench.net
10: *
11: */
12: package workbench.interfaces;
13:
14: import java.awt.Font;
15: import java.io.IOException;
16: import java.util.List;
17: import javax.swing.JTabbedPane;
18:
19: import workbench.db.WbConnection;
20: import workbench.gui.actions.WbAction;
21: import workbench.gui.components.WbToolbar;
22: import workbench.util.WbWorkspace;
23:
24: /**
25: *
26: * @author support@sql-workbench.net
27: */
28: public interface MainPanel {
29: List getActions();
30:
31: WbToolbar getToolbar();
32:
33: void showStatusMessage(String aMsg);
34:
35: void clearStatusMessage();
36:
37: void showLogMessage(String aMsg);
38:
39: void clearLog();
40:
41: void showLogPanel();
42:
43: void showResultPanel();
44:
45: void setConnectionClient(Connectable client);
46:
47: void setConnection(WbConnection aConnection);
48:
49: WbConnection getConnection();
50:
51: void addToToolbar(WbAction anAction, boolean aFlag);
52:
53: void setFont(Font aFont);
54:
55: void disconnect();
56:
57: String getTabTitle();
58:
59: void setTabTitle(JTabbedPane tab, int index);
60:
61: void setTabName(String name);
62:
63: String getId();
64:
65: boolean isConnected();
66:
67: boolean isBusy();
68:
69: void dispose();
70:
71: void panelSelected();
72:
73: void readFromWorkspace(WbWorkspace w, int index) throws IOException;
74:
75: void saveToWorkspace(WbWorkspace w, int index) throws IOException;
76:
77: boolean canCloseTab();
78:
79: void reset();
80: }
|