[Squirrel-sql-commits] sql12/app/src/net/sourceforge/squirrel_sql/client/session/action PreviousSess
A Java SQL client for any JDBC compliant database
Brought to you by:
colbell,
gerdwagner
From: Colin B. <co...@us...> - 2004-09-06 10:38:08
|
Update of /cvsroot/squirrel-sql/sql12/app/src/net/sourceforge/squirrel_sql/client/session/action In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1818/app/src/net/sourceforge/squirrel_sql/client/session/action Modified Files: PreviousSessionAction.java NextSessionAction.java Log Message: Cleanup window handling Index: NextSessionAction.java =================================================================== RCS file: /cvsroot/squirrel-sql/sql12/app/src/net/sourceforge/squirrel_sql/client/session/action/NextSessionAction.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** NextSessionAction.java 18 Aug 2004 12:10:43 -0000 1.6 --- NextSessionAction.java 6 Sep 2004 10:37:42 -0000 1.7 *************** *** 20,27 **** import java.awt.event.ActionEvent; - import javax.swing.JInternalFrame; - - import net.sourceforge.squirrel_sql.fw.gui.action.SelectInternalFrameCommand; - import net.sourceforge.squirrel_sql.client.IApplication; import net.sourceforge.squirrel_sql.client.action.SquirrelAction; --- 20,23 ---- *************** *** 50,72 **** public void actionPerformed(ActionEvent evt) { ! final IApplication app = getApplication(); ! ISession nextSession = null; ! if (_session == null) ! { ! final ISession[] sessions = app.getSessionManager().getConnectedSessions(); ! if (sessions != null && sessions.length > 0) ! { ! nextSession = sessions[sessions.length - 1]; // Last session. ! } ! } ! else ! { ! nextSession = app.getSessionManager().getNextSession(_session); ! } ! if (nextSession != null) ! { ! final JInternalFrame sif = app.getWindowManager().getMainInternalFrame(nextSession); ! new SelectInternalFrameCommand(sif).execute(); ! } } } --- 46,50 ---- public void actionPerformed(ActionEvent evt) { ! getApplication().getWindowManager().activateNextSession(); } } Index: PreviousSessionAction.java =================================================================== RCS file: /cvsroot/squirrel-sql/sql12/app/src/net/sourceforge/squirrel_sql/client/session/action/PreviousSessionAction.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** PreviousSessionAction.java 18 Aug 2004 12:10:43 -0000 1.5 --- PreviousSessionAction.java 6 Sep 2004 10:37:42 -0000 1.6 *************** *** 20,27 **** import java.awt.event.ActionEvent; - import javax.swing.JInternalFrame; - - import net.sourceforge.squirrel_sql.fw.gui.action.SelectInternalFrameCommand; - import net.sourceforge.squirrel_sql.client.IApplication; import net.sourceforge.squirrel_sql.client.action.SquirrelAction; --- 20,23 ---- *************** *** 50,72 **** public void actionPerformed(ActionEvent evt) { ! final IApplication app = getApplication(); ! ISession nextSession = null; ! if (_session == null) ! { ! final ISession[] sessions = app.getSessionManager().getConnectedSessions(); ! if (sessions != null && sessions.length > 0) ! { ! nextSession = sessions[0]; // First session. ! } ! } ! else ! { ! nextSession = app.getSessionManager().getNextSession(_session); ! } ! if (nextSession != null) ! { ! final JInternalFrame sif = app.getWindowManager().getMainInternalFrame(nextSession); ! new SelectInternalFrameCommand(sif).execute(); ! } } } --- 46,50 ---- public void actionPerformed(ActionEvent evt) { ! getApplication().getWindowManager().activatePreviousSession(); } } |