Package net.sourceforge.squirrel_sql.client

Examples of net.sourceforge.squirrel_sql.client.IApplication$IMenuIDs


   *
   * @param  evt  The current event.
   */
  public void actionPerformed(ActionEvent evt)
  {
    final IApplication app = getApplication();
    final Frame parentFrame = getParentFrame(evt);
    final FileExtensionFilter[] filters = new FileExtensionFilter[1];
    filters[0] = new FileExtensionFilter(s_stringMgr.getString("DumpApplicationAction.textfiles"), new String[] { ".txt" });
    final JLabel lbl = new JLabel(s_stringMgr.getString("DumpApplicationAction.warning"));
    lbl.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4));
    final File outFile = Dialogs.selectFileForWriting(parentFrame, filters, lbl);
    if (outFile != null)
    {
      ListMessageHandler msgHandler = new ListMessageHandler();
      ICommand cmd = new DumpApplicationCommand(app, outFile, msgHandler);
      try
      {
        cmd.execute();
        String[] msgs = msgHandler.getMessages();
            String[] warnings = msgHandler.getWarningMessages();
        Throwable[] errors = msgHandler.getExceptions();
            if (msgs.length > 0 || errors.length > 0 || warnings.length > 0)
        {
          for (int i = 0; i < msgs.length; ++i)
          {
            app.showErrorDialog(msgs[i]);
          }
          for (int i = 0; i < warnings.length; ++i)
          {
            app.showErrorDialog(warnings[i]);
          }
          for (int i = 0; i < errors.length; ++i)
          {
            app.showErrorDialog(errors[i]);
          }
        }
        else
        {
          final String msg = s_stringMgr.getString("DumpApplicationAction.success", outFile.getAbsolutePath());
          ErrorDialog dlg = new ErrorDialog(getApplication().getMainFrame(), msg);
          // i18n[DumpApplicationAction.titleSuccess=Dump successful]
          dlg.setTitle(s_stringMgr.getString("DumpApplicationAction.titleSuccess"));
          dlg.setVisible(true);
        }
      }
      catch (Throwable ex)
      {
        final String msg = s_stringMgr.getString("DumpApplicationAction.failure");
        app.showErrorDialog(msg, ex);
        s_log.error(msg, ex);
      }
    }
  }
View Full Code Here


   *
   * @param  evt   The current event.
   */
  public void actionPerformed(ActionEvent evt)
  {
    IApplication app = getApplication();
    DriversListInternalFrame tw = app.getWindowManager().getDriversListInternalFrame();
    tw.moveToFront();
    try
    {
      tw.setSelected(true);
    }
    catch (PropertyVetoException ex)
    {
            //i18n[CreateDriverAction.error.selectingwindow=Error selecting window]
      s_log.error(s_stringMgr.getString("CreateDriverAction.error.selectingwindow"), ex);
    }
           
        try {
            final URL url = app.getResources().getDefaultDriversUrl();
            net.sourceforge.squirrel_sql.client.gui.db.DataCache cache = _app.getDataCache();
            ISQLDriver[] missingDrivers = cache.findMissingDefaultDrivers(url);
            if (missingDrivers != null) {
                String msg =
                    s_stringMgr.getString("CreateDriverAction.confirm");
View Full Code Here

   *
   * @param  evt   The current event.
   */
  public void actionPerformed(ActionEvent evt)
  {
    final IApplication app = getApplication();

    if (Dialogs.showYesNo(app.getMainFrame(),
                s_stringMgr.getString("InstallDefaultDriversAction.confirm")))
    {
      final DriversListInternalFrame tw = app.getWindowManager().getDriversListInternalFrame();
      tw.moveToFront();
      try
      {
        tw.setSelected(true);
      }
      catch (PropertyVetoException ex)
      {
                //i18n[InstallDefaultDriversAction.error.selectingwindow=Error selecting window]
        s_log.error(s_stringMgr.getString("InstallDefaultDriversAction.error.selectingwindow"), ex);
      }
      final URL url = app.getResources().getDefaultDriversUrl();
      try
      {
        new InstallDefaultDriversCommand(app, url).execute();
      }
      catch (BaseException ex)
      {
        app.showErrorDialog(s_stringMgr.getString("InstallDefaultDriversAction.error.install"), ex);
      }
    }
  }
View Full Code Here

   *
   * @param  evt   The current event.
   */
  public void actionPerformed(ActionEvent evt)
  {
    IApplication app = getApplication();
    DriversListInternalFrame tw = app.getWindowManager().getDriversListInternalFrame();
    tw.moveToFront();
    try
    {
      tw.setSelected(true);
    }
View Full Code Here

   *
   * @param  evt   The current event.
   */
  public void actionPerformed(ActionEvent evt)
  {
    IApplication app = getApplication();
    DriversListInternalFrame tw = app.getWindowManager().getDriversListInternalFrame();
    tw.moveToFront();
    try
    {
      tw.setSelected(true);
    }
View Full Code Here

   *
   * @param  evt  The current event.
   */
  public void actionPerformed(ActionEvent evt)
  {
    IApplication app = getApplication();
    CursorChanger cursorChg = new CursorChanger(app.getMainFrame());
    cursorChg.show();
    try
    {
      new CloseAllSessionsCommand(app).execute();
    }
View Full Code Here

      super(app);
   }

   protected void moveToFrontAndSelectAliasFrame()
   {
      IApplication app = getApplication();
      AliasesListInternalFrame tw = app.getWindowManager().getAliasesListInternalFrame();
      tw.moveToFront();
      try
      {
         tw.setSelected(true);
      }
View Full Code Here

     *
     * @param evt
     *            The current event.
     */
    public void actionPerformed(ActionEvent evt) {
        IApplication app = getApplication();
        SavePreferencesCommand command =
            new SavePreferencesCommand(app, getParentFrame(evt));
        command.setDialogUtils(new DialogUtils());
        command.execute();
    }
View Full Code Here

   *
   * @param  evt   The current event.
   */
  public void actionPerformed(ActionEvent evt)
  {
    final IApplication app = getApplication();
    final DriversListInternalFrame tw = app.getWindowManager().getDriversListInternalFrame();
    tw.moveToFront();
    try
    {
      tw.setSelected(true);
    }
View Full Code Here

   *
   * @param  evt   The current event.
   */
  public void actionPerformed(ActionEvent evt)
  {
    IApplication app = getApplication();
    DriversListInternalFrame tw = app.getWindowManager().getDriversListInternalFrame();
    tw.moveToFront();
    try
    {
      tw.setSelected(true);
    }
View Full Code Here

TOP

Related Classes of net.sourceforge.squirrel_sql.client.IApplication$IMenuIDs

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.