Java Doc for MainWindow.java in  » Database-Client » SQL-Workbench » workbench » gui » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database Client » SQL Workbench » workbench.gui 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


javax.swing.JFrame
   workbench.gui.MainWindow

MainWindow
public class MainWindow extends JFrame implements MouseListener,WindowListener,ChangeListener,DropTargetListener,MacroChangeListener,DbExecutionListener,Connectable,PropertyChangeListener,Moveable(Code)
The main window for the Workbench. It will display several workbench.gui.sql.SqlPanel s in a tabbed pane. Additionally one or more workbench.gui.dbobjects.DbExplorerPanel might also be displayed inside the JTabbedPane
author:
   support@sql-workbench.net


Field Summary
protected  WbThreadconnectThread
    
protected  ConnectionSelectorconnectionSelector
    

Constructor Summary
public  MainWindow()
    

Method Summary
public  booleanabortAll()
    
public  voidaddDbExplorerTab(DbExplorerPanel explorer)
    
public  voidaddExecutionListener(DbExecutionListener l)
    
public  voidaddFilenameChangeListener(FilenameChangeListener aListener)
     The listener will be notified when the name of a tab changes.
public  voidaddIndexChangeListener(ChangeListener aListener)
     The listener will be notified when the current tab changes.
public  MainPaneladdTab()
    
public  MainPaneladdTab(boolean selectNew, boolean checkConnection)
     Adds a new SQL tab to the main window.
public  MainPaneladdTab(boolean selectNew, boolean checkConnection, boolean append)
    
public  voidaddToViewMenu(SelectTabAction anAction)
     Add the approriate menu item to select a given tab to the View menu.
public  voidassignWorkspace()
     This will assign the current workspace name to the current profile.
public  JMenubuildHelpMenu()
    
public  JMenubuildToolsMenu()
     Create the tools menu for a panel menu.
public  booleancanCloseTab()
    
public  booleancanRenameTab()
    
public  booleancanUseSeparateConnection()
    
protected  voidcheckWorkspaceActions()
    
protected  voidcloseConnectingInfo()
    
public  voidcloseExplorerWindows(boolean doDisconnect)
    
public  voidcloseTab(int index)
     Removes the tab at the give location.
public  voidcloseWorkspace()
    
public  voidcloseWorkspace(boolean checkUnsaved)
     Closes the current workspace.
public  voidconnectBegin(ConnectionProfile aProfile)
    
public  voidconnectCancelled()
    
public  voidconnectEnded()
    
public  voidconnectFailed(String error)
    
protected  voidconnectPanel(MainPanel aPanel)
     Connect the given panel to the database.
public  voidconnectTo(ConnectionProfile profile, boolean showDialog)
    
public  voidconnected(WbConnection conn)
    
public  voidcreateNewConnectionForCurrentPanel()
    
protected  voidcreateNewConnectionForPanel(MainPanel aPanel)
    
public  voiddisconnect(boolean background, boolean closeWorkspace, boolean saveWorkspace)
    
public  voiddisconnectCurrentPanel()
    
protected  voiddisconnectPanel(MainPanel panel)
    
public  voiddisplay()
    
public  voiddragEnter(java.awt.dnd.DropTargetDragEvent dropTargetDragEvent)
    
public  voiddragExit(java.awt.dnd.DropTargetEvent dropTargetEvent)
    
public  voiddragOver(java.awt.dnd.DropTargetDragEvent dropTargetDragEvent)
    
public  voiddrop(java.awt.dnd.DropTargetDropEvent dropTargetDropEvent)
    
public  voiddropActionChanged(java.awt.dnd.DropTargetDragEvent dropTargetDragEvent)
    
public  voidexecutionEnd(WbConnection conn, Object source)
    
public  voidexecutionStart(WbConnection conn, Object source)
    
public  voidexplorerWindowClosed(DbExplorerWindow w)
    
public  StringgetConnectionId(ConnectionProfile aProfile)
    
protected  StringgetCurrentEditorFile()
    
public  MainPanelgetCurrentPanel()
    
public  intgetCurrentPanelIndex()
    
public  ConnectionProfilegetCurrentProfile()
    
public  SqlPanelgetCurrentSqlPanel()
    
public  StringgetCurrentWorkspaceFile()
    
