1 32 33 package it.businesslogic.ireport.plugin.checkupdate; 34 35 import javax.swing.SwingUtilities ; 36 37 41 public class CheckUpdate extends it.businesslogic.ireport.plugin.IReportPlugin { 42 43 boolean firstTime = true; 44 45 46 47 48 public CheckUpdate() { 49 50 } 51 52 public void call() { 53 54 if (!firstTime || it.businesslogic.ireport.gui.MainFrame.getMainInstance().getProperties().getProperty("updateOnStartup", "true").equals("true")) 55 { 56 SwingUtilities.invokeLater( new Runnable () 57 { 58 59 public void run() 60 { 61 try { 62 UpgradeSearch us = new UpgradeSearch(); 63 Thread t = new Thread (us); 64 t.start(); 65 } catch (Throwable ex) { 66 ex.printStackTrace(); 67 } 68 } 69 }); 70 } 71 firstTime = false; 72 73 } 74 75 public void configure() { 76 CheckUpdateDialog cup = new CheckUpdateDialog(getMainFrame(), true); 77 cup.setVisible(true); 78 79 } 80 81 } 82 | Popular Tags |