Package net.sourceforge.squirrel_sql.fw.sql

Examples of net.sourceforge.squirrel_sql.fw.sql.ProgressCallBack


  /**
   * Delete records from the selected tables in the object tree.
   */
  public void execute()
  {   
    ProgressCallBack cb =
      progressCallBackFactory.create(_session.getApplication().getMainFrame(),
        i18n.PROGRESS_DIALOG_TITLE, _tables.size());
     
    cb.setLoadingPrefix(i18n.LOADING_PREFIX);
    DeleteExecuter executer = new DeleteExecuter(cb);
    _session.getApplication().getThreadPool().addTask(executer);
  }
View Full Code Here


   private void privateLoadStoredProcedures(String catalog, String schema, String procNamePattern, final String msg, final int beginProgress)
   {
      try
      {

         ProgressCallBack pcb = new ProgressCallBackAdaptor()
         {  @Override
            public void currentlyLoading(String simpleName)
            {
               setProgress(msg + " (" + simpleName + ")", beginProgress);
            }
View Full Code Here

         if(0 < missingTypes.size())
         {
            try
            {
               String[] buf = missingTypes.toArray(new String[missingTypes.size()]);
               ProgressCallBack pcb = new ProgressCallBackAdaptor()
               {
                 @Override
                  public void currentlyLoading(String simpleName)
                  { 
                     StringBuilder tmp = new StringBuilder(i18n.LOADING_TABLES_MSG);
View Full Code Here

                                  final String msg,
                                  final int beginProgress)
   {
      try
      {
         ProgressCallBack pcb = new ProgressCallBackAdaptor()
         {  @Override
            public void currentlyLoading(String simpleName)
            {
               setProgress(msg + " (" + simpleName + ")", beginProgress);
            }
View Full Code Here

    String[] tables = new String[] { "table_a", "table_b", "table_c", "table_d", "table_e", };
    JFrame parent = new JFrame();
    GUIUtils.centerWithinScreen(parent);
    parent.setSize(new Dimension(200, 200));
    parent.setVisible(true);
    ProgressCallBack pcb = progressCallBackFactory.create(parent, "test", 5);

    pcb.setVisible(true);
    for (int i = 0; i < 5; i++)
    {
      pcb.currentlyLoading(tables[i]);
      Thread.sleep(1000);
    }
    System.exit(0);
  }
View Full Code Here

      for (int i = 0; i < dbObjs.length; i++)
      {
        selectedTables.add((ITableInfo) dbObjs[i]);
      }

      ProgressCallBack cb =
        progressCallBackFactory.create(_session.getApplication().getMainFrame(),
          i18n.PROGRESS_DIALOG_TITLE, dbObjs.length);

      cb.setLoadingPrefix(i18n.LOADING_PREFIX);
      selectedTables = SQLUtilities.getInsertionOrder(selectedTables, md, cb);
      cb.setVisible(false);
      cb.dispose();

      _plugin.setSelectedDatabaseObjects(selectedTables.toArray(new IDatabaseObjectInfo[dbObjs.length]));

    }
    else
View Full Code Here

      // No point to ordering less than 2 tables
      return tables;
    }
    final SQLDatabaseMetaData md = _session.getSQLConnection().getSQLMetaData();

    ProgressCallBack getOrderedTablesCallBack =
      progressCallBackFactory.create(customDialog, i18n.PROGRESS_DIALOG_ANALYZE_TITLE, tables.size());
    getOrderedTablesCallBack.setLoadingPrefix(i18n.LOADING_PREFIX);

    // Now, get the drop order (same as delete) and update the dialog
    // status while doing so.
    final List<ITableInfo> result = SQLUtilities.getDeletionOrder(tables, md, getOrderedTablesCallBack);
    getOrderedTablesCallBack.setVisible(false);
    getOrderedTablesCallBack = null;
    return result;
  }
View Full Code Here

TOP

Related Classes of net.sourceforge.squirrel_sql.fw.sql.ProgressCallBack

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.