public  intgetIndexForPanel(MainPanel panel)
    
public  intgetLastSqlPanelIndex()
    
public  JMenugetMacroMenu(int panelIndex)
    
public  JMenugetMenu(String aName, int panelIndex)
    
public  String[]getPanelLabels()
    
public  MainPanelgetSqlPanel(int anIndex)
    
public  JMenugetViewMenu(int panelIndex)
    
public  MainPanelinsertTab()
    
public  booleanisBusy()
     Returns true if at least one of the SQL panels is currently executing a SQL statement.
public  booleanloadWorkspace(String filename)
    
public  voidloadWorkspace()
    
public  voidmacroListChanged()
    
public  voidmouseClicked(MouseEvent e)
    
public  voidmouseEntered(MouseEvent e)
    
public  voidmouseExited(MouseEvent e)
    
public  voidmousePressed(MouseEvent e)
    
public  voidmouseReleased(MouseEvent e)
    
public  voidmoveTab(int oldIndex, int newIndex)
    
public  voidmoveTabLeft()
     Moves the current sql tab to the left (i.e.
public  voidmoveTabRight()
     Moves the current sql tab to the right (i.e.
public  voidnewDbExplorerPanel(boolean select)
    
public  voidnewDbExplorerWindow()
    
public  voidpropertyChange(PropertyChangeEvent evt)
    
protected  voidremoveAllPanels()
    
public  voidremoveExecutionListener(DbExecutionListener l)
    
public  voidremoveFilenameChangeListener(FilenameChangeListener aListener)
     Remove the file name change listener.
public  voidremoveIndexChangeListener(ChangeListener aListener)
    
public  voidremoveLastTab(boolean includeExplorer)
    
public  voidremoveTab()
    
protected  voidremoveTab(int index)
     Removes the indicated tab without checking for modified file etc.
public  voidrenameTab()
    
public  voidrestoreSettings()
    
public  voidrestoreState()
    
public  voidsaveSettings()
    
public  booleansaveWorkspace()
    
public  booleansaveWorkspace(boolean checkUnsaved)
    
public  booleansaveWorkspace(String filename, boolean checkUnsaved)
     Saves the current SQL history to a workspace with the given filename If filename == null, a SaveAs dialog will be displayed.
public  voidselectConnection()
    
public  voidselectConnection(boolean exit)
    
public  voidselectCurrentEditor()
    
public  voidselectTab(int anIndex)
    
protected  voidshowConnectingInfo()
    
public  voidshowDbExplorer()
     Displays the DbExplorer.
protected  voidshowDisconnectInfo()
    
public  voidshowLogMessage(String aMsg)
    
public  voidshowStatusMessage(String aMsg)
    
public  voidstateChanged(ChangeEvent e)
    
protected  voidtabSelected(int index)
    
protected  voidupdateAddMacroAction()
    
protected  voidupdateCurrentTab(int index)
    
protected  voidupdateGuiForTab(int anIndex)
    
protected  voidupdateWindowTitle()
    
public  booleanusesSeparateConnection()
    
public  voidwaitForConnection()
    
public  voidwindowActivated(WindowEvent windowEvent)
    
public  voidwindowClosed(WindowEvent e)
    
public  voidwindowClosing(WindowEvent windowEvent)
    
public  voidwindowDeactivated(WindowEvent windowEvent)
    
public  voidwindowDeiconified(WindowEvent windowEvent)
    
public  voidwindowIconified(WindowEvent windowEvent)
    
public  voidwindowOpened(WindowEvent windowEvent)
    

Field Detail
connectThread
protected WbThread connectThread(Code)



connectionSelector
protected ConnectionSelector connectionSelector(Code)




Constructor Detail
MainWindow
public MainWindow()(Code)




Method Detail
abortAll
public boolean abortAll()(Code)



addDbExplorerTab
public void addDbExplorerTab(DbExplorerPanel explorer)(Code)



addExecutionListener
public void addExecutionListener(DbExecutionListener l)(Code)



addFilenameChangeListener
public void addFilenameChangeListener(FilenameChangeListener aListener)(Code)
The listener will be notified when the name of a tab changes. This is used in the workbench.gui.dbobjects.TableListPanel to display the available panels in the context menu
See Also:   workbench.gui.dbobjects.EditorTabSelectMenu.fileNameChanged(ObjectString)



addIndexChangeListener
public void addIndexChangeListener(ChangeListener aListener)(Code)
The listener will be notified when the current tab changes. This is used in the workbench.gui.dbobjects.TableListPanel to highlight the current tab the context menu
See Also:   workbench.gui.dbobjects.TableListPanel.stateChanged(ChangeEvent)



addTab
public MainPanel addTab()(Code)



addTab
public MainPanel addTab(boolean selectNew, boolean checkConnection)(Code)
Adds a new SQL tab to the main window. This will be inserted before the first DbExplorer tab
Parameters:
  selectNew - if true the new tab is automatically selected
Parameters:
  checkConnection - if true, the panel will automatically be connectedthis is important if a Profile is used where each panel gets its ownconnection



addTab
public MainPanel addTab(boolean selectNew, boolean checkConnection, boolean append)(Code)



addToViewMenu
public void addToViewMenu(SelectTabAction anAction)(Code)
Add the approriate menu item to select a given tab to the View menu.



assignWorkspace
public void assignWorkspace()(Code)
This will assign the current workspace name to the current profile.



buildHelpMenu
public JMenu buildHelpMenu()(Code)



buildToolsMenu
public JMenu buildToolsMenu()(Code)
Create the tools menu for a panel menu. This will be called for each panel that gets added to the main window. Actions that are singletons (like the db explorer stuff) should not be created here



canCloseTab
public boolean canCloseTab()(Code)



canRenameTab
public boolean canRenameTab()(Code)



canUseSeparateConnection
public boolean canUseSeparateConnection()(Code)



checkWorkspaceActions
protected void checkWorkspaceActions()(Code)



closeConnectingInfo
protected void closeConnectingInfo()(Code)



closeExplorerWindows
public void closeExplorerWindows(boolean doDisconnect)(Code)



closeTab
public void closeTab(int index)(Code)
Removes the tab at the give location. If the current profile uses a separate connection per tab, then a disconnect will be triggered as well. This disconnect will be started in a background thread.



closeWorkspace
public void closeWorkspace()(Code)



closeWorkspace
public void closeWorkspace(boolean checkUnsaved)(Code)
Closes the current workspace. The tab count is reset to 1, the SQL history for the tab will be emptied and the workspace filename will be "forgotten".



connectBegin
public void connectBegin(ConnectionProfile aProfile)(Code)



connectCancelled
public void connectCancelled()(Code)



connectEnded
public void connectEnded()(Code)



connectFailed
public void connectFailed(String error)(Code)



connectPanel
protected void connectPanel(MainPanel aPanel)(Code)
Connect the given panel to the database. This will always create a new physical connection to the database.



connectTo
public void connectTo(ConnectionProfile profile, boolean showDialog)(Code)



connected
public void connected(WbConnection conn)(Code)
Call-back function which gets executed on the AWT thread after the initial connection has been completed



createNewConnectionForCurrentPanel
public void createNewConnectionForCurrentPanel()(Code)



createNewConnectionForPanel
protected void createNewConnectionForPanel(MainPanel aPanel)(Code)



disconnect
public void disconnect(boolean background, boolean closeWorkspace, boolean saveWorkspace)(Code)



disconnectCurrentPanel
public void disconnectCurrentPanel()(Code)



disconnectPanel
protected void disconnectPanel(MainPanel panel)(Code)



display
public void display()(Code)



dragEnter
public void dragEnter(java.awt.dnd.DropTargetDragEvent dropTargetDragEvent)(Code)



dragExit
public void dragExit(java.awt.dnd.DropTargetEvent dropTargetEvent)(Code)



dragOver
public void dragOver(java.awt.dnd.DropTargetDragEvent dropTargetDragEvent)(Code)



drop
public void drop(java.awt.dnd.DropTargetDropEvent dropTargetDropEvent)(Code)



dropActionChanged
public void dropActionChanged(java.awt.dnd.DropTargetDragEvent dropTargetDragEvent)(Code)



executionEnd
public void executionEnd(WbConnection conn, Object source)(Code)



executionStart
public void executionStart(WbConnection conn, Object source)(Code)



explorerWindowClosed
public void explorerWindowClosed(DbExplorerWindow w)(Code)



getConnectionId
public String getConnectionId(ConnectionProfile aProfile)(Code)
Return the internal ID that should be used when connecting to the given connection profile an id specific for the current tab or a "global" id the connectionis shared between all tabs of this window



getCurrentEditorFile
protected String getCurrentEditorFile()(Code)



getCurrentPanel
public MainPanel getCurrentPanel()(Code)



getCurrentPanelIndex
public int getCurrentPanelIndex()(Code)



getCurrentProfile
public ConnectionProfile getCurrentProfile()(Code)



getCurrentSqlPanel
public SqlPanel getCurrentSqlPanel()(Code)



getCurrentWorkspaceFile
public String getCurrentWorkspaceFile()(Code)



getIndexForPanel
public int getIndexForPanel(MainPanel panel)(Code)



getLastSqlPanelIndex
public int getLastSqlPanelIndex()(Code)
Returns the index of the las SQL Panel



getMacroMenu
public JMenu getMacroMenu(int panelIndex)(Code)



getMenu
public JMenu getMenu(String aName, int panelIndex)(Code)



getPanelLabels
public String[] getPanelLabels()(Code)



getSqlPanel
public MainPanel getSqlPanel(int anIndex)(Code)



getViewMenu
public JMenu getViewMenu(int panelIndex)(Code)



insertTab
public MainPanel insertTab()(Code)



isBusy
public boolean isBusy()(Code)
Returns true if at least one of the SQL panels is currently executing a SQL statement. This method calls isBusy() for each tab.



loadWorkspace
public boolean loadWorkspace(String filename)(Code)



loadWorkspace
public void loadWorkspace()(Code)



macroListChanged
public void macroListChanged()(Code)



mouseClicked
public void mouseClicked(MouseEvent e)(Code)



mouseEntered
public void mouseEntered(MouseEvent e)(Code)



mouseExited
public void mouseExited(MouseEvent e)(Code)



mousePressed
public void mousePressed(MouseEvent e)(Code)



mouseReleased
public void mouseReleased(MouseEvent e)(Code)



moveTab
public void moveTab(int oldIndex, int newIndex)(Code)



moveTabLeft
public void moveTabLeft()(Code)
Moves the current sql tab to the left (i.e. index := index - 1) If index == 0 nothing happens



moveTabRight
public void moveTabRight()(Code)
Moves the current sql tab to the right (i.e. index := index + 1) If oldIndex denotes the last SQL Tab, nothing happens



newDbExplorerPanel
public void newDbExplorerPanel(boolean select)(Code)



newDbExplorerWindow
public void newDbExplorerWindow()(Code)



propertyChange
public void propertyChange(PropertyChangeEvent evt)(Code)



removeAllPanels
protected void removeAllPanels()(Code)



removeExecutionListener
public void removeExecutionListener(DbExecutionListener l)(Code)



removeFilenameChangeListener
public void removeFilenameChangeListener(FilenameChangeListener aListener)(Code)
Remove the file name change listener.
See Also:   MainWindow.addFilenameChangeListener(FilenameChangeListener)



removeIndexChangeListener
public void removeIndexChangeListener(ChangeListener aListener)(Code)



removeLastTab
public void removeLastTab(boolean includeExplorer)(Code)



removeTab
public void removeTab()(Code)



removeTab
protected void removeTab(int index)(Code)
Removes the indicated tab without checking for modified file etc.



renameTab
public void renameTab()(Code)



restoreSettings
public void restoreSettings()(Code)



restoreState
public void restoreState()(Code)



saveSettings
public void saveSettings()(Code)



saveWorkspace
public boolean saveWorkspace()(Code)



saveWorkspace
public boolean saveWorkspace(boolean checkUnsaved)(Code)
Save the currently loaded workspace



saveWorkspace
public boolean saveWorkspace(String filename, boolean checkUnsaved)(Code)
Saves the current SQL history to a workspace with the given filename If filename == null, a SaveAs dialog will be displayed. If the workspace is saved with a new name (filename == null) the user will be asked if the workspace should be assigned to the current profile



selectConnection
public void selectConnection()(Code)



selectConnection
public void selectConnection(boolean exit)(Code)



selectCurrentEditor
public void selectCurrentEditor()(Code)



selectTab
public void selectTab(int anIndex)(Code)



showConnectingInfo
protected void showConnectingInfo()(Code)
Display a little PopupWindow to tell the user that the workbench is currently connecting to the DB



showDbExplorer
public void showDbExplorer()(Code)
Displays the DbExplorer. Either in a separate tab, or as a new window. If an explorer window is already open that instance will be re-used



showDisconnectInfo
protected void showDisconnectInfo()(Code)



showLogMessage
public void showLogMessage(String aMsg)(Code)



showStatusMessage
public void showStatusMessage(String aMsg)(Code)
Display a message in the status bar



stateChanged
public void stateChanged(ChangeEvent e)(Code)
Invoked when the a different SQL panel has been selected This fires the tabSelected() method
Parameters:
  e - a ChangeEvent object



tabSelected
protected void tabSelected(int index)(Code)



updateAddMacroAction
protected void updateAddMacroAction()(Code)



updateCurrentTab
protected void updateCurrentTab(int index)(Code)



updateGuiForTab
protected void updateGuiForTab(int anIndex)(Code)



updateWindowTitle
protected void updateWindowTitle()(Code)



usesSeparateConnection
public boolean usesSeparateConnection()(Code)



waitForConnection
public void waitForConnection()(Code)



windowActivated
public void windowActivated(WindowEvent windowEvent)(Code)



windowClosed
public void windowClosed(WindowEvent e)(Code)



windowClosing
public void windowClosing(WindowEvent windowEvent)(Code)



windowDeactivated
public void windowDeactivated(WindowEvent windowEvent)(Code)



windowDeiconified
public void windowDeiconified(WindowEvent windowEvent)(Code)



windowIconified
public void windowIconified(WindowEvent windowEvent)(Code)



windowOpened
public void windowOpened(WindowEvent windowEvent)(Code)



Fields inherited from javax.swing.JFrame
final public static int EXIT_ON_CLOSE(Code)(Java Doc)
protected AccessibleContext accessibleContext(Code)(Java Doc)
protected JRootPane rootPane(Code)(Java Doc)
protected boolean rootPaneCheckingEnabled(Code)(Java Doc)

Methods inherited from javax.swing.JFrame
protected void addImpl(Component comp, Object constraints, int index)(Code)(Java Doc)
protected JRootPane createRootPane()(Code)(Java Doc)
protected void frameInit()(Code)(Java Doc)
public AccessibleContext getAccessibleContext()(Code)(Java Doc)
public Container getContentPane()(Code)(Java Doc)
public int getDefaultCloseOperation()(Code)(Java Doc)
public Component getGlassPane()(Code)(Java Doc)
public Graphics getGraphics()(Code)(Java Doc)
public JMenuBar getJMenuBar()(Code)(Java Doc)
public JLayeredPane getLayeredPane()(Code)(Java Doc)
public JRootPane getRootPane()(Code)(Java Doc)
public TransferHandler getTransferHandler()(Code)(Java Doc)
public static boolean isDefaultLookAndFeelDecorated()(Code)(Java Doc)
protected boolean isRootPaneCheckingEnabled()(Code)(Java Doc)
protected String paramString()(Code)(Java Doc)
protected void processWindowEvent(WindowEvent e)(Code)(Java Doc)
public void remove(Component comp)(Code)(Java Doc)
public void repaint(long time, int x, int y, int width, int height)(Code)(Java Doc)
public void setContentPane(Container contentPane)(Code)(Java Doc)
public void setDefaultCloseOperation(int operation)(Code)(Java Doc)
public static void setDefaultLookAndFeelDecorated(boolean defaultLookAndFeelDecorated)(Code)(Java Doc)
public void setGlassPane(Component glassPane)(Code)(Java Doc)
public void setIconImage(Image image)(Code)(Java Doc)
public void setJMenuBar(JMenuBar menubar)(Code)(Java Doc)
public void setLayeredPane(JLayeredPane layeredPane)(Code)(Java Doc)
public void setLayout(LayoutManager manager)(Code)(Java Doc)
protected void setRootPane(JRootPane root)(Code)(Java Doc)
protected void setRootPaneCheckingEnabled(boolean enabled)(Code)(Java Doc)
public void setTransferHandler(TransferHandler newHandler)(Code)(Java Doc)
public void update(Graphics g)(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.