|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectca.sqlpower.wabit.swingui.WabitSwingSessionImpl
public class WabitSwingSessionImpl
The Main Window for the Wabit Application.
| Nested Class Summary | |
|---|---|
class |
WabitSwingSessionImpl.TreeTabDropTargetListener
This is the droplistener on the tabbed pane which controls importing and exporting between workspaces |
| Constructor Summary | |
|---|---|
protected |
WabitSwingSessionImpl(WabitSwingSessionContext context,
WabitSession delegateSession)
Creates a new session that belongs to the given context and delegates some of its work to the given delegate session. |
| Method Summary | |
|---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener l)
|
void |
addSessionLifecycleListener(ca.sqlpower.swingui.event.SessionLifecycleListener<WabitSession> l)
|
boolean |
close()
Ends this session, disposing its frame and releasing any system resources that were obtained explicitly by this session. |
ca.sqlpower.util.UserPrompter |
createDatabaseUserPrompter(java.lang.String question,
java.util.List<java.lang.Class<? extends ca.sqlpower.sql.SPDataSource>> dsTypes,
ca.sqlpower.util.UserPrompter.UserPromptOptions optionType,
ca.sqlpower.util.UserPrompter.UserPromptResponse defaultResponseType,
java.lang.Object defaultResponse,
ca.sqlpower.sql.DataSourceCollection<ca.sqlpower.sql.SPDataSource> dsCollection,
java.lang.String... buttonNames)
|
ca.sqlpower.util.UserPrompter |
createUserPrompter(java.lang.String question,
ca.sqlpower.util.UserPrompterFactory.UserPromptType responseType,
ca.sqlpower.util.UserPrompter.UserPromptOptions optionType,
ca.sqlpower.util.UserPrompter.UserPromptResponse defaultResponseType,
java.lang.Object defaultResponse,
java.lang.String... buttonNames)
|
void |
delete()
|
WabitSwingSessionContext |
getContext()
Returns the context this session belongs to. |
java.net.URI |
getCurrentURI()
Returns the URI that this session was most recently loaded from or saved to. |
java.io.File |
getCurrentURIAsFile()
Returns the current URI as a File object, if the current URI is not null and it actually represents a file on a locally-accessible filesystem. |
ca.sqlpower.sql.DataSourceCollection<ca.sqlpower.sql.SPDataSource> |
getDataSources()
Returns a collection of all the data sources that are available to this session. |
ca.sqlpower.swingui.db.DatabaseConnectionManager |
getDbConnectionManager()
Returns a DatabaseConnectionManager that allows modifying
the data source collection of the given session. |
ca.sqlpower.enterprise.client.SPServerInfo |
getEnterpriseServerInfos()
Returns the server infos if this session's delegate is a server session. |
WabitWorkspace |
getSystemWorkspace()
This method might return a WabitWorkspace, the system one, located on the Wabit server, if the current session is backed by a remote server session. |
javax.swing.JTree |
getTree()
Returns the JTree that describes the given session. |
WabitWorkspace |
getWorkspace()
Returns the workspace associated with this session. |
WorkspaceTreeModel |
getWorkspaceTreeModel()
Returns the tree model that is used to define the JTree in WabitSwingSession.getTree(). |
boolean |
hasUnsavedChanges()
Reports whether or not any changes have been detected in this workspace since it was opened or last saved. |
boolean |
isEnterpriseServerSession()
Returns true if the current session is in fact a remote session with the wabit enterprise server. |
boolean |
isForegroundThread()
|
void |
refresh()
|
void |
registerSwingWorker(ca.sqlpower.swingui.SPSwingWorker worker)
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener l)
|
void |
removeSessionLifecycleListener(ca.sqlpower.swingui.event.SessionLifecycleListener<WabitSession> l)
|
void |
removeSwingWorker(ca.sqlpower.swingui.SPSwingWorker worker)
|
void |
runInBackground(java.lang.Runnable runner)
Starts this runner on a worker thread that is registered with this swing session. |
void |
runInForeground(java.lang.Runnable runner)
The runner will be executed on the event dispatch thread. |
void |
setCurrentURI(java.net.URI uri)
Updates the current URI this session's workspace was last loaded from or saved to. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected WabitSwingSessionImpl(WabitSwingSessionContext context,
WabitSession delegateSession)
To create an instance of this class, use
WabitSwingSessionContextImpl.createSession().
context - The context this session belongs to.delegateSession - The session to delegate some WabitSession operations to.| Method Detail |
|---|
public ca.sqlpower.sql.DataSourceCollection<ca.sqlpower.sql.SPDataSource> getDataSources()
WabitSession
getDataSources in interface WabitSessionpublic javax.swing.JTree getTree()
WabitSwingSession
getTree in interface WabitSwingSessionpublic void addSessionLifecycleListener(ca.sqlpower.swingui.event.SessionLifecycleListener<WabitSession> l)
addSessionLifecycleListener in interface WabitSessionpublic void removeSessionLifecycleListener(ca.sqlpower.swingui.event.SessionLifecycleListener<WabitSession> l)
removeSessionLifecycleListener in interface WabitSessionpublic boolean close()
WabitSession
close in interface WabitSessionpublic WabitWorkspace getWorkspace()
WabitSession
getWorkspace in interface ca.sqlpower.util.SPSessiongetWorkspace in interface WabitSessionpublic WabitSwingSessionContext getContext()
WabitSession
getContext in interface WabitSwingSessiongetContext in interface WabitSessionpublic ca.sqlpower.swingui.db.DatabaseConnectionManager getDbConnectionManager()
DatabaseConnectionManager that allows modifying
the data source collection of the given session.
getDbConnectionManager in interface WabitSwingSession
public ca.sqlpower.util.UserPrompter createUserPrompter(java.lang.String question,
ca.sqlpower.util.UserPrompterFactory.UserPromptType responseType,
ca.sqlpower.util.UserPrompter.UserPromptOptions optionType,
ca.sqlpower.util.UserPrompter.UserPromptResponse defaultResponseType,
java.lang.Object defaultResponse,
java.lang.String... buttonNames)
public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
addPropertyChangeListener in interface WabitSessionpublic void removePropertyChangeListener(java.beans.PropertyChangeListener l)
removePropertyChangeListener in interface WabitSessionpublic WorkspaceTreeModel getWorkspaceTreeModel()
WabitSwingSessionWabitSwingSession.getTree().
getWorkspaceTreeModel in interface WabitSwingSession
public ca.sqlpower.util.UserPrompter createDatabaseUserPrompter(java.lang.String question,
java.util.List<java.lang.Class<? extends ca.sqlpower.sql.SPDataSource>> dsTypes,
ca.sqlpower.util.UserPrompter.UserPromptOptions optionType,
ca.sqlpower.util.UserPrompter.UserPromptResponse defaultResponseType,
java.lang.Object defaultResponse,
ca.sqlpower.sql.DataSourceCollection<ca.sqlpower.sql.SPDataSource> dsCollection,
java.lang.String... buttonNames)
public java.net.URI getCurrentURI()
WabitSwingSession
getCurrentURI in interface WabitSwingSessionpublic void setCurrentURI(java.net.URI uri)
setCurrentURI in interface WabitSwingSessionpublic java.io.File getCurrentURIAsFile()
WabitSwingSession
getCurrentURIAsFile in interface WabitSwingSessionWabitSwingSession.getCurrentURI()public boolean hasUnsavedChanges()
WabitSwingSession
hasUnsavedChanges in interface WabitSwingSessionWabitSwingSession.setCurrentURI(URI)
public void registerSwingWorker(@NonNull
ca.sqlpower.swingui.SPSwingWorker worker)
registerSwingWorker in interface ca.sqlpower.swingui.SwingWorkerRegistry
public void removeSwingWorker(@NonNull
ca.sqlpower.swingui.SPSwingWorker worker)
removeSwingWorker in interface ca.sqlpower.swingui.SwingWorkerRegistrypublic void runInBackground(java.lang.Runnable runner)
WabitSwingSession
runInBackground in interface ca.sqlpower.util.SPSessionrunInBackground in interface WabitSwingSessionpublic void runInForeground(java.lang.Runnable runner)
WabitSwingSession
runInForeground in interface ca.sqlpower.util.SPSessionrunInForeground in interface WabitSwingSessionpublic boolean isForegroundThread()
isForegroundThread in interface ca.sqlpower.util.SPSessionpublic boolean isEnterpriseServerSession()
WabitSession
isEnterpriseServerSession in interface WabitSessionpublic ca.sqlpower.enterprise.client.SPServerInfo getEnterpriseServerInfos()
public WabitWorkspace getSystemWorkspace()
WabitSession
getSystemWorkspace in interface WabitSessionpublic void refresh()
public void delete()
throws org.apache.http.client.ClientProtocolException,
java.net.URISyntaxException,
java.io.IOException
org.apache.http.client.ClientProtocolException
java.net.URISyntaxException
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||