Ignore:
Timestamp:
Jan 22, 2011, 2:46:45 PM (13 years ago)
Author:
mlg
Message:

Images can be sent from the file new file browser.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/Main.java

    r7221 r8838  
    33import java.io.File;
    44import java.io.IOException;
     5
    56import javax.swing.UIManager;
     7
    68import com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel;
     9
    710import fr.mael.jiwigo.transverse.session.SessionManager;
    811import fr.mael.jiwigo.transverse.util.Outil;
     
    1013import fr.mael.jiwigo.ui.ConnexionDialog;
    1114import fr.mael.jiwigo.ui.mainframe.MainFrame;
    12 
    1315
    1416/**
     
    3840   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    3941   
    40  * Classe principale de lancement de l'interface.
     42 * Main class
    4143 * @author mael
    4244 *
     
    4446public class Main {
    4547
    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;
     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;
    5557
    56         /**
    57         *  the main window
    58         */
    59         private static MainFrame mainFrame;
     58    /**
     59    *  the main window
     60    */
     61    private static MainFrame mainFrame;
    6062
    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));
    8079        }
    8180
     81    }
    8282
    83         public static void showFrame() {
     83    public static void showFrame() {
    8484
    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();
    9187        }
     88        if (!mainFrame.isVisible()) {
     89            mainFrame.showUi();
     90        }
     91    }
    9292}
Note: See TracChangeset for help on using the changeset viewer.