- Timestamp:
- Oct 16, 2010, 1:08:28 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/Main.java
r6980 r7221 3 3 import java.io.File; 4 4 import java.io.IOException; 5 6 5 import javax.swing.UIManager; 7 8 6 import com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel; 9 10 7 import fr.mael.jiwigo.transverse.session.SessionManager; 11 8 import fr.mael.jiwigo.transverse.util.Outil; … … 13 10 import fr.mael.jiwigo.ui.ConnexionDialog; 14 11 import fr.mael.jiwigo.ui.mainframe.MainFrame; 12 15 13 16 14 /** … … 45 43 */ 46 44 public class Main { 47 /**48 * Logger49 */50 public static final org.apache.commons.logging.Log LOG = org.apache.commons.logging.LogFactory.getLog(Main.class);51 /**52 * The login and session manager that allows to connect to53 * the webservice and to query it54 */55 public static SessionManager sessionManager;56 45 57 /** 58 * the main window 59 */ 60 private static MainFrame mainFrame; 46 /** 47 * Logger 48 */ 49 public static final org.apache.commons.logging.Log LOG = org.apache.commons.logging.LogFactory.getLog(Main.class); 50 /** 51 * The login and session manager that allows to connect to 52 * the webservice and to query it 53 */ 54 public static SessionManager sessionManager; 61 55 62 public static void main(String[] args) { 63 try { 64 UIManager.setLookAndFeel(new NimbusLookAndFeel()); 65 } catch (Exception e) { 66 } 67 File dossierConfig = new File(System.getProperty("user.home") + "/.jiwigo"); 68 if (!dossierConfig.exists()) { 69 dossierConfig.mkdir(); 70 } 71 try { 72 PreferencesManagement.creerFichierParDefaut(); 73 //dialog de connexion 74 ConnexionDialog dialog = new ConnexionDialog(); 75 dialog.showDialog(); 76 } catch (IOException e) { 77 LOG.error(Outil.getStackTrace(e)); 56 /** 57 * the main window 58 */ 59 private static MainFrame mainFrame; 60 61 62 public static void main(String[] args) { 63 try { 64 UIManager.setLookAndFeel(new NimbusLookAndFeel()); 65 } catch (Exception e) { 66 } 67 File dossierConfig = new File(System.getProperty("user.home") + "/.jiwigo"); 68 if (!dossierConfig.exists()) { 69 dossierConfig.mkdir(); 70 } 71 try { 72 PreferencesManagement.creerFichierParDefaut(); 73 //dialog de connexion 74 ConnexionDialog dialog = new ConnexionDialog(); 75 dialog.showDialog(); 76 } catch (IOException e) { 77 LOG.error(Outil.getStackTrace(e)); 78 } 79 78 80 } 79 81 80 }81 82 82 83 public static void showFrame() { 83 84 84 if (mainFrame == null) { 85 mainFrame = MainFrame.getInstance(); 85 if (mainFrame == null) { 86 mainFrame = MainFrame.getInstance(); 87 } 88 if (!mainFrame.isVisible()) { 89 mainFrame.showUi(); 90 } 86 91 } 87 if (!mainFrame.isVisible()) {88 mainFrame.showUi();89 }90 }91 92 }
Note: See TracChangeset
for help on using the changeset viewer.