00001 /* 00002 * OpenMobileIS - a free Java(TM) Framework for mobile applications Java(TM) 00003 * Copyright (C) 2004-2006 Philippe Delrieu 00004 * All rights reserved. 00005 * Contact: pdelrieu@openmobileis.org 00006 * 00007 * This library is free software; you can redistribute it and/or 00008 * modify it under the terms of the GNU Lesser General Public 00009 * License as published by the Free Software Foundation; either 00010 * version 2.1 of the License, or any later version. 00011 * 00012 * This library is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 * Lesser General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU Lesser General Public 00018 * License along with this library; if not, write to the Free Software 00019 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 00020 * USA 00021 * 00022 * Author : Philippe Delrieu 00023 * 00024 * Modifications : 00025 * Creation P.Delrieu 00026 * 00027 */ 00028 package org.openmobileis.synchro.openmsp.client.conduit; 00029 00030 import org.openmobileis.modules.common.gui.PocketPCSynchroProgressBar; 00031 import org.openmobileis.synchro.openmsp.client.OpenMSPSynchroProcessListener; 00032 00037 public final class PPCProgressBarSynchroProcessListener implements OpenMSPSynchroProcessListener { 00038 private PocketPCSynchroProgressBar progressBar; 00042 public PPCProgressBarSynchroProcessListener() { 00043 // TODO Auto-generated constructor stub 00044 } 00045 00046 /* (non-Javadoc) 00047 * @see org.openmobileis.synchro.openmsp.client.OpenMSPSynchroProcessListener#notifyAfterProcessMessageReturn() 00048 */ 00049 public void notifyAfterProcessMessageReturn() { 00050 progressBar.setProgressBar(80); 00051 } 00052 00053 /* (non-Javadoc) 00054 * @see org.openmobileis.synchro.openmsp.client.OpenMSPSynchroProcessListener#notifyBeforeProcessMessageReturn() 00055 */ 00056 public void notifyBeforeProcessMessageReturn() { 00057 progressBar.setProgressBar(60); 00058 00059 } 00060 00061 /* (non-Javadoc) 00062 * @see org.openmobileis.synchro.openmsp.client.OpenMSPSynchroProcessListener#notifyBeforeSendMessage() 00063 */ 00064 public void notifyBeforeSendMessage() { 00065 progressBar.setProgressBar(20); 00066 00067 } 00068 00069 /* (non-Javadoc) 00070 * @see org.openmobileis.synchro.openmsp.client.OpenMSPSynchroProcessListener#notifyGenerateOpenMSPMessage() 00071 */ 00072 public void notifyGenerateOpenMSPMessage() { 00073 } 00074 00075 /* (non-Javadoc) 00076 * @see org.openmobileis.synchro.openmsp.client.OpenMSPSynchroProcessListener#notifyListenerEndSync(java.lang.String) 00077 */ 00078 public void notifyListenerEndSync(String listenerName) { 00079 // TODO Auto-generated method stub 00080 00081 } 00082 00083 /* (non-Javadoc) 00084 * @see org.openmobileis.synchro.openmsp.client.OpenMSPSynchroProcessListener#notifyListenerStartSync(java.lang.String) 00085 */ 00086 public void notifyListenerStartSync(String listenerName) { 00087 00088 } 00089 00090 /* (non-Javadoc) 00091 * @see org.openmobileis.synchro.openmsp.client.OpenMSPSynchroProcessListener#notifyReceiveMessageReturn() 00092 */ 00093 public void notifyReceiveMessageReturn() { 00094 progressBar.setProgressBar(50); 00095 00096 } 00097 00098 /* (non-Javadoc) 00099 * @see org.openmobileis.synchro.openmsp.client.OpenMSPSynchroProcessListener#notifySynchroEnd() 00100 */ 00101 public void notifyEndProcessListener() { 00102 progressBar.setProgressBar(80); 00103 } 00104 00105 /* (non-Javadoc) 00106 * @see org.openmobileis.synchro.openmsp.client.OpenMSPSynchroProcessListener#notifySynchroEnd() 00107 */ 00108 public void notifySynchroEnd() { 00109 progressBar.setProgressBar(100); 00110 progressBar.dispose(); 00111 } 00112 00113 /* (non-Javadoc) 00114 * @see org.openmobileis.synchro.openmsp.client.OpenMSPSynchroProcessListener#notifySynchroFailure(int) 00115 */ 00116 public void notifySynchroFailure(int status) { 00117 // TODO Auto-generated method stub 00118 00119 } 00120 00121 /* (non-Javadoc) 00122 * @see org.openmobileis.synchro.openmsp.client.OpenMSPSynchroProcessListener#notifySynchroStart() 00123 */ 00124 public void notifySynchroStart() { 00125 if (progressBar != null) progressBar.dispose(); 00126 progressBar = new PocketPCSynchroProgressBar(); 00127 progressBar.setProgressBar(10); 00128 progressBar.setVisible(); 00129 } 00130 00131 }