ca.sqlpower.wabit.swingui
Interface WabitSwingSessionContext

All Superinterfaces:
OlapConnectionMapping, ca.sqlpower.sqlobject.SQLDatabaseMapping, ca.sqlpower.util.UserPrompterFactory, WabitSessionContext
All Known Implementing Classes:
WabitSwingSessionContextImpl

public interface WabitSwingSessionContext
extends WabitSessionContext


Nested Class Summary
 
Nested classes/interfaces inherited from interface ca.sqlpower.util.UserPrompterFactory
ca.sqlpower.util.UserPrompterFactory.UserPromptType
 
Field Summary
 
Fields inherited from interface ca.sqlpower.wabit.WabitSessionContext
DISABLE_QUERY_AUTO_EXECUTE, NEW_WORKSPACE_URL, WABIT_ENTERPRISE_SERVER_MDNS_TYPE
 
Method Summary
 ca.sqlpower.swingui.RecentMenu createRecentMenu()
          Creates a menu that keeps track of the last few opened and saved workspace files.
 javax.swing.JMenu createServerListMenu(java.awt.Component dialogOwner, java.lang.String name, ServerListMenuItemFactory itemFactory)
          Creates a menu whose items change dynamically as enterprise servers appear and disappear on the network.
 WabitSwingSession createServerSession(WabitServerInfo serverInfo)
          Creates a new server-based session for the given server.
 WabitSwingSession createSession()
          Creates a new local session that belongs to this context.
 WabitSwingSession getActiveSwingSession()
           
 javax.swing.JFrame getFrame()
          Returns the JFrame that displays the context.
 ca.sqlpower.swingui.SwingWorkerRegistry getLoadingRegistry()
          Returns a SwingWorkerRegistry for the context to track workers that are involved with loading files.
 javax.swing.JSpinner getRowLimitSpinner()
          Returns the row limit component that affects all cached result sets.
 void putRecentFileName(java.lang.String fileName)
          Sets the most recent file to be saved or loaded into the session.
 boolean setEditorPanel()
          Sets the panel that allows editing of the current selection in the tree.
 void setStatusMessage(java.lang.String msg)
          Sets the status message at the bottom of the window.
 
Methods inherited from interface ca.sqlpower.wabit.WabitSessionContext
addPropertyChangeListener, addServer, addServerListListener, borrowConnection, close, endLoading, getActiveSession, getDataSources, getEnterpriseServers, getJmDNS, getName, getPrefs, getRowLimit, getSessionCount, getSessions, isLoading, isMacOSX, registerChildSession, removePropertyChangeListener, removeServer, removeServerListListener, setActiveSession, startLoading
 
Methods inherited from interface ca.sqlpower.util.UserPrompterFactory
createDatabaseUserPrompter, createUserPrompter
 
Methods inherited from interface ca.sqlpower.sqlobject.SQLDatabaseMapping
getDatabase
 
Methods inherited from interface ca.sqlpower.wabit.OlapConnectionMapping
createConnection
 

Method Detail

createRecentMenu

ca.sqlpower.swingui.RecentMenu createRecentMenu()
Creates a menu that keeps track of the last few opened and saved workspace files.


createServerListMenu

javax.swing.JMenu createServerListMenu(java.awt.Component dialogOwner,
                                       java.lang.String name,
                                       ServerListMenuItemFactory itemFactory)
Creates a menu whose items change dynamically as enterprise servers appear and disappear on the network.

Parameters:
dialogOwner - The component that should own any dialogs that pop up as the result of executing menu actions under the server list menu.

putRecentFileName

void putRecentFileName(java.lang.String fileName)
Sets the most recent file to be saved or loaded into the session. The session tracks recent files for uses like a recent menu and to decide if Wabit should start with loading a saved file.

Parameters:
fileName - The absolute path to the file with the file name.

getFrame

javax.swing.JFrame getFrame()
Returns the JFrame that displays the context.


setEditorPanel

boolean setEditorPanel()
Sets the panel that allows editing of the current selection in the tree. A new panel will be created based on the type of model the active session's currently editing if the user has no changes or wants to discard the current changes.

Returns:
False if the previous editor was not correctly saved and the old component needs to be displayed. True otherwise.

getRowLimitSpinner

javax.swing.JSpinner getRowLimitSpinner()
Returns the row limit component that affects all cached result sets.

Returns:

setStatusMessage

void setStatusMessage(java.lang.String msg)
Sets the status message at the bottom of the window.

Parameters:
msg -

getActiveSwingSession

WabitSwingSession getActiveSwingSession()

getLoadingRegistry

ca.sqlpower.swingui.SwingWorkerRegistry getLoadingRegistry()
Returns a SwingWorkerRegistry for the context to track workers that are involved with loading files. It would be useful if the OpenWorkspaceXMLDAO created the session(s) to load into before creating the thread to do the loading. Then the loading thread could register with the session and we could remove this implementation.


createServerSession

WabitSwingSession createServerSession(WabitServerInfo serverInfo)
Creates a new server-based session for the given server. The new session will belong to this context.

Specified by:
createServerSession in interface WabitSessionContext

createSession

WabitSwingSession createSession()
Creates a new local session that belongs to this context.

Specified by:
createSession in interface WabitSessionContext


Copyright © 2009. All Rights Reserved.