/** * Creates a new SQL View internal frame for the passed session. * * @param session Session we are creating internal frame for. * * @throws IllegalArgumentException * Thrown if ISession is passed as null. */ public synchronized SQLInternalFrame createSQLInternalFrame(ISession session) { if (session == null) { throw new IllegalArgumentException("ISession == null"); } final SQLInternalFrame sif = new SQLInternalFrame(session); getMainFrame().addWidget(sif); // If we don't invokeLater here no Short-Cut-Key is sent // to the internal frame // seen under java version "1.4.1_01" and Linux SwingUtilities.invokeLater(new Runnable() { public void run() { sif.setVisible(true); sif.requestFocus(); } }); return sif; }
/** * Creates a new Object Tree internal frame for the passed session. * * @param session Session we are creating internal frame for. * * @throws IllegalArgumentException * Thrown if ISession is passed as null. */ public synchronized ObjectTreeInternalFrame createObjectTreeInternalFrame(ISession session) { if (session == null) { throw new IllegalArgumentException("ISession == null"); } final ObjectTreeInternalFrame oif = new ObjectTreeInternalFrame(session); getMainFrame().addWidget(oif); // If we don't invokeLater here no Short-Cut-Key is sent // to the internal frame // seen under java version "1.4.1_01" and Linux SwingUtilities.invokeLater(new Runnable() { public void run() { oif.setVisible(true); oif.getObjectTreeAPI().selectRoot(); } }); return oif; }
private void createConnectionInternalFrame(SheetHandler hdl) { ConnectionInternalFrame sheet = new ConnectionInternalFrame(_app, _sqlAlias, hdl); _app.getMainFrame().addWidget(sheet); DialogWidget.centerWithinDesktop(sheet); sheet.moveToFront(); }
private void createConnectionInternalFrame(SheetHandler hdl) { ConnectionInternalFrame sheet = new ConnectionInternalFrame(_app, _sqlAlias, hdl); _app.getMainFrame().addWidget(sheet); DialogWidget.centerWithinDesktop(sheet); sheet.moveToFront(); }
_app.getMainFrame().addWidget(sif);
private NewSessionPropertiesSheet(IApplication app) { super(s_stringMgr.getString("NewSessionPropertiesSheet.title"), true, app); _app = app; setDefaultCloseOperation(WindowConstants.HIDE_ON_CLOSE); createGUI(); for (Iterator<INewSessionPropertiesPanel> it = _panels.iterator(); it.hasNext();) { INewSessionPropertiesPanel pnl = it.next(); pnl.initialize(_app); } setSize(getDimension()); app.getMainFrame().addWidget(this); DialogWidget.centerWithinDesktop(this); setVisible(true); }
private NewSessionPropertiesSheet(IApplication app) { super(s_stringMgr.getString("NewSessionPropertiesSheet.title"), true, app); _app = app; setDefaultCloseOperation(WindowConstants.HIDE_ON_CLOSE); createGUI(); for (Iterator<INewSessionPropertiesPanel> it = _panels.iterator(); it.hasNext();) { INewSessionPropertiesPanel pnl = it.next(); pnl.initialize(_app); } setSize(getDimension()); app.getMainFrame().addWidget(this); DialogWidget.centerWithinDesktop(this); setVisible(true); }
/** * Shows the dialog in front of all windows and centered. * * @param app The application to show the window in */ public void showDialog(IApplication app) { app.getMainFrame().addWidget(this); moveToFront(); setLayer(JLayeredPane.MODAL_LAYER); DialogWidget.centerWithinDesktop(this); this.setVisible(true); } }
/** * Shows the dialog in front of all windows and centered. * * @param app The application to show the window in */ public void showDialog(IApplication app) { app.getMainFrame().addWidget(this); moveToFront(); setLayer(JLayeredPane.MODAL_LAYER); DialogWidget.centerWithinDesktop(this); this.setVisible(true); } }
private void openWindowForTable(DataSetViewerTablePanel simpleTable) { Window parent = SwingUtilities.windowForComponent(_overviewPanel.btnShowInTableWin); OverviewFrame overviewFrame = new OverviewFrame(simpleTable, _app, parent); _app.getMainFrame().addWidget(overviewFrame); overviewFrame.setLayer(JLayeredPane.PALETTE_LAYER); overviewFrame.setVisible(true); DialogWidget.centerWithinDesktop(overviewFrame); }
private void openWindowForTable(DataSetViewerTablePanel simpleTable) { Window parent = SwingUtilities.windowForComponent(_overviewPanel.btnShowInTableWin); OverviewFrame overviewFrame = new OverviewFrame(simpleTable, _app, parent); _app.getMainFrame().addWidget(overviewFrame); overviewFrame.setLayer(JLayeredPane.PALETTE_LAYER); overviewFrame.setVisible(true); DialogWidget.centerWithinDesktop(overviewFrame); }
_app.getMainFrame().addWidget(propsSheet); positionSheet(propsSheet);
/** * Create and show a new maintenance sheet to allow the user to create a new driver. * * @return The new maintenance sheet. */ public DriverInternalFrame getCreateSheet() { final net.sourceforge.squirrel_sql.client.gui.db.DataCache cache = _app.getDataCache(); final IIdentifierFactory factory = IdentifierFactory.getInstance(); final ISQLDriver driver = cache.createDriver(factory.createIdentifier()); final DriverInternalFrame sheet = new DriverInternalFrame(_app, driver, NEW); _app.getMainFrame().addWidget(sheet); DialogWidget.centerWithinDesktop(sheet); return sheet; }
private void createParameterDialog(String parameter, String oldValue) { dialog = new AskParamValueDialog(parameter, oldValue, session.getApplication()); session.getApplication().getMainFrame().addWidget(dialog); dialog.setLayer(JLayeredPane.MODAL_LAYER); dialog.moveToFront(); DialogWidget.centerWithinDesktop(dialog); dialog.setVisible(true); }
/** * Create and show a new maintenance sheet to allow the user to create a new driver. * * @return The new maintenance sheet. */ public DriverInternalFrame getCreateSheet() { final net.sourceforge.squirrel_sql.client.gui.db.DataCache cache = _app.getDataCache(); final IIdentifierFactory factory = IdentifierFactory.getInstance(); final ISQLDriver driver = cache.createDriver(factory.createIdentifier()); final DriverInternalFrame sheet = new DriverInternalFrame(_app, driver, NEW); _app.getMainFrame().addWidget(sheet); DialogWidget.centerWithinDesktop(sheet); return sheet; }
/** * Create and show a new maintenance sheet to allow the user to create a new * alias. * * @return The new maintenance sheet. */ public AliasInternalFrame getCreateSheet() { final net.sourceforge.squirrel_sql.client.gui.db.DataCache cache = _app.getDataCache(); final IIdentifierFactory factory = IdentifierFactory.getInstance(); final ISQLAlias alias = cache.createAlias(factory.createIdentifier()); final AliasInternalFrame sheet = new AliasInternalFrame(_app, alias, NEW); _app.getMainFrame().addWidget(sheet); DialogWidget.centerWithinDesktop(sheet); return sheet; }
/** * Create and show a new maintenance sheet to allow the user to create a new * alias. * * @return The new maintenance sheet. */ public AliasInternalFrame getCreateSheet() { final net.sourceforge.squirrel_sql.client.gui.db.DataCache cache = _app.getDataCache(); final IIdentifierFactory factory = IdentifierFactory.getInstance(); final ISQLAlias alias = cache.createAlias(factory.createIdentifier()); final AliasInternalFrame sheet = new AliasInternalFrame(_app, alias, NEW); _app.getMainFrame().addWidget(sheet); DialogWidget.centerWithinDesktop(sheet); return sheet; }
/** * Show this window * * @param app * Application API. * @throws IllegalArgumentException * Thrown if a <TT>null</TT> <TT>IApplication</TT> object passed. */ public static synchronized void showSheet(IApplication app) { if (s_instance == null) { s_instance = new ViewLogsSheet(app); app.getMainFrame().addWidget(s_instance); centerWithinDesktop(s_instance); } final boolean wasVisible = s_instance.isVisible(); if (!wasVisible) { s_instance.setVisible(true); } s_instance.moveToFront(); if (!wasVisible && !s_instance._refreshing) { s_instance.startRefreshingLog(); } }
private void showFrame(ResultFrame frame, boolean isOnRerun) { _session.getApplication().getMainFrame().addWidget(frame); if (isOnRerun) { frame.setBounds(getBounds()); } else { frame.pack(); DialogWidget.centerWithinDesktop(frame); } frame.setVisible(true); frame.toFront(); frame.requestFocus(); }
private void showFrame(ResultFrame frame, boolean isOnRerun) { _session.getApplication().getMainFrame().addWidget(frame); if (isOnRerun) { frame.setBounds(getBounds()); } else { frame.pack(); DialogWidget.centerWithinDesktop(frame); } frame.setVisible(true); frame.toFront(); frame.requestFocus(); }