Package tvbrowser.ui.waiting.dlgs

Examples of tvbrowser.ui.waiting.dlgs.CopyWaitingDlg


    }
   
    if(!currentDir.equals(newDir)) {
     
      Window parent = UiUtilities.getLastModalChildOf(MainFrame.getInstance());
      mWaitingDlg = new CopyWaitingDlg(parent, CopyWaitingDlg.COPY_MSG);

      mShowWaiting = true;

      new Thread("Move TV data directory") {
        public void run() {
View Full Code Here


        mCopyToSystem = targetTvDataDir.mkdirs();
      }

      if(mCopyToSystem) {
        try {
          final CopyWaitingDlg waiting = new CopyWaitingDlg(new JFrame(), CopyWaitingDlg.EXPORT_SETTINGS_MSG);

          mLog.info("Copy settings and TV data from TV-Browser transportable to system");

          mShowWaiting = true;

          Thread copyDataThread = new Thread("Copy TV data directory") {
            public void run() {
              try {
                IOUtilities.copy(currentSettingsDir.listFiles(new FilenameFilter() {
                  public boolean accept(File dir, String name) {
                    return !name.equalsIgnoreCase("tvdata")
                        && !name.equals(targetSettingsDir.getName())
                        && !name.equalsIgnoreCase("backup")
                        && !name.equalsIgnoreCase("lang")
                        && !name.equals(".lock");
                  }
                }), targetSettingsDir);
                sleep(5000);
                IOUtilities.copy(currentTvDataDir.listFiles(), targetTvDataDir, true);
              }catch(Exception e) {}

              mShowWaiting = false;
              waiting.setVisible(false);
            }
          };
          copyDataThread.start();

          waiting.setVisible(mShowWaiting);
        }catch(Exception e) {
          mCopyToSystem = false;
        }
      }
    }
View Full Code Here

      public void run() {
        try {
          sleep(INFO_DIALOG_WAITING_TIME);

          if(mShowSettingsCopyWaiting) {
            final CopyWaitingDlg waiting = new CopyWaitingDlg(new JFrame(),CopyWaitingDlg.IMPORT_SETTINGS_MSG);

            new Thread("settings import waiting thread") {
              public void run() {
                while(mShowSettingsCopyWaiting) {
                  try {
                    sleep(200);
                  } catch (InterruptedException e1) {
                    e1.printStackTrace();
                  }
                }

                waiting.setVisible(false);
              }
            }.start();

            waiting.setVisible(mShowSettingsCopyWaiting);
          }
        } catch (InterruptedException e) {
          // ignore
        }
      }
View Full Code Here

              final File targetDir = new File(getUserDirectoryName(),"tvdata");

              if(!oldTvDataDir.equals(targetDir)) {
                targetDir.mkdirs();

                final CopyWaitingDlg waiting = new CopyWaitingDlg(new JFrame(), versionTest ? CopyWaitingDlg.APPDATA_MSG : CopyWaitingDlg.IMPORT_MSG);

                mShowWaiting = true;

                final File srcDir = oldTvDataDir;

                Thread copyDataThread = new Thread("Copy TV data directory") {
                  public void run() {
                    try {
                      IOUtilities.copy(srcDir.listFiles(), targetDir, true);
                    }catch(Exception e) {}

                    mShowWaiting = false;
                    waiting.setVisible(false);
                  }
                };
                copyDataThread.start();

                waiting.setVisible(mShowWaiting);
              }
            }

            /*
             * Test if a settings file exist in the user directory, move the
View Full Code Here

TOP

Related Classes of tvbrowser.ui.waiting.dlgs.CopyWaitingDlg

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.