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